| 1 | package Net::Async::Spotify::API::Generated::Markets; | ||||||||||||
| 2 | |||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 2 | our $VERSION = '0.002'; # VERSION | |||||||||||
| 7 | 2 | our $AUTHORITY = 'cpan:VNEALV'; # AUTHORITY | |||||||||||
| 8 | |||||||||||||
| 9 | 2 | ▶ | use mro; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | 2 | ▶ | use parent qw(Net::Async::Spotify::API::Base); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | |||||||||||||
| 12 | 2 | ▶ | use Future::AsyncAwait; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | |||||||||||||
| 14 | =encoding utf8 | ||||||||||||
| 15 | |||||||||||||
| 16 | =head1 NAME | ||||||||||||
| 17 | |||||||||||||
| 18 | Net::Async::Spotify::API::Generated::Markets - Package representing Spotify Markets API | ||||||||||||
| 19 | |||||||||||||
| 20 | =head1 DESCRIPTION | ||||||||||||
| 21 | |||||||||||||
| 22 | Autogenerated module. | ||||||||||||
| 23 | Based on https://developer.spotify.com/documentation/web-api/reference/#reference-index | ||||||||||||
| 24 | Check C<crawl-api-doc.pl> for more information. | ||||||||||||
| 25 | |||||||||||||
| 26 | =head1 METHODS | ||||||||||||
| 27 | |||||||||||||
| 28 | =cut | ||||||||||||
| 29 | |||||||||||||
| 30 | 0 | ▶ | sub mapping { shift->{mapping} } | ||||||||||
|
Subroutine
mapping: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 31 | |||||||||||||
| 32 | =head2 get_available_markets | ||||||||||||
| 33 | |||||||||||||
| 34 | get_available_markets - Get Available Markets | ||||||||||||
| 35 | |||||||||||||
| 36 | Get the list of markets where Spotify is available. | ||||||||||||
| 37 | |||||||||||||
| 38 | with Request details being: | ||||||||||||
| 39 | |||||||||||||
| 40 | =head3 header | ||||||||||||
| 41 | |||||||||||||
| 42 | =over 4 | ||||||||||||
| 43 | |||||||||||||
| 44 | =item Authorization | ||||||||||||
| 45 | |||||||||||||
| 46 | Type: string | Required: required | ||||||||||||
| 47 | A valid user access token or your client credentials. | ||||||||||||
| 48 | |||||||||||||
| 49 | =back | ||||||||||||
| 50 | |||||||||||||
| 51 | and Response Objects being: | ||||||||||||
| 52 | |||||||||||||
| 53 | - error object | ||||||||||||
| 54 | |||||||||||||
| 55 | |||||||||||||
| 56 | On success, the HTTP status code in the response header is 200 OK and the response body contains a list of the countries in which Spotify is available, identified by their ISO 3166-1 alpha-2 country code with additional country codes for special territories. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console | ||||||||||||
| 57 | |||||||||||||
| 58 | =cut | ||||||||||||
| 59 | |||||||||||||
| 60 | 0 | ▶ | async sub get_available_markets { | ||||||||||
|
Subroutine
get_available_markets: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 61 | 0 | my ($self, %args) = @_; | |||||||||||
| 62 | |||||||||||||
| 63 | 0 | my $mapping = $self->mapping; | |||||||||||
| 64 | 0 | ▶ | my $request->{method} = $mapping->{get_available_markets}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_available_markets"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_available_markets"}{"method"} // "GET"
$mapping->{"get_available_markets"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_available_markets"}{"method"}
| |||||||||||||
| 65 | 0 | ▶ | $request->{uri} = $mapping->{get_available_markets}{uri} // 'https://api.spotify.com/v1/markets'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_available_markets"}{"uri"} // "https://api.spotify.com/v1/markets"
MC/DC0%0/1
$mapping->{"get_available_markets"}{"uri"} // "https://api.spotify.com/v1/markets"
$mapping->{"get_available_markets"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_available_markets"}{"uri"}
| |||||||||||||
| 66 | $request->{param} = $mapping->{get_available_markets}{param} // { | ||||||||||||
| 67 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_available_markets"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"get_available_markets"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}}
$mapping->{"get_available_markets"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_available_markets"}{"param"}
| |||||||||||||
| 68 | 'Authorization' => { | ||||||||||||
| 69 | type => 'string', | ||||||||||||
| 70 | required => 'required', | ||||||||||||
| 71 | }, | ||||||||||||
| 72 | }, | ||||||||||||
| 73 | }; | ||||||||||||
| 74 | my $response_objs = $mapping->{get_available_markets}{response} // [ | ||||||||||||
| 75 | 0 | ▶ | 'error object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_available_markets"}{"response"} // ["error object"]
MC/DC0%0/1
$mapping->{"get_available_markets"}{"response"} // ["error object"]
$mapping->{"get_available_markets"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_available_markets"}{"response"}
| |||||||||||||
| 76 | |||||||||||||
| 77 | ]; | ||||||||||||
| 78 | |||||||||||||
| 79 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 80 | 2 | } | |||||||||||
| 81 | |||||||||||||
| 82 | 2 | 1; | |||||||||||