GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WWW::Contact::GoogleContactsAPI(3) User Contributed Perl Documentation WWW::Contact::GoogleContactsAPI(3)

WWW::Contact::GoogleContactsAPI - Get contacts via Google Contacts Data API

    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);

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.

"$wc->get_contacts($email, $password)"
Login to Google using "email" and "password". 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 $type is "home", "work", "other" or some custom label and $address is the corresponding e-mail address.
"email"
The first address in "emails", if any. Deprecated: use "$contact->{emails}->[0][0]".
"addresses"
As for "emails" but $address is a postal addresses, given as a single string.
"birthday"
The date of birth in the form "YYYY-MM-DD" or "--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 $date is the date of the event in the form "YYYY-MM-DD" and $type is the type of event, e.g. "anniversary".
"instant_messengers"
An ordered list of references to pairs, "[$protocol, $address]", where $protocol is one of "gtalk", "jabber", "msn", "skype", "yahoo" and possibly others.
"phones"
An ordered list of references to pairs, "[$number, $type]", where $type is one of "home", "work", "mobile" and possibly other values. $number may include punctuation and comments.
"updated"
The time when this contact was last modified in the form "YYYY-MM-DDTHH:MM:SS.SSSZ" where "T" is a literal "T", "SS.SSS" is seconds and milliseconds as a decimal and "Z" indicates 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 $organisation is a body this contact is associated with and $type is 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.

WWW::Contact, WWW::Mechanize, Net::Google::AuthSub

Fayland Lam, "<fayland at gmail.com>" Denis Howe, "denis.howe=gc@gmail.com"

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.

2018-02-28 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.