blib/lib/WebService/Annict/Records.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::Records; | ||||||
2 | 3 | 3 | 13101 | use 5.008001; | |||
3 | 6 | ||||||
3 | 3 | 3 | 12 | use strict; | |||
3 | 3 | ||||||
3 | 57 | ||||||
4 | 3 | 3 | 10 | use warnings; | |||
3 | 3 | ||||||
3 | 64 | ||||||
5 | |||||||
6 | 3 | 3 | 449 | use URI; | |||
3 | 5512 | ||||||
3 | 244 | ||||||
7 | |||||||
8 | sub new { | ||||||
9 | 1 | 1 | 0 | 9 | 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/records"); | |||||
19 | |||||||
20 | 0 | $url->query_form(\%args); | |||||
21 | 0 | $self->{ua}->get($url->as_string); | |||||
22 | } | ||||||
23 | |||||||
24 | 1; |