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