| 1 | package WWW::Google::Contacts::GroupList; | ||
| 2 | { | ||
| 3 | 17 | $WWW::Google::Contacts::GroupList::VERSION = '0.38'; | |
| 4 | } | ||
| 5 | |||
| 6 | 17 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 17 | ▶ | use WWW::Google::Contacts::Group; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 17 | extends 'WWW::Google::Contacts::Base'; | |
| 10 | |||
| 11 | 17 | with 'WWW::Google::Contacts::Roles::List'; | |
| 12 | |||
| 13 | sub baseurl { | ||
| 14 | 0 | ▶ | my $self = shift; |
|
Subroutine
baseurl: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 15 | 0 | return sprintf( "%s://www.google.com/m8/feeds/groups/default", | |
| 16 | $self->server->protocol ); | ||
| 17 | } | ||
| 18 | 0 | ▶ | sub element_class { 'WWW::Google::Contacts::Group' } |
|
Subroutine
element_class: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 19 | |||
| 20 | 17 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 17 | __PACKAGE__->meta->make_immutable; | |
| 22 | 17 | 1; | |
| 23 | __END__ | ||
| 24 | |||
| 25 | |||
| 26 | =head1 SYNOPSIS | ||
| 27 | |||
| 28 | use WWW::Google::Contacts; | ||
| 29 | |||
| 30 | my $google = WWW::Google::Contacts->new( username => "your.username", password => "your.password" ); | ||
| 31 | |||
| 32 | my $groups = $google->groups; | ||
| 33 | |||
| 34 | while ( my $gr = $groups->next ) { | ||
| 35 | print "You got a contact group called " . $gr->title . "\n"; | ||
| 36 | } | ||
| 37 | |||
| 38 | =head1 METHODS | ||
| 39 | |||
| 40 | =head2 $groups->next | ||
| 41 | |||
| 42 | Returns the next L<WWW::Google::Contacts::Group> object | ||
| 43 | |||
| 44 | =head2 $groups->search( $args ) | ||
| 45 | |||
| 46 | B<WARNING> This is quite slow at the moment, at least if you've got a lot of contacts. | ||
| 47 | |||
| 48 | Given search criteria, will return all your contacts that matches critera. | ||
| 49 | |||
| 50 | my @spam_groups = $groups->search({ | ||
| 51 | title => "Spam", | ||
| 52 | }); | ||
| 53 | |||
| 54 | B<TODO>: Speed up. Make search arguments more flexible ( AND / OR / Regex / ... ). | ||
| 55 | |||
| 56 | =head1 AUTHOR | ||
| 57 | |||
| 58 | Magnus Erixzon <magnus@erixzon.com> | ||
| 59 | |||
| 60 | =head1 COPYRIGHT AND LICENSE | ||
| 61 | |||
| 62 | This software is copyright (c) 2010 by Magnus Erixzon / Fayland Lam. | ||
| 63 | |||
| 64 | This is free software; you can redistribute it and/or modify it under | ||
| 65 | the same terms as perl itself. | ||
| 66 | |||
| 67 | =cut | ||