| 1 | package Net::Async::Spotify::API::Search; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | our $VERSION = '0.002'; # VERSION | |||||||||
| 7 | 1 | our $AUTHORITY = 'cpan:VNEALV'; # AUTHORITY | |||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use mro; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use parent qw(Net::Async::Spotify::API::Generated::Search); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | ▶ | use Log::Any qw($log); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 1 | ▶ | use Syntax::Keyword::Try; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 1 | ▶ | use JSON::MaybeUTF8 qw(:v1); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 1 | ▶ | use Net::Async::Spotify::Object; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | |||||||||||
| 17 | =encoding utf8 | ||||||||||
| 18 | |||||||||||
| 19 | =head1 NAME | ||||||||||
| 20 | |||||||||||
| 21 | Net::Async::Spotify::API::Search - Package representing Main Spotify Search API | ||||||||||
| 22 | |||||||||||
| 23 | =head1 DESCRIPTION | ||||||||||
| 24 | |||||||||||
| 25 | Main module for an Autogenerated one L<Net::Async::Spotify::API::Generated::Search>. | ||||||||||
| 26 | Will hold all extra functionality for Spotify Search API | ||||||||||
| 27 | |||||||||||
| 28 | =head1 METHODS | ||||||||||
| 29 | |||||||||||
| 30 | =cut | ||||||||||
| 31 | |||||||||||
| 32 | 0 | ▶ | sub parser { | ||||||||
|
Subroutine
parser: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 33 | 0 | my ( $self, $decoded_res, $expected ) = @_; | |||||||||
| 34 | |||||||||||
| 35 | 0 | my $mapped_res; | |||||||||
| 36 | 0 | ▶ | $mapped_res = $decoded_res ? Net::Async::Spotify::Object->new($decoded_res, $expected) : $decoded_res; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | |||||||||||
| 38 | 0 | return $mapped_res; | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 0 | ▶ | sub parse_response { | ||||||||
|
Subroutine
parse_response: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 42 | 0 | my ( $self, $decoded_res, $expected ) = @_; | |||||||||
| 43 | |||||||||||
| 44 | try { | ||||||||||
| 45 | 0 | ▶ | return $decoded_res ? Net::Async::Spotify::Object->new($decoded_res, $expected) : $decoded_res; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 46 | 0 | } catch ($e) { | |||||||||
| 47 | 0 | $log->warnf('Could not Map Spotify API Response to its Object %s | Error: %s | data: %s', $expected, $e, $decoded_res); | |||||||||
| 48 | 0 | return $decoded_res; | |||||||||
| 49 | } | ||||||||||
| 50 | } | ||||||||||
| 51 | 1 | 1; | |||||||||