line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Face::Response::Account; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
116
|
use 5.006; |
|
6
|
|
|
|
|
19
|
|
|
6
|
|
|
|
|
234
|
|
4
|
6
|
|
|
6
|
|
35
|
use strict; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
177
|
|
5
|
6
|
|
|
6
|
|
32
|
use warnings; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
3228
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
WebService::Face::Response::Account |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.04 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
WebService::Face::Response::Account wraps the data returned by the server for account data |
22
|
|
|
|
|
|
|
(limits, users, namespacs) |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
It provides a simple OO interface to access the data |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
For a better understanding of the data structure you can read : |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=over 4 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=item * L |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item * L |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=item * L |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=back |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 new ( \%params ) |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
The constructor for the WebService::Face::Response::Account class |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub new { |
47
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
48
|
0
|
|
|
|
|
|
my $params = shift; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my $self = {}; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
for my $key ( keys %$params ) { |
53
|
0
|
|
|
|
|
|
$self->{$key} = $params->{$key}; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
return bless( $self, $class ); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 used () |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Getter for the 'used' attribute |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub used { |
66
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
return $self->{'used'}; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 remaining () |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Getter for the 'remaining' attribute |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub remaining { |
78
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
return $self->{'remaining'}; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 limit () |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Getter for the 'limit' attribute |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub limit { |
90
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
return $self->{'limit'}; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 reset_time_text () |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Getter for the 'reset_time_text' attribute |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub reset_time_text { |
102
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
103
|
|
|
|
|
|
|
|
104
|
0
|
|
|
|
|
|
return $self->{'reset_time_text'}; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 reset_time () |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Getter for the 'reset_time' attribute |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub reset_time { |
114
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
|
return $self->{'reset_time'}; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head2 namespace_limit () |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Getter for the 'namespace_limit' attribute |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=cut |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
sub namespace_limit { |
126
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
127
|
|
|
|
|
|
|
|
128
|
0
|
|
|
|
|
|
return $self->{'namespace_limit'}; |
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head2 namespace_used () |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Getter for the 'namespace_used' attribute |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=cut |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub namespace_used { |
138
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
139
|
|
|
|
|
|
|
|
140
|
0
|
|
|
|
|
|
return $self->{'namespace_used'}; |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 namespace_remaining () |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Getter for the 'namespace_remaining' attribute |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub namespace_remaining { |
150
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
151
|
|
|
|
|
|
|
|
152
|
0
|
|
|
|
|
|
return $self->{'namespace_remaining'}; |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 users () |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Getter for the 'users' attribute |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=cut |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
sub users { |
162
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
163
|
0
|
|
|
|
|
|
my @users; |
164
|
|
|
|
|
|
|
|
165
|
0
|
|
|
|
|
|
for my $ns ( keys %{ $self->{'users'} } ) { |
|
0
|
|
|
|
|
|
|
166
|
0
|
|
|
|
|
|
push @users, @{ $self->{'users'}{$ns} }; |
|
0
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
0
|
|
|
|
|
|
return @users; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=head2 namespaces () |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
Getter for the 'namespaces' attribute |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=cut |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
sub namespaces { |
179
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
180
|
|
|
|
|
|
|
|
181
|
0
|
|
|
|
|
|
return @{ $self->{'namespaces'} }; |
|
0
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head2 limits () |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
Getter for the 'limits' attribute |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=cut |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
sub limits { |
191
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
return ( |
194
|
0
|
|
|
|
|
|
used => $self->used, |
195
|
|
|
|
|
|
|
remaining => $self->remaining, |
196
|
|
|
|
|
|
|
limit => $self->limit, |
197
|
|
|
|
|
|
|
reset_time_text => $self->reset_time_text, |
198
|
|
|
|
|
|
|
reset_time => $self->reset_time, |
199
|
|
|
|
|
|
|
namespace_limit => $self->namespace_limit, |
200
|
|
|
|
|
|
|
namespace_used => $self->namespace_used, |
201
|
|
|
|
|
|
|
namespace_remaining => $self->namespace_remaining |
202
|
|
|
|
|
|
|
); |
203
|
|
|
|
|
|
|
} |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=head1 AUTHOR |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
Arnaud (Arhuman) ASSAD, C<< >> |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
=head1 BUGS |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
Please report any bugs or feature requests to C< arhuman at gmail.com>, or through |
212
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
213
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=head1 SUPPORT |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
perldoc WebService::Face::Client |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
You can also look for information at: |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
=over 4 |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
=item * Github repository |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
L |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
L |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=item * CPAN Ratings |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
L |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
=back |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
More information about Face.com service : |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
L |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
Thanks to Face.com for the service they provide. |
246
|
|
|
|
|
|
|
Thanks to Jaguar Network for allowing me to publish my work. |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
Copyright 2012 Arnaud (Arhuman) ASSAD. |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
253
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
254
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=cut |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
1; |