line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Google::Contacts::GroupList; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$WWW::Google::Contacts::GroupList::VERSION = '0.39'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
17
|
|
|
17
|
|
101
|
use Moose; |
|
17
|
|
|
|
|
41
|
|
|
17
|
|
|
|
|
184
|
|
7
|
17
|
|
|
17
|
|
119482
|
use WWW::Google::Contacts::Group; |
|
17
|
|
|
|
|
49
|
|
|
17
|
|
|
|
|
1903
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'WWW::Google::Contacts::Base'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'WWW::Google::Contacts::Roles::List'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub baseurl { |
14
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
15
|
0
|
|
|
|
|
|
return sprintf( "%s://www.google.com/m8/feeds/groups/default", |
16
|
|
|
|
|
|
|
$self->server->protocol ); |
17
|
|
|
|
|
|
|
} |
18
|
0
|
|
|
0
|
0
|
|
sub element_class { 'WWW::Google::Contacts::Group' } |
19
|
|
|
|
|
|
|
|
20
|
17
|
|
|
17
|
|
111
|
no Moose; |
|
17
|
|
|
|
|
38
|
|
|
17
|
|
|
|
|
103
|
|
21
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
22
|
|
|
|
|
|
|
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 |