« lib/Net/Async/Spotify/API/Generated/Playlists.pm
↑ Summary
lib/Net/Async/Spotify/API/Generated/Follow.pm »
| 1 | package Net::Async::Spotify::API::Generated::Browse; | ||||||||||||
| 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::Browse - Package representing Spotify Browse 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_a_categories_playlists | ||||||||||||
| 33 | |||||||||||||
| 34 | get_a_categories_playlists - Get a Category's Playlists | ||||||||||||
| 35 | |||||||||||||
| 36 | Get a list of Spotify playlists tagged with a particular category. | ||||||||||||
| 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 category_id | ||||||||||||
| 56 | |||||||||||||
| 57 | Type: string | Required: required | ||||||||||||
| 58 | The Spotify category ID for the category. | ||||||||||||
| 59 | |||||||||||||
| 60 | =back | ||||||||||||
| 61 | |||||||||||||
| 62 | =head3 query_parameter | ||||||||||||
| 63 | |||||||||||||
| 64 | =over 4 | ||||||||||||
| 65 | |||||||||||||
| 66 | =item country | ||||||||||||
| 67 | |||||||||||||
| 68 | Type: string | Required: optional | ||||||||||||
| 69 | A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country. | ||||||||||||
| 70 | |||||||||||||
| 71 | =item limit | ||||||||||||
| 72 | |||||||||||||
| 73 | Type: integer | Required: optional | ||||||||||||
| 74 | The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | ||||||||||||
| 75 | |||||||||||||
| 76 | =item offset | ||||||||||||
| 77 | |||||||||||||
| 78 | Type: integer | Required: optional | ||||||||||||
| 79 | The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items. | ||||||||||||
| 80 | |||||||||||||
| 81 | =back | ||||||||||||
| 82 | |||||||||||||
| 83 | and Response Objects being: | ||||||||||||
| 84 | |||||||||||||
| 85 | - playlist object | ||||||||||||
| 86 | |||||||||||||
| 87 | |||||||||||||
| 88 | On success, the HTTP status code in the response header is 200 OK and the response body contains an array of simplified playlist objects (wrapped in a paging object) in JSON format. On error, the header status code is an error code and the response body contains an error object.Once you have retrieved the list, you can use Get a Playlist and Get a Playlist’s Tracks to drill down further.Try in our Web Console | ||||||||||||
| 89 | |||||||||||||
| 90 | =cut | ||||||||||||
| 91 | |||||||||||||
| 92 | 0 | ▶ | async sub get_a_categories_playlists { | ||||||||||
|
Subroutine
get_a_categories_playlists: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 93 | 0 | my ($self, %args) = @_; | |||||||||||
| 94 | |||||||||||||
| 95 | 0 | my $mapping = $self->mapping; | |||||||||||
| 96 | 0 | ▶ | my $request->{method} = $mapping->{get_a_categories_playlists}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_categories_playlists"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_a_categories_playlists"}{"method"} // "GET"
$mapping->{"get_a_categories_playlists"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_a_categories_playlists"}{"method"}
| |||||||||||||
| 97 | 0 | ▶ | $request->{uri} = $mapping->{get_a_categories_playlists}{uri} // 'https://api.spotify.com/v1/browse/categories/{category_id}/playlists'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_categories_playlists"}{"uri"} // "https://api.spotify.com/v1/browse/categories/{category_id}/playlists"
MC/DC0%0/1
$mapping->{"get_a_categories_playlists"}{"uri"} // "https://api.spotify.com/v1/browse/categories/{category_id}/playlists"
$mapping->{"get_a_categories_playlists"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_a_categories_playlists"}{"uri"}
| |||||||||||||
| 98 | $request->{param} = $mapping->{get_a_categories_playlists}{param} // { | ||||||||||||
| 99 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_categories_playlists"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"category_id", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_a_categories_playlists"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"category_id", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
$mapping->{"get_a_categories_playlists"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_a_categories_playlists"}{"param"}
| |||||||||||||
| 100 | 'Authorization' => { | ||||||||||||
| 101 | type => 'string', | ||||||||||||
| 102 | required => 'required', | ||||||||||||
| 103 | }, | ||||||||||||
| 104 | }, | ||||||||||||
| 105 | path_parameter => { | ||||||||||||
| 106 | 'category_id' => { | ||||||||||||
| 107 | type => 'string', | ||||||||||||
| 108 | required => 'required', | ||||||||||||
| 109 | }, | ||||||||||||
| 110 | }, | ||||||||||||
| 111 | query_parameter => { | ||||||||||||
| 112 | 'country' => { | ||||||||||||
| 113 | type => 'string', | ||||||||||||
| 114 | required => 'optional', | ||||||||||||
| 115 | }, | ||||||||||||
| 116 | 'limit' => { | ||||||||||||
| 117 | type => 'integer', | ||||||||||||
| 118 | required => 'optional', | ||||||||||||
| 119 | }, | ||||||||||||
| 120 | 'offset' => { | ||||||||||||
| 121 | type => 'integer', | ||||||||||||
| 122 | required => 'optional', | ||||||||||||
| 123 | }, | ||||||||||||
| 124 | }, | ||||||||||||
| 125 | }; | ||||||||||||
| 126 | my $response_objs = $mapping->{get_a_categories_playlists}{response} // [ | ||||||||||||
| 127 | 0 | ▶ | 'playlist object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_categories_playlists"}{"response"} // ["playlist object"]
MC/DC0%0/1
$mapping->{"get_a_categories_playlists"}{"response"} // ["playlist object"]
$mapping->{"get_a_categories_playlists"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_a_categories_playlists"}{"response"}
| |||||||||||||
| 128 | |||||||||||||
| 129 | ]; | ||||||||||||
| 130 | |||||||||||||
| 131 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 132 | 2 | } | |||||||||||
| 133 | |||||||||||||
| 134 | =head2 get_a_category | ||||||||||||
| 135 | |||||||||||||
| 136 | get_a_category - Get a Category | ||||||||||||
| 137 | |||||||||||||
| 138 | Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab). | ||||||||||||
| 139 | |||||||||||||
| 140 | with Request details being: | ||||||||||||
| 141 | |||||||||||||
| 142 | =head3 header | ||||||||||||
| 143 | |||||||||||||
| 144 | =over 4 | ||||||||||||
| 145 | |||||||||||||
| 146 | =item Authorization | ||||||||||||
| 147 | |||||||||||||
| 148 | Type: string | Required: required | ||||||||||||
| 149 | A valid user access token or your client credentials. | ||||||||||||
| 150 | |||||||||||||
| 151 | =back | ||||||||||||
| 152 | |||||||||||||
| 153 | =head3 path_parameter | ||||||||||||
| 154 | |||||||||||||
| 155 | =over 4 | ||||||||||||
| 156 | |||||||||||||
| 157 | =item category_id | ||||||||||||
| 158 | |||||||||||||
| 159 | Type: string | Required: required | ||||||||||||
| 160 | The Spotify category ID for the category. | ||||||||||||
| 161 | |||||||||||||
| 162 | =back | ||||||||||||
| 163 | |||||||||||||
| 164 | =head3 query_parameter | ||||||||||||
| 165 | |||||||||||||
| 166 | =over 4 | ||||||||||||
| 167 | |||||||||||||
| 168 | =item country | ||||||||||||
| 169 | |||||||||||||
| 170 | Type: string | Required: optional | ||||||||||||
| 171 | A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country. | ||||||||||||
| 172 | |||||||||||||
| 173 | =item locale | ||||||||||||
| 174 | |||||||||||||
| 175 | Type: string | Required: optional | ||||||||||||
| 176 | The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". Provide this parameter if you want the category strings returned in a particular language. Note that, if locale is not supplied, or if the specified language is not available, the category strings returned will be in the Spotify default language (American English). | ||||||||||||
| 177 | |||||||||||||
| 178 | =back | ||||||||||||
| 179 | |||||||||||||
| 180 | and Response Objects being: | ||||||||||||
| 181 | |||||||||||||
| 182 | - category object | ||||||||||||
| 183 | |||||||||||||
| 184 | |||||||||||||
| 185 | On success, the HTTP status code in the response header is 200 OK and the response body contains a category object in JSON format. On error, the header status code is an error code and the response body contains an error object.Once you have retrieved the category, you can use Get a Category’s Playlists to drill down further.Try in our Web Console | ||||||||||||
| 186 | |||||||||||||
| 187 | =cut | ||||||||||||
| 188 | |||||||||||||
| 189 | 0 | ▶ | async sub get_a_category { | ||||||||||
|
Subroutine
get_a_category: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 190 | 0 | my ($self, %args) = @_; | |||||||||||
| 191 | |||||||||||||
| 192 | 0 | my $mapping = $self->mapping; | |||||||||||
| 193 | 0 | ▶ | my $request->{method} = $mapping->{get_a_category}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_category"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_a_category"}{"method"} // "GET"
$mapping->{"get_a_category"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_a_category"}{"method"}
| |||||||||||||
| 194 | 0 | ▶ | $request->{uri} = $mapping->{get_a_category}{uri} // 'https://api.spotify.com/v1/browse/categories/{category_id}'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_category"}{"uri"} // "https://api.spotify.com/v1/browse/categories/{category_id}"
MC/DC0%0/1
$mapping->{"get_a_category"}{"uri"} // "https://api.spotify.com/v1/browse/categories/{category_id}"
$mapping->{"get_a_category"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_a_category"}{"uri"}
| |||||||||||||
| 195 | $request->{param} = $mapping->{get_a_category}{param} // { | ||||||||||||
| 196 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_category"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"category_id", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "locale", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_a_category"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"category_id", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "locale", {"type", "string", "required", "optional"}}}
$mapping->{"get_a_category"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_a_category"}{"param"}
| |||||||||||||
| 197 | 'Authorization' => { | ||||||||||||
| 198 | type => 'string', | ||||||||||||
| 199 | required => 'required', | ||||||||||||
| 200 | }, | ||||||||||||
| 201 | }, | ||||||||||||
| 202 | path_parameter => { | ||||||||||||
| 203 | 'category_id' => { | ||||||||||||
| 204 | type => 'string', | ||||||||||||
| 205 | required => 'required', | ||||||||||||
| 206 | }, | ||||||||||||
| 207 | }, | ||||||||||||
| 208 | query_parameter => { | ||||||||||||
| 209 | 'country' => { | ||||||||||||
| 210 | type => 'string', | ||||||||||||
| 211 | required => 'optional', | ||||||||||||
| 212 | }, | ||||||||||||
| 213 | 'locale' => { | ||||||||||||
| 214 | type => 'string', | ||||||||||||
| 215 | required => 'optional', | ||||||||||||
| 216 | }, | ||||||||||||
| 217 | }, | ||||||||||||
| 218 | }; | ||||||||||||
| 219 | my $response_objs = $mapping->{get_a_category}{response} // [ | ||||||||||||
| 220 | 0 | ▶ | 'category object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_category"}{"response"} // ["category object"]
MC/DC0%0/1
$mapping->{"get_a_category"}{"response"} // ["category object"]
$mapping->{"get_a_category"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_a_category"}{"response"}
| |||||||||||||
| 221 | |||||||||||||
| 222 | ]; | ||||||||||||
| 223 | |||||||||||||
| 224 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 225 | 2 | } | |||||||||||
| 226 | |||||||||||||
| 227 | =head2 get_categories | ||||||||||||
| 228 | |||||||||||||
| 229 | get_categories - Get All Categories | ||||||||||||
| 230 | |||||||||||||
| 231 | Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab). | ||||||||||||
| 232 | |||||||||||||
| 233 | with Request details being: | ||||||||||||
| 234 | |||||||||||||
| 235 | =head3 header | ||||||||||||
| 236 | |||||||||||||
| 237 | =over 4 | ||||||||||||
| 238 | |||||||||||||
| 239 | =item Authorization | ||||||||||||
| 240 | |||||||||||||
| 241 | Type: string | Required: required | ||||||||||||
| 242 | A valid user access token or your client credentials. | ||||||||||||
| 243 | |||||||||||||
| 244 | =back | ||||||||||||
| 245 | |||||||||||||
| 246 | =head3 query_parameter | ||||||||||||
| 247 | |||||||||||||
| 248 | =over 4 | ||||||||||||
| 249 | |||||||||||||
| 250 | =item country | ||||||||||||
| 251 | |||||||||||||
| 252 | Type: string | Required: optional | ||||||||||||
| 253 | A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country. If omitted, the returned items will be globally relevant. | ||||||||||||
| 254 | |||||||||||||
| 255 | =item limit | ||||||||||||
| 256 | |||||||||||||
| 257 | Type: integer | Required: optional | ||||||||||||
| 258 | The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50. | ||||||||||||
| 259 | |||||||||||||
| 260 | =item locale | ||||||||||||
| 261 | |||||||||||||
| 262 | Type: string | Required: optional | ||||||||||||
| 263 | The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”. Provide this parameter if you want the category metadata returned in a particular language. Note that, if locale is not supplied, or if the specified language is not available, all strings will be returned in the Spotify default language (American English). The locale parameter, combined with the country parameter, may give odd results if not carefully matched. For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings. | ||||||||||||
| 264 | |||||||||||||
| 265 | =item offset | ||||||||||||
| 266 | |||||||||||||
| 267 | Type: integer | Required: optional | ||||||||||||
| 268 | The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of categories. | ||||||||||||
| 269 | |||||||||||||
| 270 | =back | ||||||||||||
| 271 | |||||||||||||
| 272 | and Response Objects being: | ||||||||||||
| 273 | |||||||||||||
| 274 | - an object | ||||||||||||
| 275 | |||||||||||||
| 276 | |||||||||||||
| 277 | On success, the HTTP status code in the response header is 200 OK and the response body contains an object with a categories field, with an array of category objects (wrapped in a paging object) in JSON format. On error, the header status code is an error code and the response body contains an error object.Once you have retrieved the list, you can use Get a Category to drill down further.Try in our Web Console | ||||||||||||
| 278 | |||||||||||||
| 279 | =cut | ||||||||||||
| 280 | |||||||||||||
| 281 | 0 | ▶ | async sub get_categories { | ||||||||||
|
Subroutine
get_categories: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 282 | 0 | my ($self, %args) = @_; | |||||||||||
| 283 | |||||||||||||
| 284 | 0 | my $mapping = $self->mapping; | |||||||||||
| 285 | 0 | ▶ | my $request->{method} = $mapping->{get_categories}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_categories"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_categories"}{"method"} // "GET"
$mapping->{"get_categories"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_categories"}{"method"}
| |||||||||||||
| 286 | 0 | ▶ | $request->{uri} = $mapping->{get_categories}{uri} // 'https://api.spotify.com/v1/browse/categories'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_categories"}{"uri"} // "https://api.spotify.com/v1/browse/categories"
MC/DC0%0/1
$mapping->{"get_categories"}{"uri"} // "https://api.spotify.com/v1/browse/categories"
$mapping->{"get_categories"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_categories"}{"uri"}
| |||||||||||||
| 287 | $request->{param} = $mapping->{get_categories}{param} // { | ||||||||||||
| 288 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_categories"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "locale", {"type", "string", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_categories"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "locale", {"type", "string", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
$mapping->{"get_categories"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_categories"}{"param"}
| |||||||||||||
| 289 | 'Authorization' => { | ||||||||||||
| 290 | type => 'string', | ||||||||||||
| 291 | required => 'required', | ||||||||||||
| 292 | }, | ||||||||||||
| 293 | }, | ||||||||||||
| 294 | query_parameter => { | ||||||||||||
| 295 | 'country' => { | ||||||||||||
| 296 | type => 'string', | ||||||||||||
| 297 | required => 'optional', | ||||||||||||
| 298 | }, | ||||||||||||
| 299 | 'limit' => { | ||||||||||||
| 300 | type => 'integer', | ||||||||||||
| 301 | required => 'optional', | ||||||||||||
| 302 | }, | ||||||||||||
| 303 | 'locale' => { | ||||||||||||
| 304 | type => 'string', | ||||||||||||
| 305 | required => 'optional', | ||||||||||||
| 306 | }, | ||||||||||||
| 307 | 'offset' => { | ||||||||||||
| 308 | type => 'integer', | ||||||||||||
| 309 | required => 'optional', | ||||||||||||
| 310 | }, | ||||||||||||
| 311 | }, | ||||||||||||
| 312 | }; | ||||||||||||
| 313 | my $response_objs = $mapping->{get_categories}{response} // [ | ||||||||||||
| 314 | 0 | ▶ | 'an object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_categories"}{"response"} // ["an object"]
MC/DC0%0/1
$mapping->{"get_categories"}{"response"} // ["an object"]
$mapping->{"get_categories"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_categories"}{"response"}
| |||||||||||||
| 315 | |||||||||||||
| 316 | ]; | ||||||||||||
| 317 | |||||||||||||
| 318 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 319 | 2 | } | |||||||||||
| 320 | |||||||||||||
| 321 | =head2 get_featured_playlists | ||||||||||||
| 322 | |||||||||||||
| 323 | get_featured_playlists - Get All Featured Playlists | ||||||||||||
| 324 | |||||||||||||
| 325 | Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab). | ||||||||||||
| 326 | |||||||||||||
| 327 | with Request details being: | ||||||||||||
| 328 | |||||||||||||
| 329 | =head3 header | ||||||||||||
| 330 | |||||||||||||
| 331 | =over 4 | ||||||||||||
| 332 | |||||||||||||
| 333 | =item Authorization | ||||||||||||
| 334 | |||||||||||||
| 335 | Type: string | Required: required | ||||||||||||
| 336 | A valid user access token or your client credentials. | ||||||||||||
| 337 | |||||||||||||
| 338 | =back | ||||||||||||
| 339 | |||||||||||||
| 340 | =head3 query_parameter | ||||||||||||
| 341 | |||||||||||||
| 342 | =over 4 | ||||||||||||
| 343 | |||||||||||||
| 344 | =item country | ||||||||||||
| 345 | |||||||||||||
| 346 | Type: string | Required: optional | ||||||||||||
| 347 | A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries. | ||||||||||||
| 348 | |||||||||||||
| 349 | =item limit | ||||||||||||
| 350 | |||||||||||||
| 351 | Type: integer | Required: optional | ||||||||||||
| 352 | The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | ||||||||||||
| 353 | |||||||||||||
| 354 | =item locale | ||||||||||||
| 355 | |||||||||||||
| 356 | Type: string | Required: optional | ||||||||||||
| 357 | The desired language, consisting of a lowercase ISO 639-1 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”. Provide this parameter if you want the results returned in a particular language (where available). Note that, if locale is not supplied, or if the specified language is not available, all strings will be returned in the Spotify default language (American English). The locale parameter, combined with the country parameter, may give odd results if not carefully matched. For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings. | ||||||||||||
| 358 | |||||||||||||
| 359 | =item offset | ||||||||||||
| 360 | |||||||||||||
| 361 | Type: integer | Required: optional | ||||||||||||
| 362 | The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items. | ||||||||||||
| 363 | |||||||||||||
| 364 | =item timestamp | ||||||||||||
| 365 | |||||||||||||
| 366 | Type: string | Required: optional | ||||||||||||
| 367 | A timestamp in ISO 8601 format: yyyy-MM-ddTHH:mm:ss. Use this parameter to specify the user’s local time to get results tailored for that specific date and time in the day. If not provided, the response defaults to the current UTC time. Example: “2014-10-23T09:00:00” for a user whose local time is 9AM. If there were no featured playlists (or there is no data) at the specified time, the response will revert to the current UTC time. | ||||||||||||
| 368 | |||||||||||||
| 369 | =back | ||||||||||||
| 370 | |||||||||||||
| 371 | and Response Objects being: | ||||||||||||
| 372 | |||||||||||||
| 373 | - playlist object | ||||||||||||
| 374 | - playlist object | ||||||||||||
| 375 | |||||||||||||
| 376 | |||||||||||||
| 377 | On success, the HTTP status code in the response header is 200 OK and the response body contains a message and a playlists object. The playlists object contains an array of simplified playlist objects (wrapped in a paging object) in JSON format. On error, the header status code is an error code and the response body contains an error object.Once you have retrieved the list of playlist objects, you can use Get a Playlist and Get a Playlist’s Tracks to drill down further.Try in our Web Console | ||||||||||||
| 378 | |||||||||||||
| 379 | =cut | ||||||||||||
| 380 | |||||||||||||
| 381 | 0 | ▶ | async sub get_featured_playlists { | ||||||||||
|
Subroutine
get_featured_playlists: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 382 | 0 | my ($self, %args) = @_; | |||||||||||
| 383 | |||||||||||||
| 384 | 0 | my $mapping = $self->mapping; | |||||||||||
| 385 | 0 | ▶ | my $request->{method} = $mapping->{get_featured_playlists}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_featured_playlists"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_featured_playlists"}{"method"} // "GET"
$mapping->{"get_featured_playlists"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_featured_playlists"}{"method"}
| |||||||||||||
| 386 | 0 | ▶ | $request->{uri} = $mapping->{get_featured_playlists}{uri} // 'https://api.spotify.com/v1/browse/featured-playlists'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_featured_playlists"}{"uri"} // "https://api.spotify.com/v1/browse/featured-playlists"
MC/DC0%0/1
$mapping->{"get_featured_playlists"}{"uri"} // "https://api.spotify.com/v1/browse/featured-playlists"
$mapping->{"get_featured_playlists"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_featured_playlists"}{"uri"}
| |||||||||||||
| 387 | $request->{param} = $mapping->{get_featured_playlists}{param} // { | ||||||||||||
| 388 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_featured_playlists"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "locale", {"type", "string", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}, "timestamp", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_featured_playlists"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "locale", {"type", "string", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}, "timestamp", {"type", "string", "required", "optional"}}}
$mapping->{"get_featured_playlists"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_featured_playlists"}{"param"}
| |||||||||||||
| 389 | 'Authorization' => { | ||||||||||||
| 390 | type => 'string', | ||||||||||||
| 391 | required => 'required', | ||||||||||||
| 392 | }, | ||||||||||||
| 393 | }, | ||||||||||||
| 394 | query_parameter => { | ||||||||||||
| 395 | 'country' => { | ||||||||||||
| 396 | type => 'string', | ||||||||||||
| 397 | required => 'optional', | ||||||||||||
| 398 | }, | ||||||||||||
| 399 | 'limit' => { | ||||||||||||
| 400 | type => 'integer', | ||||||||||||
| 401 | required => 'optional', | ||||||||||||
| 402 | }, | ||||||||||||
| 403 | 'locale' => { | ||||||||||||
| 404 | type => 'string', | ||||||||||||
| 405 | required => 'optional', | ||||||||||||
| 406 | }, | ||||||||||||
| 407 | 'offset' => { | ||||||||||||
| 408 | type => 'integer', | ||||||||||||
| 409 | required => 'optional', | ||||||||||||
| 410 | }, | ||||||||||||
| 411 | 'timestamp' => { | ||||||||||||
| 412 | type => 'string', | ||||||||||||
| 413 | required => 'optional', | ||||||||||||
| 414 | }, | ||||||||||||
| 415 | }, | ||||||||||||
| 416 | }; | ||||||||||||
| 417 | my $response_objs = $mapping->{get_featured_playlists}{response} // [ | ||||||||||||
| 418 | 0 | ▶ | 'playlist object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_featured_playlists"}{"response"} // ["playlist object", "playlist object"]
MC/DC0%0/1
$mapping->{"get_featured_playlists"}{"response"} // ["playlist object", "playlist object"]
$mapping->{"get_featured_playlists"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_featured_playlists"}{"response"}
| |||||||||||||
| 419 | 'playlist object', | ||||||||||||
| 420 | |||||||||||||
| 421 | ]; | ||||||||||||
| 422 | |||||||||||||
| 423 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 424 | 2 | } | |||||||||||
| 425 | |||||||||||||
| 426 | =head2 get_new_releases | ||||||||||||
| 427 | |||||||||||||
| 428 | get_new_releases - Get All New Releases | ||||||||||||
| 429 | |||||||||||||
| 430 | Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab). | ||||||||||||
| 431 | |||||||||||||
| 432 | with Request details being: | ||||||||||||
| 433 | |||||||||||||
| 434 | =head3 header | ||||||||||||
| 435 | |||||||||||||
| 436 | =over 4 | ||||||||||||
| 437 | |||||||||||||
| 438 | =item Authorization | ||||||||||||
| 439 | |||||||||||||
| 440 | Type: string | Required: required | ||||||||||||
| 441 | A valid user access token or your client credentials. | ||||||||||||
| 442 | |||||||||||||
| 443 | =back | ||||||||||||
| 444 | |||||||||||||
| 445 | =head3 query_parameter | ||||||||||||
| 446 | |||||||||||||
| 447 | =over 4 | ||||||||||||
| 448 | |||||||||||||
| 449 | =item country | ||||||||||||
| 450 | |||||||||||||
| 451 | Type: string | Required: optional | ||||||||||||
| 452 | A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries. | ||||||||||||
| 453 | |||||||||||||
| 454 | =item limit | ||||||||||||
| 455 | |||||||||||||
| 456 | Type: integer | Required: optional | ||||||||||||
| 457 | The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | ||||||||||||
| 458 | |||||||||||||
| 459 | =item offset | ||||||||||||
| 460 | |||||||||||||
| 461 | Type: integer | Required: optional | ||||||||||||
| 462 | The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items. | ||||||||||||
| 463 | |||||||||||||
| 464 | =back | ||||||||||||
| 465 | |||||||||||||
| 466 | and Response Objects being: | ||||||||||||
| 467 | |||||||||||||
| 468 | - album object | ||||||||||||
| 469 | |||||||||||||
| 470 | |||||||||||||
| 471 | On success, the HTTP status code in the response header is 200 OK and the response body contains a message and analbums object. The albums object contains an array of simplified album objects (wrapped in a paging object) in JSON format. On error, the header status code is an error code and the response body contains an error object.Once you have retrieved the list, you can use Get an Album’s Tracks to drill down further.The results are returned in an order reflected within the Spotify clients, and therefore may not be ordered by date.Try in our Web Console | ||||||||||||
| 472 | |||||||||||||
| 473 | =cut | ||||||||||||
| 474 | |||||||||||||
| 475 | 0 | ▶ | async sub get_new_releases { | ||||||||||
|
Subroutine
get_new_releases: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 476 | 0 | my ($self, %args) = @_; | |||||||||||
| 477 | |||||||||||||
| 478 | 0 | my $mapping = $self->mapping; | |||||||||||
| 479 | 0 | ▶ | my $request->{method} = $mapping->{get_new_releases}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_new_releases"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_new_releases"}{"method"} // "GET"
$mapping->{"get_new_releases"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_new_releases"}{"method"}
| |||||||||||||
| 480 | 0 | ▶ | $request->{uri} = $mapping->{get_new_releases}{uri} // 'https://api.spotify.com/v1/browse/new-releases'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_new_releases"}{"uri"} // "https://api.spotify.com/v1/browse/new-releases"
MC/DC0%0/1
$mapping->{"get_new_releases"}{"uri"} // "https://api.spotify.com/v1/browse/new-releases"
$mapping->{"get_new_releases"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_new_releases"}{"uri"}
| |||||||||||||
| 481 | $request->{param} = $mapping->{get_new_releases}{param} // { | ||||||||||||
| 482 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_new_releases"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_new_releases"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"country", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
$mapping->{"get_new_releases"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_new_releases"}{"param"}
| |||||||||||||
| 483 | 'Authorization' => { | ||||||||||||
| 484 | type => 'string', | ||||||||||||
| 485 | required => 'required', | ||||||||||||
| 486 | }, | ||||||||||||
| 487 | }, | ||||||||||||
| 488 | query_parameter => { | ||||||||||||
| 489 | 'country' => { | ||||||||||||
| 490 | type => 'string', | ||||||||||||
| 491 | required => 'optional', | ||||||||||||
| 492 | }, | ||||||||||||
| 493 | 'limit' => { | ||||||||||||
| 494 | type => 'integer', | ||||||||||||
| 495 | required => 'optional', | ||||||||||||
| 496 | }, | ||||||||||||
| 497 | 'offset' => { | ||||||||||||
| 498 | type => 'integer', | ||||||||||||
| 499 | required => 'optional', | ||||||||||||
| 500 | }, | ||||||||||||
| 501 | }, | ||||||||||||
| 502 | }; | ||||||||||||
| 503 | my $response_objs = $mapping->{get_new_releases}{response} // [ | ||||||||||||
| 504 | 0 | ▶ | 'album object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_new_releases"}{"response"} // ["album object"]
MC/DC0%0/1
$mapping->{"get_new_releases"}{"response"} // ["album object"]
$mapping->{"get_new_releases"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_new_releases"}{"response"}
| |||||||||||||
| 505 | |||||||||||||
| 506 | ]; | ||||||||||||
| 507 | |||||||||||||
| 508 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 509 | 2 | } | |||||||||||
| 510 | |||||||||||||
| 511 | =head2 get_recommendation_genres | ||||||||||||
| 512 | |||||||||||||
| 513 | get_recommendation_genres - Get Recommendation Genres | ||||||||||||
| 514 | |||||||||||||
| 515 | Retrieve a list of available genres seed parameter values for recommendations. | ||||||||||||
| 516 | |||||||||||||
| 517 | with Request details being: | ||||||||||||
| 518 | |||||||||||||
| 519 | =head3 header | ||||||||||||
| 520 | |||||||||||||
| 521 | =over 4 | ||||||||||||
| 522 | |||||||||||||
| 523 | =item Authorization | ||||||||||||
| 524 | |||||||||||||
| 525 | Type: string | Required: required | ||||||||||||
| 526 | A valid user access token or your client credentials. | ||||||||||||
| 527 | |||||||||||||
| 528 | =back | ||||||||||||
| 529 | |||||||||||||
| 530 | and Response Objects being: | ||||||||||||
| 531 | |||||||||||||
| 532 | - response object | ||||||||||||
| 533 | |||||||||||||
| 534 | |||||||||||||
| 535 | On success, the HTTP status code in the response header is 200 OK and the response body contains a recommendations response object in JSON format.Try in our Web Console | ||||||||||||
| 536 | |||||||||||||
| 537 | =cut | ||||||||||||
| 538 | |||||||||||||
| 539 | 0 | ▶ | async sub get_recommendation_genres { | ||||||||||
|
Subroutine
get_recommendation_genres: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 540 | 0 | my ($self, %args) = @_; | |||||||||||
| 541 | |||||||||||||
| 542 | 0 | my $mapping = $self->mapping; | |||||||||||
| 543 | 0 | ▶ | my $request->{method} = $mapping->{get_recommendation_genres}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_recommendation_genres"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_recommendation_genres"}{"method"} // "GET"
$mapping->{"get_recommendation_genres"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_recommendation_genres"}{"method"}
| |||||||||||||
| 544 | 0 | ▶ | $request->{uri} = $mapping->{get_recommendation_genres}{uri} // 'https://api.spotify.com/v1/recommendations/available-genre-seeds'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_recommendation_genres"}{"uri"} // "https://api.spotify.com/v1/recommendations/available-genre-seeds"
MC/DC0%0/1
$mapping->{"get_recommendation_genres"}{"uri"} // "https://api.spotify.com/v1/recommendations/available-genre-seeds"
$mapping->{"get_recommendation_genres"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_recommendation_genres"}{"uri"}
| |||||||||||||
| 545 | $request->{param} = $mapping->{get_recommendation_genres}{param} // { | ||||||||||||
| 546 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_recommendation_genres"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"get_recommendation_genres"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}}
$mapping->{"get_recommendation_genres"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_recommendation_genres"}{"param"}
| |||||||||||||
| 547 | 'Authorization' => { | ||||||||||||
| 548 | type => 'string', | ||||||||||||
| 549 | required => 'required', | ||||||||||||
| 550 | }, | ||||||||||||
| 551 | }, | ||||||||||||
| 552 | }; | ||||||||||||
| 553 | my $response_objs = $mapping->{get_recommendation_genres}{response} // [ | ||||||||||||
| 554 | 0 | ▶ | 'response object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_recommendation_genres"}{"response"} // ["response object"]
MC/DC0%0/1
$mapping->{"get_recommendation_genres"}{"response"} // ["response object"]
$mapping->{"get_recommendation_genres"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_recommendation_genres"}{"response"}
| |||||||||||||
| 555 | |||||||||||||
| 556 | ]; | ||||||||||||
| 557 | |||||||||||||
| 558 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 559 | 2 | } | |||||||||||
| 560 | |||||||||||||
| 561 | =head2 get_recommendations | ||||||||||||
| 562 | |||||||||||||
| 563 | get_recommendations - Get Recommendations | ||||||||||||
| 564 | |||||||||||||
| 565 | Recommendations are generated based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details. | ||||||||||||
| 566 | |||||||||||||
| 567 | with Request details being: | ||||||||||||
| 568 | |||||||||||||
| 569 | =head3 header | ||||||||||||
| 570 | |||||||||||||
| 571 | =over 4 | ||||||||||||
| 572 | |||||||||||||
| 573 | =item Authorization | ||||||||||||
| 574 | |||||||||||||
| 575 | Type: string | Required: required | ||||||||||||
| 576 | A valid user access token or your client credentials. | ||||||||||||
| 577 | |||||||||||||
| 578 | =back | ||||||||||||
| 579 | |||||||||||||
| 580 | =head3 query_parameter | ||||||||||||
| 581 | |||||||||||||
| 582 | =over 4 | ||||||||||||
| 583 | |||||||||||||
| 584 | =item limit | ||||||||||||
| 585 | |||||||||||||
| 586 | Type: integer | Required: optional | ||||||||||||
| 587 | The target size of the list of recommended tracks. For seeds with unusually small pools or when highly restrictive filtering is applied, it may be impossible to generate the requested number of recommended tracks. Debugging information for such cases is available in the response. Default: 20. Minimum: 1. Maximum: 100. | ||||||||||||
| 588 | |||||||||||||
| 589 | =item market | ||||||||||||
| 590 | |||||||||||||
| 591 | Type: string | Required: optional | ||||||||||||
| 592 | An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking. Because min_*, max_* and target_* are applied to pools before relinking, the generated results may not precisely match the filters applied. Original, non-relinked tracks are available via the linked_from attribute of the relinked track response. | ||||||||||||
| 593 | |||||||||||||
| 594 | =item max_acousticness | ||||||||||||
| 595 | |||||||||||||
| 596 | Type: number | Required: optional | ||||||||||||
| 597 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 598 | |||||||||||||
| 599 | =item max_danceability | ||||||||||||
| 600 | |||||||||||||
| 601 | Type: number | Required: optional | ||||||||||||
| 602 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 603 | |||||||||||||
| 604 | =item max_duration_ms | ||||||||||||
| 605 | |||||||||||||
| 606 | Type: integer | Required: optional | ||||||||||||
| 607 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 608 | |||||||||||||
| 609 | =item max_energy | ||||||||||||
| 610 | |||||||||||||
| 611 | Type: number | Required: optional | ||||||||||||
| 612 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 613 | |||||||||||||
| 614 | =item max_instrumentalness | ||||||||||||
| 615 | |||||||||||||
| 616 | Type: number | Required: optional | ||||||||||||
| 617 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 618 | |||||||||||||
| 619 | =item max_key | ||||||||||||
| 620 | |||||||||||||
| 621 | Type: integer | Required: optional | ||||||||||||
| 622 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 623 | |||||||||||||
| 624 | =item max_liveness | ||||||||||||
| 625 | |||||||||||||
| 626 | Type: number | Required: optional | ||||||||||||
| 627 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 628 | |||||||||||||
| 629 | =item max_loudness | ||||||||||||
| 630 | |||||||||||||
| 631 | Type: number | Required: optional | ||||||||||||
| 632 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 633 | |||||||||||||
| 634 | =item max_mode | ||||||||||||
| 635 | |||||||||||||
| 636 | Type: integer | Required: optional | ||||||||||||
| 637 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 638 | |||||||||||||
| 639 | =item max_popularity | ||||||||||||
| 640 | |||||||||||||
| 641 | Type: integer | Required: optional | ||||||||||||
| 642 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 643 | |||||||||||||
| 644 | =item max_speechiness | ||||||||||||
| 645 | |||||||||||||
| 646 | Type: number | Required: optional | ||||||||||||
| 647 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 648 | |||||||||||||
| 649 | =item max_tempo | ||||||||||||
| 650 | |||||||||||||
| 651 | Type: number | Required: optional | ||||||||||||
| 652 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 653 | |||||||||||||
| 654 | =item max_time_signature | ||||||||||||
| 655 | |||||||||||||
| 656 | Type: integer | Required: optional | ||||||||||||
| 657 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 658 | |||||||||||||
| 659 | =item max_valence | ||||||||||||
| 660 | |||||||||||||
| 661 | Type: number | Required: optional | ||||||||||||
| 662 | For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental. | ||||||||||||
| 663 | |||||||||||||
| 664 | =item min_acousticness | ||||||||||||
| 665 | |||||||||||||
| 666 | Type: number | Required: optional | ||||||||||||
| 667 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 668 | |||||||||||||
| 669 | =item min_danceability | ||||||||||||
| 670 | |||||||||||||
| 671 | Type: number | Required: optional | ||||||||||||
| 672 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 673 | |||||||||||||
| 674 | =item min_duration_ms | ||||||||||||
| 675 | |||||||||||||
| 676 | Type: integer | Required: optional | ||||||||||||
| 677 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 678 | |||||||||||||
| 679 | =item min_energy | ||||||||||||
| 680 | |||||||||||||
| 681 | Type: number | Required: optional | ||||||||||||
| 682 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 683 | |||||||||||||
| 684 | =item min_instrumentalness | ||||||||||||
| 685 | |||||||||||||
| 686 | Type: number | Required: optional | ||||||||||||
| 687 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 688 | |||||||||||||
| 689 | =item min_key | ||||||||||||
| 690 | |||||||||||||
| 691 | Type: integer | Required: optional | ||||||||||||
| 692 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 693 | |||||||||||||
| 694 | =item min_liveness | ||||||||||||
| 695 | |||||||||||||
| 696 | Type: number | Required: optional | ||||||||||||
| 697 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 698 | |||||||||||||
| 699 | =item min_loudness | ||||||||||||
| 700 | |||||||||||||
| 701 | Type: number | Required: optional | ||||||||||||
| 702 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 703 | |||||||||||||
| 704 | =item min_mode | ||||||||||||
| 705 | |||||||||||||
| 706 | Type: integer | Required: optional | ||||||||||||
| 707 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 708 | |||||||||||||
| 709 | =item min_popularity | ||||||||||||
| 710 | |||||||||||||
| 711 | Type: integer | Required: optional | ||||||||||||
| 712 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 713 | |||||||||||||
| 714 | =item min_speechiness | ||||||||||||
| 715 | |||||||||||||
| 716 | Type: number | Required: optional | ||||||||||||
| 717 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 718 | |||||||||||||
| 719 | =item min_tempo | ||||||||||||
| 720 | |||||||||||||
| 721 | Type: number | Required: optional | ||||||||||||
| 722 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 723 | |||||||||||||
| 724 | =item min_time_signature | ||||||||||||
| 725 | |||||||||||||
| 726 | Type: integer | Required: optional | ||||||||||||
| 727 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 728 | |||||||||||||
| 729 | =item min_valence | ||||||||||||
| 730 | |||||||||||||
| 731 | Type: number | Required: optional | ||||||||||||
| 732 | For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute. | ||||||||||||
| 733 | |||||||||||||
| 734 | =item seed_artists | ||||||||||||
| 735 | |||||||||||||
| 736 | Type: string | Required: required | ||||||||||||
| 737 | A comma separated list of Spotify IDs for seed artists. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. | ||||||||||||
| 738 | |||||||||||||
| 739 | =item seed_genres | ||||||||||||
| 740 | |||||||||||||
| 741 | Type: string | Required: required | ||||||||||||
| 742 | A comma separated list of any genres in the set of available genre seeds. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. | ||||||||||||
| 743 | |||||||||||||
| 744 | =item seed_tracks | ||||||||||||
| 745 | |||||||||||||
| 746 | Type: string | Required: required | ||||||||||||
| 747 | A comma separated list of Spotify IDs for a seed track. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres. | ||||||||||||
| 748 | |||||||||||||
| 749 | =item target_acousticness | ||||||||||||
| 750 | |||||||||||||
| 751 | Type: number | Required: optional | ||||||||||||
| 752 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 753 | |||||||||||||
| 754 | =item target_danceability | ||||||||||||
| 755 | |||||||||||||
| 756 | Type: number | Required: optional | ||||||||||||
| 757 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 758 | |||||||||||||
| 759 | =item target_duration_ms | ||||||||||||
| 760 | |||||||||||||
| 761 | Type: integer | Required: optional | ||||||||||||
| 762 | Target duration of the track (ms) | ||||||||||||
| 763 | |||||||||||||
| 764 | =item target_energy | ||||||||||||
| 765 | |||||||||||||
| 766 | Type: number | Required: optional | ||||||||||||
| 767 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 768 | |||||||||||||
| 769 | =item target_instrumentalness | ||||||||||||
| 770 | |||||||||||||
| 771 | Type: number | Required: optional | ||||||||||||
| 772 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 773 | |||||||||||||
| 774 | =item target_key | ||||||||||||
| 775 | |||||||||||||
| 776 | Type: integer | Required: optional | ||||||||||||
| 777 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 778 | |||||||||||||
| 779 | =item target_liveness | ||||||||||||
| 780 | |||||||||||||
| 781 | Type: number | Required: optional | ||||||||||||
| 782 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 783 | |||||||||||||
| 784 | =item target_loudness | ||||||||||||
| 785 | |||||||||||||
| 786 | Type: number | Required: optional | ||||||||||||
| 787 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 788 | |||||||||||||
| 789 | =item target_mode | ||||||||||||
| 790 | |||||||||||||
| 791 | Type: integer | Required: optional | ||||||||||||
| 792 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 793 | |||||||||||||
| 794 | =item target_popularity | ||||||||||||
| 795 | |||||||||||||
| 796 | Type: integer | Required: optional | ||||||||||||
| 797 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 798 | |||||||||||||
| 799 | =item target_speechiness | ||||||||||||
| 800 | |||||||||||||
| 801 | Type: number | Required: optional | ||||||||||||
| 802 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 803 | |||||||||||||
| 804 | =item target_tempo | ||||||||||||
| 805 | |||||||||||||
| 806 | Type: number | Required: optional | ||||||||||||
| 807 | Target tempo (BPM) | ||||||||||||
| 808 | |||||||||||||
| 809 | =item target_time_signature | ||||||||||||
| 810 | |||||||||||||
| 811 | Type: integer | Required: optional | ||||||||||||
| 812 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 813 | |||||||||||||
| 814 | =item target_valence | ||||||||||||
| 815 | |||||||||||||
| 816 | Type: number | Required: optional | ||||||||||||
| 817 | For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results. | ||||||||||||
| 818 | |||||||||||||
| 819 | =back | ||||||||||||
| 820 | |||||||||||||
| 821 | and Response Objects being: | ||||||||||||
| 822 | |||||||||||||
| 823 | - response object | ||||||||||||
| 824 | |||||||||||||
| 825 | |||||||||||||
| 826 | On success, the HTTP status code in the response header is 200 OK and the response body contains a recommendations response object in JSON format.Try in our Web Console | ||||||||||||
| 827 | |||||||||||||
| 828 | =cut | ||||||||||||
| 829 | |||||||||||||
| 830 | 0 | ▶ | async sub get_recommendations { | ||||||||||
|
Subroutine
get_recommendations: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 831 | 0 | my ($self, %args) = @_; | |||||||||||
| 832 | |||||||||||||
| 833 | 0 | my $mapping = $self->mapping; | |||||||||||
| 834 | 0 | ▶ | my $request->{method} = $mapping->{get_recommendations}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_recommendations"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_recommendations"}{"method"} // "GET"
$mapping->{"get_recommendations"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_recommendations"}{"method"}
| |||||||||||||
| 835 | 0 | ▶ | $request->{uri} = $mapping->{get_recommendations}{uri} // 'https://api.spotify.com/v1/recommendations'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_recommendations"}{"uri"} // "https://api.spotify.com/v1/recommendations"
MC/DC0%0/1
$mapping->{"get_recommendations"}{"uri"} // "https://api.spotify.com/v1/recommendations"
$mapping->{"get_recommendations"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_recommendations"}{"uri"}
| |||||||||||||
| 836 | $request->{param} = $mapping->{get_recommendations}{param} // { | ||||||||||||
| 837 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_recommendations"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "market", {"type", "string", "required", "optional"}, "max_acousticness", {"type", "number", "required", "optional"}, "max_danceability", {"type", "number", "required", "optional"}, "max_duration_ms", {"type", "integer", "required", "optional"}, "max_energy", {"type", "number", "required", "optional"}, "max_instrumentalness", {"type", "number", "required", "optional"}, "max_key", {"type", "integer", "required", "optional"}, "max_liveness", {"type", "number", "required", "optional"}, "max_loudness", {"type", "number", "required", "optional"}, "max_mode", {"type", "integer", "required", "optional"}, "max_popularity", {"type", "integer", "required", "optional"}, "max_speechiness", {"type", "number", "required", "optional"}, "max_tempo", {"type", "number", "required", "optional"}, "max_time_signature", {"type", "integer", "required", "optional"}, "max_valence", {"type", "number", "required", "optional"}, "min_acousticness", {"type", "number", "required", "optional"}, "min_danceability", {"type", "number", "required", "optional"}, "min_duration_ms", {"type", "integer", "required", "optional"}, "min_energy", {"type", "number", "required", "optional"}, "min_instrumentalness", {"type", "number", "required", "optional"}, "min_key", {"type", "integer", "required", "optional"}, "min_liveness", {"type", "number", "required", "optional"}, "min_loudness", {"type", "number", "required", "optional"}, "min_mode", {"type", "integer", "required", "optional"}, "min_popularity", {"type", "integer", "required", "optional"}, "min_speechiness", {"type", "number", "required", "optional"}, "min_tempo", {"type", "number", "required", "optional"}, "min_time_signature", {"type", "integer", "required", "optional"}, "min_valence", {"type", "number", "required", "optional"}, "seed_artists", {"type", "string", "required", "required"}, "seed_genres", {"type", "string", "required", "required"}, "seed_tracks", {"type", "string", "required", "required"}, "target_acousticness", {"type", "number", "required", "optional"}, "target_danceability", {"type", "number", "required", "optional"}, "target_duration_ms", {"type", "integer", "required", "optional"}, "target_energy", {"type", "number", "required", "optional"}, "target_instrumentalness", {"type", "number", "required", "optional"}, "target_key", {"type", "integer", "required", "optional"}, "target_liveness", {"type", "number", "required", "optional"}, "target_loudness", {"type", "number", "required", "optional"}, "target_mode", {"type", "integer", "required", "optional"}, "target_popularity", {"type", "integer", "required", "optional"}, "target_speechiness", {"type", "number", "required", "optional"}, "target_tempo", {"type", "number", "required", "optional"}, "target_time_signature", {"type", "integer", "required", "optional"}, "target_valence", {"type", "number", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_recommendations"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "market", {"type", "string", "required", "optional"}, "max_acousticness", {"type", "number", "required", "optional"}, "max_danceability", {"type", "number", "required", "optional"}, "max_duration_ms", {"type", "integer", "required", "optional"}, "max_energy", {"type", "number", "required", "optional"}, "max_instrumentalness", {"type", "number", "required", "optional"}, "max_key", {"type", "integer", "required", "optional"}, "max_liveness", {"type", "number", "required", "optional"}, "max_loudness", {"type", "number", "required", "optional"}, "max_mode", {"type", "integer", "required", "optional"}, "max_popularity", {"type", "integer", "required", "optional"}, "max_speechiness", {"type", "number", "required", "optional"}, "max_tempo", {"type", "number", "required", "optional"}, "max_time_signature", {"type", "integer", "required", "optional"}, "max_valence", {"type", "number", "required", "optional"}, "min_acousticness", {"type", "number", "required", "optional"}, "min_danceability", {"type", "number", "required", "optional"}, "min_duration_ms", {"type", "integer", "required", "optional"}, "min_energy", {"type", "number", "required", "optional"}, "min_instrumentalness", {"type", "number", "required", "optional"}, "min_key", {"type", "integer", "required", "optional"}, "min_liveness", {"type", "number", "required", "optional"}, "min_loudness", {"type", "number", "required", "optional"}, "min_mode", {"type", "integer", "required", "optional"}, "min_popularity", {"type", "integer", "required", "optional"}, "min_speechiness", {"type", "number", "required", "optional"}, "min_tempo", {"type", "number", "required", "optional"}, "min_time_signature", {"type", "integer", "required", "optional"}, "min_valence", {"type", "number", "required", "optional"}, "seed_artists", {"type", "string", "required", "required"}, "seed_genres", {"type", "string", "required", "required"}, "seed_tracks", {"type", "string", "required", "required"}, "target_acousticness", {"type", "number", "required", "optional"}, "target_danceability", {"type", "number", "required", "optional"}, "target_duration_ms", {"type", "integer", "required", "optional"}, "target_energy", {"type", "number", "required", "optional"}, "target_instrumentalness", {"type", "number", "required", "optional"}, "target_key", {"type", "integer", "required", "optional"}, "target_liveness", {"type", "number", "required", "optional"}, "target_loudness", {"type", "number", "required", "optional"}, "target_mode", {"type", "integer", "required", "optional"}, "target_popularity", {"type", "integer", "required", "optional"}, "target_speechiness", {"type", "number", "required", "optional"}, "target_tempo", {"type", "number", "required", "optional"}, "target_time_signature", {"type", "integer", "required", "optional"}, "target_valence", {"type", "number", "required", "optional"}}}
$mapping->{"get_recommendations"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_recommendations"}{"param"}
| |||||||||||||
| 838 | 'Authorization' => { | ||||||||||||
| 839 | type => 'string', | ||||||||||||
| 840 | required => 'required', | ||||||||||||
| 841 | }, | ||||||||||||
| 842 | }, | ||||||||||||
| 843 | query_parameter => { | ||||||||||||
| 844 | 'limit' => { | ||||||||||||
| 845 | type => 'integer', | ||||||||||||
| 846 | required => 'optional', | ||||||||||||
| 847 | }, | ||||||||||||
| 848 | 'market' => { | ||||||||||||
| 849 | type => 'string', | ||||||||||||
| 850 | required => 'optional', | ||||||||||||
| 851 | }, | ||||||||||||
| 852 | 'max_acousticness' => { | ||||||||||||
| 853 | type => 'number', | ||||||||||||
| 854 | required => 'optional', | ||||||||||||
| 855 | }, | ||||||||||||
| 856 | 'max_danceability' => { | ||||||||||||
| 857 | type => 'number', | ||||||||||||
| 858 | required => 'optional', | ||||||||||||
| 859 | }, | ||||||||||||
| 860 | 'max_duration_ms' => { | ||||||||||||
| 861 | type => 'integer', | ||||||||||||
| 862 | required => 'optional', | ||||||||||||
| 863 | }, | ||||||||||||
| 864 | 'max_energy' => { | ||||||||||||
| 865 | type => 'number', | ||||||||||||
| 866 | required => 'optional', | ||||||||||||
| 867 | }, | ||||||||||||
| 868 | 'max_instrumentalness' => { | ||||||||||||
| 869 | type => 'number', | ||||||||||||
| 870 | required => 'optional', | ||||||||||||
| 871 | }, | ||||||||||||
| 872 | 'max_key' => { | ||||||||||||
| 873 | type => 'integer', | ||||||||||||
| 874 | required => 'optional', | ||||||||||||
| 875 | }, | ||||||||||||
| 876 | 'max_liveness' => { | ||||||||||||
| 877 | type => 'number', | ||||||||||||
| 878 | required => 'optional', | ||||||||||||
| 879 | }, | ||||||||||||
| 880 | 'max_loudness' => { | ||||||||||||
| 881 | type => 'number', | ||||||||||||
| 882 | required => 'optional', | ||||||||||||
| 883 | }, | ||||||||||||
| 884 | 'max_mode' => { | ||||||||||||
| 885 | type => 'integer', | ||||||||||||
| 886 | required => 'optional', | ||||||||||||
| 887 | }, | ||||||||||||
| 888 | 'max_popularity' => { | ||||||||||||
| 889 | type => 'integer', | ||||||||||||
| 890 | required => 'optional', | ||||||||||||
| 891 | }, | ||||||||||||
| 892 | 'max_speechiness' => { | ||||||||||||
| 893 | type => 'number', | ||||||||||||
| 894 | required => 'optional', | ||||||||||||
| 895 | }, | ||||||||||||
| 896 | 'max_tempo' => { | ||||||||||||
| 897 | type => 'number', | ||||||||||||
| 898 | required => 'optional', | ||||||||||||
| 899 | }, | ||||||||||||
| 900 | 'max_time_signature' => { | ||||||||||||
| 901 | type => 'integer', | ||||||||||||
| 902 | required => 'optional', | ||||||||||||
| 903 | }, | ||||||||||||
| 904 | 'max_valence' => { | ||||||||||||
| 905 | type => 'number', | ||||||||||||
| 906 | required => 'optional', | ||||||||||||
| 907 | }, | ||||||||||||
| 908 | 'min_acousticness' => { | ||||||||||||
| 909 | type => 'number', | ||||||||||||
| 910 | required => 'optional', | ||||||||||||
| 911 | }, | ||||||||||||
| 912 | 'min_danceability' => { | ||||||||||||
| 913 | type => 'number', | ||||||||||||
| 914 | required => 'optional', | ||||||||||||
| 915 | }, | ||||||||||||
| 916 | 'min_duration_ms' => { | ||||||||||||
| 917 | type => 'integer', | ||||||||||||
| 918 | required => 'optional', | ||||||||||||
| 919 | }, | ||||||||||||
| 920 | 'min_energy' => { | ||||||||||||
| 921 | type => 'number', | ||||||||||||
| 922 | required => 'optional', | ||||||||||||
| 923 | }, | ||||||||||||
| 924 | 'min_instrumentalness' => { | ||||||||||||
| 925 | type => 'number', | ||||||||||||
| 926 | required => 'optional', | ||||||||||||
| 927 | }, | ||||||||||||
| 928 | 'min_key' => { | ||||||||||||
| 929 | type => 'integer', | ||||||||||||
| 930 | required => 'optional', | ||||||||||||
| 931 | }, | ||||||||||||
| 932 | 'min_liveness' => { | ||||||||||||
| 933 | type => 'number', | ||||||||||||
| 934 | required => 'optional', | ||||||||||||
| 935 | }, | ||||||||||||
| 936 | 'min_loudness' => { | ||||||||||||
| 937 | type => 'number', | ||||||||||||
| 938 | required => 'optional', | ||||||||||||
| 939 | }, | ||||||||||||
| 940 | 'min_mode' => { | ||||||||||||
| 941 | type => 'integer', | ||||||||||||
| 942 | required => 'optional', | ||||||||||||
| 943 | }, | ||||||||||||
| 944 | 'min_popularity' => { | ||||||||||||
| 945 | type => 'integer', | ||||||||||||
| 946 | required => 'optional', | ||||||||||||
| 947 | }, | ||||||||||||
| 948 | 'min_speechiness' => { | ||||||||||||
| 949 | type => 'number', | ||||||||||||
| 950 | required => 'optional', | ||||||||||||
| 951 | }, | ||||||||||||
| 952 | 'min_tempo' => { | ||||||||||||
| 953 | type => 'number', | ||||||||||||
| 954 | required => 'optional', | ||||||||||||
| 955 | }, | ||||||||||||
| 956 | 'min_time_signature' => { | ||||||||||||
| 957 | type => 'integer', | ||||||||||||
| 958 | required => 'optional', | ||||||||||||
| 959 | }, | ||||||||||||
| 960 | 'min_valence' => { | ||||||||||||
| 961 | type => 'number', | ||||||||||||
| 962 | required => 'optional', | ||||||||||||
| 963 | }, | ||||||||||||
| 964 | 'seed_artists' => { | ||||||||||||
| 965 | type => 'string', | ||||||||||||
| 966 | required => 'required', | ||||||||||||
| 967 | }, | ||||||||||||
| 968 | 'seed_genres' => { | ||||||||||||
| 969 | type => 'string', | ||||||||||||
| 970 | required => 'required', | ||||||||||||
| 971 | }, | ||||||||||||
| 972 | 'seed_tracks' => { | ||||||||||||
| 973 | type => 'string', | ||||||||||||
| 974 | required => 'required', | ||||||||||||
| 975 | }, | ||||||||||||
| 976 | 'target_acousticness' => { | ||||||||||||
| 977 | type => 'number', | ||||||||||||
| 978 | required => 'optional', | ||||||||||||
| 979 | }, | ||||||||||||
| 980 | 'target_danceability' => { | ||||||||||||
| 981 | type => 'number', | ||||||||||||
| 982 | required => 'optional', | ||||||||||||
| 983 | }, | ||||||||||||
| 984 | 'target_duration_ms' => { | ||||||||||||
| 985 | type => 'integer', | ||||||||||||
| 986 | required => 'optional', | ||||||||||||
| 987 | }, | ||||||||||||
| 988 | 'target_energy' => { | ||||||||||||
| 989 | type => 'number', | ||||||||||||
| 990 | required => 'optional', | ||||||||||||
| 991 | }, | ||||||||||||
| 992 | 'target_instrumentalness' => { | ||||||||||||
| 993 | type => 'number', | ||||||||||||
| 994 | required => 'optional', | ||||||||||||
| 995 | }, | ||||||||||||
| 996 | 'target_key' => { | ||||||||||||
| 997 | type => 'integer', | ||||||||||||
| 998 | required => 'optional', | ||||||||||||
| 999 | }, | ||||||||||||
| 1000 | 'target_liveness' => { | ||||||||||||
| 1001 | type => 'number', | ||||||||||||
| 1002 | required => 'optional', | ||||||||||||
| 1003 | }, | ||||||||||||
| 1004 | 'target_loudness' => { | ||||||||||||
| 1005 | type => 'number', | ||||||||||||
| 1006 | required => 'optional', | ||||||||||||
| 1007 | }, | ||||||||||||
| 1008 | 'target_mode' => { | ||||||||||||
| 1009 | type => 'integer', | ||||||||||||
| 1010 | required => 'optional', | ||||||||||||
| 1011 | }, | ||||||||||||
| 1012 | 'target_popularity' => { | ||||||||||||
| 1013 | type => 'integer', | ||||||||||||
| 1014 | required => 'optional', | ||||||||||||
| 1015 | }, | ||||||||||||
| 1016 | 'target_speechiness' => { | ||||||||||||
| 1017 | type => 'number', | ||||||||||||
| 1018 | required => 'optional', | ||||||||||||
| 1019 | }, | ||||||||||||
| 1020 | 'target_tempo' => { | ||||||||||||
| 1021 | type => 'number', | ||||||||||||
| 1022 | required => 'optional', | ||||||||||||
| 1023 | }, | ||||||||||||
| 1024 | 'target_time_signature' => { | ||||||||||||
| 1025 | type => 'integer', | ||||||||||||
| 1026 | required => 'optional', | ||||||||||||
| 1027 | }, | ||||||||||||
| 1028 | 'target_valence' => { | ||||||||||||
| 1029 | type => 'number', | ||||||||||||
| 1030 | required => 'optional', | ||||||||||||
| 1031 | }, | ||||||||||||
| 1032 | }, | ||||||||||||
| 1033 | }; | ||||||||||||
| 1034 | my $response_objs = $mapping->{get_recommendations}{response} // [ | ||||||||||||
| 1035 | 0 | ▶ | 'response object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_recommendations"}{"response"} // ["response object"]
MC/DC0%0/1
$mapping->{"get_recommendations"}{"response"} // ["response object"]
$mapping->{"get_recommendations"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_recommendations"}{"response"}
| |||||||||||||
| 1036 | |||||||||||||
| 1037 | ]; | ||||||||||||
| 1038 | |||||||||||||
| 1039 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 1040 | 2 | } | |||||||||||
| 1041 | |||||||||||||
| 1042 | 2 | 1; | |||||||||||