| 1 | package WebService::Annict::Works; | ||
| 2 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 2 | ▶ | use URI; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use HTTP::Request::Common; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | sub new { | ||
| 9 | 1 | ▶ | my ($class, $ua) = @_; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 10 | |||
| 11 | 1 | bless { | |
| 12 | ua => $ua, | ||
| 13 | }, $class; | ||
| 14 | } | ||
| 15 | |||
| 16 | sub get { | ||
| 17 | 0 | ▶ | my ($self, %args) = @_; |
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 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 | 2 | 1; | |