<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    WWW::Google::Contacts - Google Contacts Data API

VERSION
    version 0.02

SYNOPSIS
        use WWW::Google::Contacts;

        my $gcontacts = WWW::Google::Contacts-&gt;new();
        $gcontacts-&gt;login('fayland@gmail.com', 'pass') or die 'login failed';
    
        # create contact
        my $status = $gcontacts-&gt;create_contact( {
            givenName =&gt; 'FayTestG',
            familyName =&gt; 'FayTestF',
            fullName   =&gt; 'Fayland Lam',
            Notes     =&gt; 'just a note',
            primaryMail =&gt; 'primary@example.com',
            displayName =&gt; 'FayTest Dis',
            secondaryMail =&gt; 'secndary@test.com',
        } );
        print "Create OK" if $status;
    
        my @contacts = $gcontacts-&gt;get_contacts;
        foreach my $contact (@contacts) {
            print "$contact-&gt;{name}: " . join(', ', @{ $contact-&gt;{emails} }) . "\n";
            $gcontacts-&gt;delete_contact($contact-&gt;{id}) if $contact-&gt;{name} eq 'Test';
        }

DESCRIPTION
    This module implements 'Google Contacts Data API' according
    &lt;http://code.google.com/apis/contacts/docs/3.0/developers_guide_protocol
    .html&gt;

  METHODS
    *   new/login

            my $gcontacts = WWW::Google::Contacts-&gt;new();
            $gcontacts-&gt;login('fayland@gmail.com', 'pass') or die 'login failed';

    *   create_contact

            $gcontacts-&gt;create_contact( {
                givenName =&gt; 'FayTestG',
                familyName =&gt; 'FayTestF',
                fullName   =&gt; 'Fayland Lam',
                Notes     =&gt; 'just a note',
                primaryMail =&gt; 'primary@example.com',
                displayName =&gt; 'FayTest Dis',
                secondaryMail =&gt; 'secndary@test.com',
            } );

        return 1 if created

    *   get_contacts

            my @contacts = $gcontacts-&gt;get_contacts;
            my @contacts = $gcontacts-&gt;get_contacts( {
                group =&gt; 'thin', # default to 'full'
            } )
            my @contacts = $gcontacts-&gt;get_contacts( {
                updated-min =&gt; '2007-03-16T00:00:00',
                start-index =&gt; 10,
                max-results =&gt; 99, # default as 9999
            } );

        get contacts from this account.

        "group" refers
        &lt;http://code.google.com/apis/contacts/docs/2.0/reference.html#Projec
        tions&gt;

        "start-index", "max_results" etc refer
        &lt;http://code.google.com/apis/contacts/docs/2.0/reference.html#Parame
        ters&gt;

    *   update_contact

        TODO

    *   delete_contact($id)

            my $status = $gcontacts-&gt;delete_contact('http://www.google.com/m8/feeds/contacts/account%40gmail.com/base/1');

        The id is from "get_contacts".

    *   create_group

            my $status = $gcontacts-&gt;create_group( { title =&gt; 'Test Group' } );
            my $status = $gcontacts-&gt;create_group( { title =&gt; 'Test Group' } );

    *   get_groups

            my @groups = $gcontacts-&gt;get_groups;
            my @groups = $gcontacts-&gt;get_groups( {
                updated-min =&gt; '2007-03-16T00:00:00',
                start-index =&gt; 10,
                max-results =&gt; 99, # default as 9999
            } );

        Get all groups.

    *   delete_group

            my $status = $gcontacts-&gt;delete_contact('http://www.google.com/m8/feeds/groups/account%40gmail.com/full/2');

  ACKNOWLEDGE
    John Clyde - who share me with his code about Contacts API

AUTHOR
      Fayland Lam &lt;fayland@gmail.com&gt;

COPYRIGHT AND LICENSE
    This software is copyright (c) 2010 by Fayland Lam.

    This is free software; you can redistribute it and/or modify it under
    the same terms as perl itself.

</pre></body></html>