« lib/Net/Async/Spotify/API/Generated/Tracks.pm
↑ Summary
lib/Net/Async/Spotify/API/Generated/Shows.pm »
| 1 | package Net::Async::Spotify::API::Generated::Albums; | ||||||||||||
| 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::Albums - Package representing Spotify Albums 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_an_album | ||||||||||||
| 33 | |||||||||||||
| 34 | get_an_album - Get an Album | ||||||||||||
| 35 | |||||||||||||
| 36 | Get Spotify catalog information for a single album. | ||||||||||||
| 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 | =head3 path_parameter | ||||||||||||
| 52 | |||||||||||||
| 53 | =over 4 | ||||||||||||
| 54 | |||||||||||||
| 55 | =item id | ||||||||||||
| 56 | |||||||||||||
| 57 | Type: string | Required: required | ||||||||||||
| 58 | The Spotify ID of the album. | ||||||||||||
| 59 | |||||||||||||
| 60 | =back | ||||||||||||
| 61 | |||||||||||||
| 62 | =head3 query_parameter | ||||||||||||
| 63 | |||||||||||||
| 64 | =over 4 | ||||||||||||
| 65 | |||||||||||||
| 66 | =item market | ||||||||||||
| 67 | |||||||||||||
| 68 | Type: string | Required: optional | ||||||||||||
| 69 | The market you’d like to request. Synonym for country. | ||||||||||||
| 70 | |||||||||||||
| 71 | =back | ||||||||||||
| 72 | |||||||||||||
| 73 | and Response Objects being: | ||||||||||||
| 74 | |||||||||||||
| 75 | - album object | ||||||||||||
| 76 | |||||||||||||
| 77 | |||||||||||||
| 78 | On success, the HTTP status code in the response header is 200 OK and the response body contains an album object in JSON format. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console | ||||||||||||
| 79 | |||||||||||||
| 80 | =cut | ||||||||||||
| 81 | |||||||||||||
| 82 | 0 | ▶ | async sub get_an_album { | ||||||||||
|
Subroutine
get_an_album: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 83 | 0 | my ($self, %args) = @_; | |||||||||||
| 84 | |||||||||||||
| 85 | 0 | my $mapping = $self->mapping; | |||||||||||
| 86 | 0 | ▶ | my $request->{method} = $mapping->{get_an_album}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_an_album"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_an_album"}{"method"} // "GET"
$mapping->{"get_an_album"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_an_album"}{"method"}
| |||||||||||||
| 87 | 0 | ▶ | $request->{uri} = $mapping->{get_an_album}{uri} // 'https://api.spotify.com/v1/albums/{id}'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_an_album"}{"uri"} // "https://api.spotify.com/v1/albums/{id}"
MC/DC0%0/1
$mapping->{"get_an_album"}{"uri"} // "https://api.spotify.com/v1/albums/{id}"
$mapping->{"get_an_album"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_an_album"}{"uri"}
| |||||||||||||
| 88 | $request->{param} = $mapping->{get_an_album}{param} // { | ||||||||||||
| 89 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_an_album"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"market", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_an_album"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"market", {"type", "string", "required", "optional"}}}
$mapping->{"get_an_album"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_an_album"}{"param"}
| |||||||||||||
| 90 | 'Authorization' => { | ||||||||||||
| 91 | type => 'string', | ||||||||||||
| 92 | required => 'required', | ||||||||||||
| 93 | }, | ||||||||||||
| 94 | }, | ||||||||||||
| 95 | path_parameter => { | ||||||||||||
| 96 | 'id' => { | ||||||||||||
| 97 | type => 'string', | ||||||||||||
| 98 | required => 'required', | ||||||||||||
| 99 | }, | ||||||||||||
| 100 | }, | ||||||||||||
| 101 | query_parameter => { | ||||||||||||
| 102 | 'market' => { | ||||||||||||
| 103 | type => 'string', | ||||||||||||
| 104 | required => 'optional', | ||||||||||||
| 105 | }, | ||||||||||||
| 106 | }, | ||||||||||||
| 107 | }; | ||||||||||||
| 108 | my $response_objs = $mapping->{get_an_album}{response} // [ | ||||||||||||
| 109 | 0 | ▶ | 'album object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_an_album"}{"response"} // ["album object"]
MC/DC0%0/1
$mapping->{"get_an_album"}{"response"} // ["album object"]
$mapping->{"get_an_album"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_an_album"}{"response"}
| |||||||||||||
| 110 | |||||||||||||
| 111 | ]; | ||||||||||||
| 112 | |||||||||||||
| 113 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 114 | 2 | } | |||||||||||
| 115 | |||||||||||||
| 116 | =head2 get_an_albums_tracks | ||||||||||||
| 117 | |||||||||||||
| 118 | get_an_albums_tracks - Get an Album's Tracks | ||||||||||||
| 119 | |||||||||||||
| 120 | Get Spotify catalog information about an album’s tracks. | ||||||||||||
| 121 | Optional parameters can be used to limit the number of tracks returned. | ||||||||||||
| 122 | |||||||||||||
| 123 | with Request details being: | ||||||||||||
| 124 | |||||||||||||
| 125 | =head3 header | ||||||||||||
| 126 | |||||||||||||
| 127 | =over 4 | ||||||||||||
| 128 | |||||||||||||
| 129 | =item Authorization | ||||||||||||
| 130 | |||||||||||||
| 131 | Type: string | Required: required | ||||||||||||
| 132 | A valid user access token or your client credentials. | ||||||||||||
| 133 | |||||||||||||
| 134 | =back | ||||||||||||
| 135 | |||||||||||||
| 136 | =head3 path_parameter | ||||||||||||
| 137 | |||||||||||||
| 138 | =over 4 | ||||||||||||
| 139 | |||||||||||||
| 140 | =item id | ||||||||||||
| 141 | |||||||||||||
| 142 | Type: string | Required: required | ||||||||||||
| 143 | The Spotify ID of the album. | ||||||||||||
| 144 | |||||||||||||
| 145 | =back | ||||||||||||
| 146 | |||||||||||||
| 147 | =head3 query_parameter | ||||||||||||
| 148 | |||||||||||||
| 149 | =over 4 | ||||||||||||
| 150 | |||||||||||||
| 151 | =item limit | ||||||||||||
| 152 | |||||||||||||
| 153 | Type: integer | Required: optional | ||||||||||||
| 154 | The maximum number of tracks to return. Default: 20. Minimum: 1. Maximum: 50. | ||||||||||||
| 155 | |||||||||||||
| 156 | =item market | ||||||||||||
| 157 | |||||||||||||
| 158 | Type: string | Required: optional | ||||||||||||
| 159 | An ISO 3166-1 alpha-2 country code or the string from_token. | ||||||||||||
| 160 | Provide this parameter if you want to apply Track Relinking. | ||||||||||||
| 161 | |||||||||||||
| 162 | =item offset | ||||||||||||
| 163 | |||||||||||||
| 164 | Type: integer | Required: optional | ||||||||||||
| 165 | The index of the first track to return. Default: 0 (the first object). Use with limit to get the next set of tracks. | ||||||||||||
| 166 | |||||||||||||
| 167 | =back | ||||||||||||
| 168 | |||||||||||||
| 169 | and Response Objects being: | ||||||||||||
| 170 | |||||||||||||
| 171 | - album object | ||||||||||||
| 172 | |||||||||||||
| 173 | |||||||||||||
| 174 | On success, the HTTP status code in the response header is 200 OK and the response body contains an album object in JSON format. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console | ||||||||||||
| 175 | |||||||||||||
| 176 | =cut | ||||||||||||
| 177 | |||||||||||||
| 178 | 0 | ▶ | async sub get_an_albums_tracks { | ||||||||||
|
Subroutine
get_an_albums_tracks: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 179 | 0 | my ($self, %args) = @_; | |||||||||||
| 180 | |||||||||||||
| 181 | 0 | my $mapping = $self->mapping; | |||||||||||
| 182 | 0 | ▶ | my $request->{method} = $mapping->{get_an_albums_tracks}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_an_albums_tracks"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_an_albums_tracks"}{"method"} // "GET"
$mapping->{"get_an_albums_tracks"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_an_albums_tracks"}{"method"}
| |||||||||||||
| 183 | 0 | ▶ | $request->{uri} = $mapping->{get_an_albums_tracks}{uri} // 'https://api.spotify.com/v1/albums/{id}/tracks'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_an_albums_tracks"}{"uri"} // "https://api.spotify.com/v1/albums/{id}/tracks"
MC/DC0%0/1
$mapping->{"get_an_albums_tracks"}{"uri"} // "https://api.spotify.com/v1/albums/{id}/tracks"
$mapping->{"get_an_albums_tracks"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_an_albums_tracks"}{"uri"}
| |||||||||||||
| 184 | $request->{param} = $mapping->{get_an_albums_tracks}{param} // { | ||||||||||||
| 185 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_an_albums_tracks"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "market", {"type", "string", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_an_albums_tracks"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "market", {"type", "string", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
$mapping->{"get_an_albums_tracks"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_an_albums_tracks"}{"param"}
| |||||||||||||
| 186 | 'Authorization' => { | ||||||||||||
| 187 | type => 'string', | ||||||||||||
| 188 | required => 'required', | ||||||||||||
| 189 | }, | ||||||||||||
| 190 | }, | ||||||||||||
| 191 | path_parameter => { | ||||||||||||
| 192 | 'id' => { | ||||||||||||
| 193 | type => 'string', | ||||||||||||
| 194 | required => 'required', | ||||||||||||
| 195 | }, | ||||||||||||
| 196 | }, | ||||||||||||
| 197 | query_parameter => { | ||||||||||||
| 198 | 'limit' => { | ||||||||||||
| 199 | type => 'integer', | ||||||||||||
| 200 | required => 'optional', | ||||||||||||
| 201 | }, | ||||||||||||
| 202 | 'market' => { | ||||||||||||
| 203 | type => 'string', | ||||||||||||
| 204 | required => 'optional', | ||||||||||||
| 205 | }, | ||||||||||||
| 206 | 'offset' => { | ||||||||||||
| 207 | type => 'integer', | ||||||||||||
| 208 | required => 'optional', | ||||||||||||
| 209 | }, | ||||||||||||
| 210 | }, | ||||||||||||
| 211 | }; | ||||||||||||
| 212 | my $response_objs = $mapping->{get_an_albums_tracks}{response} // [ | ||||||||||||
| 213 | 0 | ▶ | 'album object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_an_albums_tracks"}{"response"} // ["album object"]
MC/DC0%0/1
$mapping->{"get_an_albums_tracks"}{"response"} // ["album object"]
$mapping->{"get_an_albums_tracks"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_an_albums_tracks"}{"response"}
| |||||||||||||
| 214 | |||||||||||||
| 215 | ]; | ||||||||||||
| 216 | |||||||||||||
| 217 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 218 | 2 | } | |||||||||||
| 219 | |||||||||||||
| 220 | =head2 get_multiple_albums | ||||||||||||
| 221 | |||||||||||||
| 222 | get_multiple_albums - Get Multiple Albums | ||||||||||||
| 223 | |||||||||||||
| 224 | Get Spotify catalog information for multiple albums identified by their Spotify IDs. | ||||||||||||
| 225 | |||||||||||||
| 226 | with Request details being: | ||||||||||||
| 227 | |||||||||||||
| 228 | =head3 header | ||||||||||||
| 229 | |||||||||||||
| 230 | =over 4 | ||||||||||||
| 231 | |||||||||||||
| 232 | =item Authorization | ||||||||||||
| 233 | |||||||||||||
| 234 | Type: string | Required: required | ||||||||||||
| 235 | A valid user access token or your client credentials. | ||||||||||||
| 236 | |||||||||||||
| 237 | =back | ||||||||||||
| 238 | |||||||||||||
| 239 | =head3 query_parameter | ||||||||||||
| 240 | |||||||||||||
| 241 | =over 4 | ||||||||||||
| 242 | |||||||||||||
| 243 | =item ids | ||||||||||||
| 244 | |||||||||||||
| 245 | Type: string | Required: required | ||||||||||||
| 246 | A comma-separated list of the Spotify IDs for the albums. Maximum: 20 IDs. | ||||||||||||
| 247 | |||||||||||||
| 248 | =item market | ||||||||||||
| 249 | |||||||||||||
| 250 | Type: string | Required: optional | ||||||||||||
| 251 | An ISO 3166-1 alpha-2 country code or the string from_token. | ||||||||||||
| 252 | Provide this parameter if you want to apply Track Relinking. | ||||||||||||
| 253 | |||||||||||||
| 254 | =back | ||||||||||||
| 255 | |||||||||||||
| 256 | and Response Objects being: | ||||||||||||
| 257 | |||||||||||||
| 258 | - an object | ||||||||||||
| 259 | - an object | ||||||||||||
| 260 | |||||||||||||
| 261 | |||||||||||||
| 262 | On success, the HTTP status code in the response header is 200 OK and the response body contains an object whose key is "albums" and whose value is an array of album objects in JSON format.Objects are returned in the order requested. If an object is not found, a null value is returned in the appropriate position. Duplicate ids in the query will result in duplicate objects in the response. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console | ||||||||||||
| 263 | |||||||||||||
| 264 | =cut | ||||||||||||
| 265 | |||||||||||||
| 266 | 0 | ▶ | async sub get_multiple_albums { | ||||||||||
|
Subroutine
get_multiple_albums: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 267 | 0 | my ($self, %args) = @_; | |||||||||||
| 268 | |||||||||||||
| 269 | 0 | my $mapping = $self->mapping; | |||||||||||
| 270 | 0 | ▶ | my $request->{method} = $mapping->{get_multiple_albums}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_multiple_albums"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_multiple_albums"}{"method"} // "GET"
$mapping->{"get_multiple_albums"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_multiple_albums"}{"method"}
| |||||||||||||
| 271 | 0 | ▶ | $request->{uri} = $mapping->{get_multiple_albums}{uri} // 'https://api.spotify.com/v1/albums'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_multiple_albums"}{"uri"} // "https://api.spotify.com/v1/albums"
MC/DC0%0/1
$mapping->{"get_multiple_albums"}{"uri"} // "https://api.spotify.com/v1/albums"
$mapping->{"get_multiple_albums"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_multiple_albums"}{"uri"}
| |||||||||||||
| 272 | $request->{param} = $mapping->{get_multiple_albums}{param} // { | ||||||||||||
| 273 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_multiple_albums"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"ids", {"type", "string", "required", "required"}, "market", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_multiple_albums"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"ids", {"type", "string", "required", "required"}, "market", {"type", "string", "required", "optional"}}}
$mapping->{"get_multiple_albums"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_multiple_albums"}{"param"}
| |||||||||||||
| 274 | 'Authorization' => { | ||||||||||||
| 275 | type => 'string', | ||||||||||||
| 276 | required => 'required', | ||||||||||||
| 277 | }, | ||||||||||||
| 278 | }, | ||||||||||||
| 279 | query_parameter => { | ||||||||||||
| 280 | 'ids' => { | ||||||||||||
| 281 | type => 'string', | ||||||||||||
| 282 | required => 'required', | ||||||||||||
| 283 | }, | ||||||||||||
| 284 | 'market' => { | ||||||||||||
| 285 | type => 'string', | ||||||||||||
| 286 | required => 'optional', | ||||||||||||
| 287 | }, | ||||||||||||
| 288 | }, | ||||||||||||
| 289 | }; | ||||||||||||
| 290 | my $response_objs = $mapping->{get_multiple_albums}{response} // [ | ||||||||||||
| 291 | 0 | ▶ | 'an object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_multiple_albums"}{"response"} // ["an object", "an object"]
MC/DC0%0/1
$mapping->{"get_multiple_albums"}{"response"} // ["an object", "an object"]
$mapping->{"get_multiple_albums"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_multiple_albums"}{"response"}
| |||||||||||||
| 292 | 'an object', | ||||||||||||
| 293 | |||||||||||||
| 294 | ]; | ||||||||||||
| 295 | |||||||||||||
| 296 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 297 | 2 | } | |||||||||||
| 298 | |||||||||||||
| 299 | 2 | 1; | |||||||||||