line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::NHKProgram::API::Provider::List; |
2
|
1
|
|
|
1
|
|
1607
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
5
|
1
|
|
|
1
|
|
17
|
use JSON (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
6
|
1
|
|
|
1
|
|
5
|
use WWW::NHKProgram::API::Area qw/fetch_area_id/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
7
|
1
|
|
|
1
|
|
7
|
use WWW::NHKProgram::API::Service qw/fetch_service_id/; |
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
53
|
|
8
|
1
|
|
|
1
|
|
6
|
use WWW::NHKProgram::API::Date; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
9
|
1
|
|
|
1
|
|
6
|
use WWW::NHKProgram::API::Provider::Common; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
177
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub call { |
12
|
0
|
|
|
0
|
0
|
|
my ($class, $context, $arg, $raw) = @_; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
my $area = fetch_area_id($arg->{area}); |
15
|
0
|
|
|
|
|
|
my $service = fetch_service_id($arg->{service}); |
16
|
0
|
|
|
|
|
|
my $date = WWW::NHKProgram::API::Date::validate($arg->{date}); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $content = WWW::NHKProgram::API::Provider::Common::call( |
19
|
|
|
|
|
|
|
$context, |
20
|
|
|
|
|
|
|
"list/%(area)s/%(service)s/%(date)s.json", |
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
area => $area, |
23
|
|
|
|
|
|
|
service => $service, |
24
|
|
|
|
|
|
|
date => $date, |
25
|
|
|
|
|
|
|
}, |
26
|
|
|
|
|
|
|
$raw, |
27
|
|
|
|
|
|
|
); |
28
|
0
|
0
|
|
|
|
|
return $content if $raw; |
29
|
0
|
|
|
|
|
|
return JSON::decode_json($content)->{list}->{$service}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|