line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Flickr::API2; |
2
|
4
|
|
|
4
|
|
15613
|
use 5.12.0; |
|
4
|
|
|
|
|
9
|
|
3
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
108
|
|
4
|
4
|
|
|
4
|
|
1284
|
use Flickr::API2::Request; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
84
|
|
5
|
4
|
|
|
4
|
|
1357
|
use Flickr::API2::Photos; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
102
|
|
6
|
4
|
|
|
4
|
|
1609
|
use Flickr::API2::Test; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
102
|
|
7
|
4
|
|
|
4
|
|
1443
|
use Flickr::API2::Interestingness; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
81
|
|
8
|
4
|
|
|
4
|
|
1304
|
use Flickr::API2::People; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
83
|
|
9
|
4
|
|
|
4
|
|
1427
|
use Flickr::API2::Raw; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
805
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '2.50'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
5
|
|
|
5
|
1
|
7250
|
my $class = shift; |
15
|
5
|
|
|
|
|
8
|
my $options = shift; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
croak("You must supply an API key and secret to the constructor") |
18
|
5
|
100
|
33
|
|
|
39
|
unless $options->{key} and $options->{secret}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my $self = { |
21
|
|
|
|
|
|
|
_raw => Flickr::API2::Raw->new($options), |
22
|
|
|
|
|
|
|
rest_uri => $options->{rest_uri} |
23
|
4
|
|
50
|
|
|
14
|
|| 'https://api.flickr.com/services/rest/', |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
|
26
|
4
|
|
|
|
|
13
|
bless $self, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub execute_method { |
30
|
10
|
|
|
10
|
1
|
1043
|
my ( $self, $method, $args ) = @_; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $request = Flickr::API2::Request->new( |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
method => $method, |
35
|
|
|
|
|
|
|
args => $args, |
36
|
|
|
|
|
|
|
rest_uri => $self->{rest_uri} |
37
|
|
|
|
|
|
|
} |
38
|
10
|
|
|
|
|
101
|
); |
39
|
|
|
|
|
|
|
|
40
|
10
|
|
|
|
|
41
|
$self->raw->execute_request($request); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub raw { |
44
|
11
|
|
|
11
|
1
|
465
|
shift->{_raw}; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub photos { |
48
|
2
|
|
|
2
|
1
|
971
|
Flickr::API2::Photos->new( api => shift ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub test { |
52
|
0
|
|
|
0
|
1
|
0
|
Flickr::API2::Test->new( api => shift ); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub interestingness { |
56
|
1
|
|
|
1
|
1
|
368
|
Flickr::API2::Interestingness->new( api => shift ); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub people { |
60
|
3
|
|
|
3
|
1
|
72
|
Flickr::API2::People->new( api => shift ); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
__END__ |