File Coverage

blib/lib/WebService/Annict/Works.pm
Criterion Covered Total %
statement 14 18 77.7
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 2 0.0
total 19 26 73.0


line stmt bran cond sub pod time code
1             package WebService::Annict::Works;
2 2     2   60399 use strict;
  2         2  
  2         52  
3 2     2   8 use warnings;
  2         3  
  2         51  
4              
5 2     2   7 use URI;
  2         1  
  2         32  
6 2     2   899 use HTTP::Request::Common;
  2         3311  
  2         249  
7              
8             sub new {
9 1     1 0 2422 my ($class, $ua) = @_;
10              
11 1         5 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/works");
19              
20 0           $url->query_form(\%args);
21 0           $self->{ua}->get($url->as_string);
22             }
23              
24             1;