line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Flickr::Tools::Cameras; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
93419
|
use Flickr::API::Cameras; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use Types::Standard qw ( InstanceOf ); |
5
|
|
|
|
|
|
|
use Carp; |
6
|
|
|
|
|
|
|
use Moo; |
7
|
|
|
|
|
|
|
use strictures 2; |
8
|
|
|
|
|
|
|
use namespace::clean; |
9
|
|
|
|
|
|
|
use 5.010; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '1.21_02'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
extends 'Flickr::Tools'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has '+_api_name' => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
isa => sub { $_[0] =~ m/^Flickr::API::Cameras$/ }, |
19
|
|
|
|
|
|
|
required => 1, |
20
|
|
|
|
|
|
|
default => "Flickr::API::Cameras", |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub getBrands { |
25
|
|
|
|
|
|
|
my ($self, $args) = @_; |
26
|
|
|
|
|
|
|
my $brands; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
if (defined($args->{list_type}) and $args->{list_type} =~ m/list/i) { |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$brands = $self->{_api}->brands_list; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
else { |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$brands = $self->{_api}->brands_hash; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
return $brands; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub getBrandModels { |
45
|
|
|
|
|
|
|
my ($self, $args) = @_; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
my $rsp = {}; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
if (exists($args->{Brand})) { |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
$rsp = $self->{_api}->get_cameras($args->{Brand}); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
return $rsp; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
__END__ |