line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Plurk::Friend; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
24
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
143
|
|
4
|
4
|
|
|
4
|
|
22
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
141
|
|
5
|
4
|
|
|
4
|
|
22
|
use Carp; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
566
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
WWW::Plurk::Friend - A plurk friend |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
This document describes WWW::Plurk::Friend version 0.02 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use WWW::Plurk; |
22
|
|
|
|
|
|
|
my $plurk = WWW::Plurk->new( 'username', 'password' ); |
23
|
|
|
|
|
|
|
my @friends = $plurk->friends; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 DESCRIPTION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Represents a user other than the logged in user. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Based on Ryan Lim's unofficial PHP API: L |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
BEGIN { |
34
|
4
|
|
|
4
|
|
16
|
my @INFO = qw( |
35
|
|
|
|
|
|
|
display_name |
36
|
|
|
|
|
|
|
full_name |
37
|
|
|
|
|
|
|
gender |
38
|
|
|
|
|
|
|
has_profile_image |
39
|
|
|
|
|
|
|
id |
40
|
|
|
|
|
|
|
is_channel |
41
|
|
|
|
|
|
|
karma |
42
|
|
|
|
|
|
|
location |
43
|
|
|
|
|
|
|
nick_name |
44
|
|
|
|
|
|
|
page_title |
45
|
|
|
|
|
|
|
relationship |
46
|
|
|
|
|
|
|
star_reward |
47
|
|
|
|
|
|
|
uid |
48
|
|
|
|
|
|
|
plurk |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
4
|
|
|
|
|
12
|
for my $info ( @INFO ) { |
52
|
4
|
|
|
4
|
|
21
|
no strict 'refs'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
237
|
|
53
|
56
|
|
|
0
|
|
204
|
*{$info} = sub { shift->{$info} }; |
|
56
|
|
|
|
|
695
|
|
|
0
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 INTERFACE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 C<< new >> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Called internally. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub new { |
66
|
0
|
|
|
0
|
1
|
|
my ( $class, $plurk, $uid, $detail ) = @_; |
67
|
0
|
|
|
|
|
|
return bless { |
68
|
|
|
|
|
|
|
plurk => $plurk, |
69
|
|
|
|
|
|
|
uid => $uid, |
70
|
|
|
|
|
|
|
%$detail, |
71
|
|
|
|
|
|
|
}, $class; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 C<< friends >> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Get this user's friends. See L for more details. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub friends { |
81
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
82
|
0
|
|
|
|
|
|
return $self->plurk->friends_for( $self ); |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 Accessors |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
The following accessors provide access to the content of this Plurk: |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=over |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=item * C<< display_name >> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * C<< full_name >> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item * C<< gender >> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * C<< has_profile_image >> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item * C<< id >> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * C<< is_channel >> |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item * C<< karma >> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * C<< location >> |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item * C<< nick_name >> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * C<< page_title >> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item * C<< relationship >> |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item * C<< star_reward >> |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item * C<< uid >> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item * C<< plurk >> |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=back |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
1; |
124
|
|
|
|
|
|
|
__END__ |