NAME
WWW::Contact::GoogleContactsAPI - Get contacts via Google Contacts Data API
SYNOPSIS
use WWW::Contact;
use Data::Dumper;
my $wc = WWW::Contact->new();
my @contacts = $wc->get_contacts('itsa@gmail.com', 'password');
my $errstr   = $wc->errstr;
die $errstr if ($errstr);
print Dumper(\@contacts);
DESCRIPTION
WWW::Contact::GoogleContactsAPI uses the Google Contacts Data API (http://code.google.com/apis/contacts/docs/3.0/reference.html) to retrieve all a user's contacts.
METHODS
$wc->get_contacts($email, $password)- 
Login to Google using
emailandpassword. Fetch all the given user's contacts. Return them as a list or, in a scalar context, as a reference to a list. Each element of the result represents one contact as a reference to a hash with one or more of the following keys (all fields are optional):name- 
The contact's main name as a single string. This may be a person's full name or the name of an organisation.
 family_name- 
A person's family name (surname or last name), usually shared with one or both parents.
 given_name- 
A person's given name (christian name or first name).
 nickname- 
An alternative name or alias for the contact.
 emails- 
An ordered list of references to pairs,
[$address, $type], where$typeis"home","work","other"or some custom label and$addressis the corresponding e-mail address. email- 
The first address in
emails, if any. Deprecated: use$contact->{emails}->[0][0]. addresses- 
As for
emailsbut$addressis a postal addresses, given as a single string. birthday- 
The date of birth in the form
YYYY-MM-DDor--MM-DD. age- 
The age in years today, calculated from the date of birth.
 events- 
An ordered list of references to pairs,
[$date, $type], where$dateis the date of the event in the formYYYY-MM-DDand$typeis the type of event, e.g. "anniversary". instant_messengers- 
An ordered list of references to pairs,
[$protocol, $address], where$protocolis one ofgtalk,jabber,msn,skype,yahooand possibly others. phones- 
An ordered list of references to pairs,
[$number, $type], where$typeis one ofhome,work,mobileand possibly other values.$numbermay include punctuation and comments. updated- 
The time when this contact was last modified in the form
YYYY-MM-DDTHH:MM:SS.SSSZwhereTis a literal "T",SS.SSSis seconds and milliseconds as a decimal andZindicates the UTC time-zone. notes- 
Arbitrary text.
 child,spouse, etc.- 
Relations are returned as references to lists of names (even mother and father).
 organisations- 
An ordered list of reference to pairs,
[$organisation, $type], where$organisationis a body this contact is associated with and$typeis the type of relationship. groups- 
A reference to a list of group names
 - Custom fields
 - 
Any custom fields not recognised by the module are returned in the output hash with a simple string value.
 
 
SEE ALSO
WWW::Contact, WWW::Mechanize, Net::Google::AuthSub
AUTHORS
Fayland Lam, <fayland at gmail.com> Denis Howe, denis.howe=gc@gmail.com
COPYRIGHT & LICENSE
Copyright 2008 Fayland Lam, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.