line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Spotify::Lookup; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
70257
|
use strict; |
|
3
|
|
|
|
|
24
|
|
|
3
|
|
|
|
|
113
|
|
4
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
85
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
15
|
use base 'Net::Spotify::Service'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
1440
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub format_request { |
11
|
3
|
|
|
3
|
1
|
27659
|
my ($self, %parameters) = @_; |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
|
|
22
|
my $base_url = $self->base_url(); |
14
|
3
|
|
|
|
|
19
|
my $version = $self->version(); |
15
|
|
|
|
|
|
|
|
16
|
3
|
|
|
|
|
37
|
my $uri = URI->new("$base_url/lookup/$version/"); |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
|
|
25143
|
foreach my $key (qw(uri extras)) { |
19
|
6
|
100
|
66
|
|
|
744
|
if (exists $parameters{$key} && $parameters{$key}) { |
20
|
5
|
|
|
|
|
35
|
$uri->query_param($key, $parameters{$key}); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
|
|
403
|
return HTTP::Request->new('GET', $uri); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |