blib/lib/WebService/Annict/Episodes.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 17 | 76.4 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 6 | 83.3 |
pod | 0 | 2 | 0.0 |
total | 18 | 25 | 72.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package WebService::Annict::Episodes; | ||||||
2 | 3 | 3 | 12638 | use 5.008001; | |||
3 | 6 | ||||||
3 | 3 | 3 | 10 | use strict; | |||
3 | 3 | ||||||
3 | 43 | ||||||
4 | 3 | 3 | 7 | use warnings; | |||
3 | 3 | ||||||
3 | 51 | ||||||
5 | |||||||
6 | 3 | 3 | 436 | use URI; | |||
3 | 5317 | ||||||
3 | 282 | ||||||
7 | |||||||
8 | sub new { | ||||||
9 | 1 | 1 | 0 | 7 | my ($class, $ua) = @_; | ||
10 | |||||||
11 | 1 | 4 | bless { | ||||
12 | ua => $ua, | ||||||
13 | }, $class; | ||||||
14 | } | ||||||
15 | |||||||
16 | sub get { | ||||||
17 | 0 | 0 | 0 | my ($self, %args) = @_; | |||
18 | 0 | my $url = URI->new("https://api.annict.com/v1/"); | |||||
19 | |||||||
20 | 0 | $url->query_form(\%args); | |||||
21 | 0 | $self->{ua}->get($url->as_string); | |||||
22 | } | ||||||
23 | |||||||
24 | 1; |