#!/usr/bin/perl -w use strict; use LWP::Simple qw($ua get); use XML::XPath; # To create a project # https://cloud.google.com/console#/project # Inside the project go to APIs+aut, select the # API the program needs (eg Contacts API). # Next go to "Registered apps" # "Register App" # We need the Client ID and Client Secret values my $client_id='CHANGE_ME' my $client_secret='CHANGE_ME' my $redirect_uri='urn:ietf:wg:oauth:2.0:oob'; # This scope is for Google Contacts API my $scope="https://www.google.com/m8/feeds"; # Pretty printing; how deep to indent the fields my $INDENT=20; # Shouldn't need to change anything after this... my $pname=$0; $pname=~s!^.*/!!; my $search=join(" ",@ARGV); # Store our credentials in our home directory with a file called # $HOME/.