line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Flickr::API2; |
2
|
4
|
|
|
4
|
|
27784
|
use 5.10.1; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
162
|
|
3
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
116
|
|
4
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
120
|
|
5
|
4
|
|
|
4
|
|
2216
|
use Flickr::API2::Request; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
103
|
|
6
|
4
|
|
|
4
|
|
2085
|
use Flickr::API2::Photos; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
112
|
|
7
|
4
|
|
|
4
|
|
2433
|
use Flickr::API2::Test; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
115
|
|
8
|
4
|
|
|
4
|
|
2096
|
use Flickr::API2::Interestingness; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
115
|
|
9
|
4
|
|
|
4
|
|
2226
|
use Flickr::API2::People; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
106
|
|
10
|
4
|
|
|
4
|
|
2149
|
use Flickr::API2::Raw; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
1103
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '2.10'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
5
|
|
|
5
|
1
|
9950
|
my $class = shift; |
16
|
5
|
|
|
|
|
14
|
my $options = shift; |
17
|
|
|
|
|
|
|
|
18
|
5
|
100
|
66
|
|
|
67
|
croak("You must supply an API key and secret to the constructor") |
19
|
|
|
|
|
|
|
unless $options->{key} and $options->{secret}; |
20
|
|
|
|
|
|
|
|
21
|
4
|
|
50
|
|
|
24
|
my $self = { |
22
|
|
|
|
|
|
|
_raw => Flickr::API2::Raw->new($options), |
23
|
|
|
|
|
|
|
rest_uri => $options->{rest_uri} |
24
|
|
|
|
|
|
|
|| 'https://api.flickr.com/services/rest/', |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
4
|
|
|
|
|
17
|
bless $self, $class; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub execute_method { |
31
|
10
|
|
|
10
|
1
|
1402
|
my ( $self, $method, $args ) = @_; |
32
|
|
|
|
|
|
|
|
33
|
10
|
|
|
|
|
125
|
my $request = Flickr::API2::Request->new( |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
method => $method, |
36
|
|
|
|
|
|
|
args => $args, |
37
|
|
|
|
|
|
|
rest_uri => $self->{rest_uri} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
10
|
|
|
|
|
48
|
$self->raw->execute_request($request); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub raw { |
45
|
11
|
|
|
11
|
1
|
625
|
shift->{_raw}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub photos { |
49
|
2
|
|
|
2
|
1
|
1278
|
Flickr::API2::Photos->new( api => shift ); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub test { |
53
|
0
|
|
|
0
|
1
|
0
|
Flickr::API2::Test->new( api => shift ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub interestingness { |
57
|
1
|
|
|
1
|
1
|
711
|
Flickr::API2::Interestingness->new( api => shift ); |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub people { |
61
|
3
|
|
|
3
|
1
|
62
|
Flickr::API2::People->new( api => shift ); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
__END__ |