File Coverage

blib/lib/WebService/Annict/Works.pm
Criterion Covered Total %
statement 16 20 80.0
branch n/a
condition n/a
subroutine 6 7 85.7
pod 0 2 0.0
total 22 29 75.8


line stmt bran cond sub pod time code
1             package WebService::Annict::Works;
2 3     3   47594 use 5.008001;
  3         8  
3 3     3   9 use strict;
  3         3  
  3         49  
4 3     3   8 use warnings;
  3         3  
  3         65  
5              
6 3     3   10 use URI;
  3         3  
  3         51  
7 3     3   1266 use HTTP::Request::Common;
  3         4728  
  3         366  
8              
9             sub new {
10 2     2 0 1972 my ($class, $ua) = @_;
11              
12 2         8 bless {
13             ua => $ua,
14             }, $class;
15             }
16              
17             sub get {
18 0     0 0   my ($self, %args) = @_;
19 0           my $url = URI->new("https://api.annict.com/v1/works");
20              
21 0           $url->query_form(\%args);
22 0           $self->{ua}->get($url->as_string);
23             }
24              
25             1;