« lib/Net/Async/Spotify/API/Generated/Artists.pm
↑ Summary
lib/Net/Async/Spotify/API/Generated/Albums.pm »
| 1 | package Net::Async::Spotify::API::Generated::Tracks; | ||||||||||||
| 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::Tracks - Package representing Spotify Tracks 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_audio_analysis | ||||||||||||
| 33 | |||||||||||||
| 34 | get_audio_analysis - Get Audio Analysis for a Track | ||||||||||||
| 35 | |||||||||||||
| 36 | Get a detailed audio analysis for a single track identified by its unique | ||||||||||||
| 37 | Spotify ID. | ||||||||||||
| 38 | |||||||||||||
| 39 | with Request details being: | ||||||||||||
| 40 | |||||||||||||
| 41 | =head3 header | ||||||||||||
| 42 | |||||||||||||
| 43 | =over 4 | ||||||||||||
| 44 | |||||||||||||
| 45 | =item Authorization | ||||||||||||
| 46 | |||||||||||||
| 47 | Type: string | Required: required | ||||||||||||
| 48 | valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. | ||||||||||||
| 49 | |||||||||||||
| 50 | =back | ||||||||||||
| 51 | |||||||||||||
| 52 | =head3 path_parameter | ||||||||||||
| 53 | |||||||||||||
| 54 | =over 4 | ||||||||||||
| 55 | |||||||||||||
| 56 | =item id | ||||||||||||
| 57 | |||||||||||||
| 58 | Type: string | Required: required | ||||||||||||
| 59 | The Spotify ID | ||||||||||||
| 60 | for the track. | ||||||||||||
| 61 | |||||||||||||
| 62 | =back | ||||||||||||
| 63 | |||||||||||||
| 64 | and Response Objects being: | ||||||||||||
| 65 | |||||||||||||
| 66 | - analysis object | ||||||||||||
| 67 | |||||||||||||
| 68 | |||||||||||||
| 69 | On success, the HTTP status code in the response header is 200 OK and the response body contains an audio analysis 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 | ||||||||||||
| 70 | |||||||||||||
| 71 | =cut | ||||||||||||
| 72 | |||||||||||||
| 73 | 0 | ▶ | async sub get_audio_analysis { | ||||||||||
|
Subroutine
get_audio_analysis: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 74 | 0 | my ($self, %args) = @_; | |||||||||||
| 75 | |||||||||||||
| 76 | 0 | my $mapping = $self->mapping; | |||||||||||
| 77 | 0 | ▶ | my $request->{method} = $mapping->{get_audio_analysis}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_audio_analysis"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_audio_analysis"}{"method"} // "GET"
$mapping->{"get_audio_analysis"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_audio_analysis"}{"method"}
| |||||||||||||
| 78 | 0 | ▶ | $request->{uri} = $mapping->{get_audio_analysis}{uri} // 'https://api.spotify.com/v1/audio-analysis/{id}'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_audio_analysis"}{"uri"} // "https://api.spotify.com/v1/audio-analysis/{id}"
MC/DC0%0/1
$mapping->{"get_audio_analysis"}{"uri"} // "https://api.spotify.com/v1/audio-analysis/{id}"
$mapping->{"get_audio_analysis"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_audio_analysis"}{"uri"}
| |||||||||||||
| 79 | $request->{param} = $mapping->{get_audio_analysis}{param} // { | ||||||||||||
| 80 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_audio_analysis"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"get_audio_analysis"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}}
$mapping->{"get_audio_analysis"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_audio_analysis"}{"param"}
| |||||||||||||
| 81 | 'Authorization' => { | ||||||||||||
| 82 | type => 'string', | ||||||||||||
| 83 | required => 'required', | ||||||||||||
| 84 | }, | ||||||||||||
| 85 | }, | ||||||||||||
| 86 | path_parameter => { | ||||||||||||
| 87 | 'id' => { | ||||||||||||
| 88 | type => 'string', | ||||||||||||
| 89 | required => 'required', | ||||||||||||
| 90 | }, | ||||||||||||
| 91 | }, | ||||||||||||
| 92 | }; | ||||||||||||
| 93 | my $response_objs = $mapping->{get_audio_analysis}{response} // [ | ||||||||||||
| 94 | 0 | ▶ | 'analysis object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_audio_analysis"}{"response"} // ["analysis object"]
MC/DC0%0/1
$mapping->{"get_audio_analysis"}{"response"} // ["analysis object"]
$mapping->{"get_audio_analysis"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_audio_analysis"}{"response"}
| |||||||||||||
| 95 | |||||||||||||
| 96 | ]; | ||||||||||||
| 97 | |||||||||||||
| 98 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 99 | 2 | } | |||||||||||
| 100 | |||||||||||||
| 101 | =head2 get_audio_features | ||||||||||||
| 102 | |||||||||||||
| 103 | get_audio_features - Get Audio Features for a Track | ||||||||||||
| 104 | |||||||||||||
| 105 | Get audio feature information for a single track identified by its unique | ||||||||||||
| 106 | Spotify ID. | ||||||||||||
| 107 | |||||||||||||
| 108 | with Request details being: | ||||||||||||
| 109 | |||||||||||||
| 110 | =head3 header | ||||||||||||
| 111 | |||||||||||||
| 112 | =over 4 | ||||||||||||
| 113 | |||||||||||||
| 114 | =item Authorization | ||||||||||||
| 115 | |||||||||||||
| 116 | Type: string | Required: required | ||||||||||||
| 117 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. | ||||||||||||
| 118 | |||||||||||||
| 119 | =back | ||||||||||||
| 120 | |||||||||||||
| 121 | =head3 path_parameter | ||||||||||||
| 122 | |||||||||||||
| 123 | =over 4 | ||||||||||||
| 124 | |||||||||||||
| 125 | =item id | ||||||||||||
| 126 | |||||||||||||
| 127 | Type: string | Required: required | ||||||||||||
| 128 | The Spotify ID for the track. | ||||||||||||
| 129 | |||||||||||||
| 130 | =back | ||||||||||||
| 131 | |||||||||||||
| 132 | and Response Objects being: | ||||||||||||
| 133 | |||||||||||||
| 134 | - features object | ||||||||||||
| 135 | |||||||||||||
| 136 | |||||||||||||
| 137 | On success, the HTTP status code in the response header is 200 OK and the response body contains an audio features 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 | ||||||||||||
| 138 | |||||||||||||
| 139 | =cut | ||||||||||||
| 140 | |||||||||||||
| 141 | 0 | ▶ | async sub get_audio_features { | ||||||||||
|
Subroutine
get_audio_features: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 142 | 0 | my ($self, %args) = @_; | |||||||||||
| 143 | |||||||||||||
| 144 | 0 | my $mapping = $self->mapping; | |||||||||||
| 145 | 0 | ▶ | my $request->{method} = $mapping->{get_audio_features}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_audio_features"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_audio_features"}{"method"} // "GET"
$mapping->{"get_audio_features"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_audio_features"}{"method"}
| |||||||||||||
| 146 | 0 | ▶ | $request->{uri} = $mapping->{get_audio_features}{uri} // 'https://api.spotify.com/v1/audio-features/{id}'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_audio_features"}{"uri"} // "https://api.spotify.com/v1/audio-features/{id}"
MC/DC0%0/1
$mapping->{"get_audio_features"}{"uri"} // "https://api.spotify.com/v1/audio-features/{id}"
$mapping->{"get_audio_features"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_audio_features"}{"uri"}
| |||||||||||||
| 147 | $request->{param} = $mapping->{get_audio_features}{param} // { | ||||||||||||
| 148 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_audio_features"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"get_audio_features"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}}
$mapping->{"get_audio_features"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_audio_features"}{"param"}
| |||||||||||||
| 149 | 'Authorization' => { | ||||||||||||
| 150 | type => 'string', | ||||||||||||
| 151 | required => 'required', | ||||||||||||
| 152 | }, | ||||||||||||
| 153 | }, | ||||||||||||
| 154 | path_parameter => { | ||||||||||||
| 155 | 'id' => { | ||||||||||||
| 156 | type => 'string', | ||||||||||||
| 157 | required => 'required', | ||||||||||||
| 158 | }, | ||||||||||||
| 159 | }, | ||||||||||||
| 160 | }; | ||||||||||||
| 161 | my $response_objs = $mapping->{get_audio_features}{response} // [ | ||||||||||||
| 162 | 0 | ▶ | 'features object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_audio_features"}{"response"} // ["features object"]
MC/DC0%0/1
$mapping->{"get_audio_features"}{"response"} // ["features object"]
$mapping->{"get_audio_features"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_audio_features"}{"response"}
| |||||||||||||
| 163 | |||||||||||||
| 164 | ]; | ||||||||||||
| 165 | |||||||||||||
| 166 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 167 | 2 | } | |||||||||||
| 168 | |||||||||||||
| 169 | =head2 get_several_audio_features | ||||||||||||
| 170 | |||||||||||||
| 171 | get_several_audio_features - Get Audio Features for Several Tracks | ||||||||||||
| 172 | |||||||||||||
| 173 | Get audio features for multiple tracks based on their Spotify IDs. | ||||||||||||
| 174 | |||||||||||||
| 175 | with Request details being: | ||||||||||||
| 176 | |||||||||||||
| 177 | =head3 header | ||||||||||||
| 178 | |||||||||||||
| 179 | =over 4 | ||||||||||||
| 180 | |||||||||||||
| 181 | =item Authorization | ||||||||||||
| 182 | |||||||||||||
| 183 | Type: string | Required: required | ||||||||||||
| 184 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. | ||||||||||||
| 185 | |||||||||||||
| 186 | =back | ||||||||||||
| 187 | |||||||||||||
| 188 | =head3 query_parameter | ||||||||||||
| 189 | |||||||||||||
| 190 | =over 4 | ||||||||||||
| 191 | |||||||||||||
| 192 | =item ids | ||||||||||||
| 193 | |||||||||||||
| 194 | Type: string | Required: required | ||||||||||||
| 195 | A comma-separated list of the Spotify IDs | ||||||||||||
| 196 | for the tracks. Maximum: 100 IDs. | ||||||||||||
| 197 | |||||||||||||
| 198 | =back | ||||||||||||
| 199 | |||||||||||||
| 200 | and Response Objects being: | ||||||||||||
| 201 | |||||||||||||
| 202 | - an object | ||||||||||||
| 203 | - an object | ||||||||||||
| 204 | |||||||||||||
| 205 | |||||||||||||
| 206 | On success, the HTTP status code in the response header is 200 OK | ||||||||||||
| 207 | and the response body contains an object whose key is "audio_features" and | ||||||||||||
| 208 | whose value is an array of audio features 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 | ||||||||||||
| 209 | |||||||||||||
| 210 | =cut | ||||||||||||
| 211 | |||||||||||||
| 212 | 0 | ▶ | async sub get_several_audio_features { | ||||||||||
|
Subroutine
get_several_audio_features: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 213 | 0 | my ($self, %args) = @_; | |||||||||||
| 214 | |||||||||||||
| 215 | 0 | my $mapping = $self->mapping; | |||||||||||
| 216 | 0 | ▶ | my $request->{method} = $mapping->{get_several_audio_features}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_several_audio_features"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_several_audio_features"}{"method"} // "GET"
$mapping->{"get_several_audio_features"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_several_audio_features"}{"method"}
| |||||||||||||
| 217 | 0 | ▶ | $request->{uri} = $mapping->{get_several_audio_features}{uri} // 'https://api.spotify.com/v1/audio-features'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_several_audio_features"}{"uri"} // "https://api.spotify.com/v1/audio-features"
MC/DC0%0/1
$mapping->{"get_several_audio_features"}{"uri"} // "https://api.spotify.com/v1/audio-features"
$mapping->{"get_several_audio_features"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_several_audio_features"}{"uri"}
| |||||||||||||
| 218 | $request->{param} = $mapping->{get_several_audio_features}{param} // { | ||||||||||||
| 219 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_several_audio_features"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"ids", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"get_several_audio_features"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"ids", {"type", "string", "required", "required"}}}
$mapping->{"get_several_audio_features"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_several_audio_features"}{"param"}
| |||||||||||||
| 220 | 'Authorization' => { | ||||||||||||
| 221 | type => 'string', | ||||||||||||
| 222 | required => 'required', | ||||||||||||
| 223 | }, | ||||||||||||
| 224 | }, | ||||||||||||
| 225 | query_parameter => { | ||||||||||||
| 226 | 'ids' => { | ||||||||||||
| 227 | type => 'string', | ||||||||||||
| 228 | required => 'required', | ||||||||||||
| 229 | }, | ||||||||||||
| 230 | }, | ||||||||||||
| 231 | }; | ||||||||||||
| 232 | my $response_objs = $mapping->{get_several_audio_features}{response} // [ | ||||||||||||
| 233 | 0 | ▶ | 'an object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_several_audio_features"}{"response"} // ["an object", "an object"]
MC/DC0%0/1
$mapping->{"get_several_audio_features"}{"response"} // ["an object", "an object"]
$mapping->{"get_several_audio_features"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_several_audio_features"}{"response"}
| |||||||||||||
| 234 | 'an object', | ||||||||||||
| 235 | |||||||||||||
| 236 | ]; | ||||||||||||
| 237 | |||||||||||||
| 238 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 239 | 2 | } | |||||||||||
| 240 | |||||||||||||
| 241 | =head2 get_several_tracks | ||||||||||||
| 242 | |||||||||||||
| 243 | get_several_tracks - Get Several Tracks | ||||||||||||
| 244 | |||||||||||||
| 245 | Get Spotify catalog information for multiple tracks based on their Spotify IDs. | ||||||||||||
| 246 | |||||||||||||
| 247 | with Request details being: | ||||||||||||
| 248 | |||||||||||||
| 249 | =head3 header | ||||||||||||
| 250 | |||||||||||||
| 251 | =over 4 | ||||||||||||
| 252 | |||||||||||||
| 253 | =item Authorization | ||||||||||||
| 254 | |||||||||||||
| 255 | Type: string | Required: required | ||||||||||||
| 256 | A valid access token from the Spotify Accounts service: | ||||||||||||
| 257 | see the Web API Authorization Guide | ||||||||||||
| 258 | for details. | ||||||||||||
| 259 | |||||||||||||
| 260 | =back | ||||||||||||
| 261 | |||||||||||||
| 262 | =head3 query_parameter | ||||||||||||
| 263 | |||||||||||||
| 264 | =over 4 | ||||||||||||
| 265 | |||||||||||||
| 266 | =item ids | ||||||||||||
| 267 | |||||||||||||
| 268 | Type: string | Required: required | ||||||||||||
| 269 | A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs. | ||||||||||||
| 270 | |||||||||||||
| 271 | =item market | ||||||||||||
| 272 | |||||||||||||
| 273 | Type: string | Required: optional | ||||||||||||
| 274 | An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking. | ||||||||||||
| 275 | |||||||||||||
| 276 | =back | ||||||||||||
| 277 | |||||||||||||
| 278 | and Response Objects being: | ||||||||||||
| 279 | |||||||||||||
| 280 | - an object | ||||||||||||
| 281 | - an object | ||||||||||||
| 282 | |||||||||||||
| 283 | |||||||||||||
| 284 | On success, the HTTP status code in the response header is 200 | ||||||||||||
| 285 | OK and the response body contains an object whose key is tracks and whose | ||||||||||||
| 286 | value is an array of track objects | ||||||||||||
| 287 | 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 | ||||||||||||
| 288 | |||||||||||||
| 289 | =cut | ||||||||||||
| 290 | |||||||||||||
| 291 | 0 | ▶ | async sub get_several_tracks { | ||||||||||
|
Subroutine
get_several_tracks: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 292 | 0 | my ($self, %args) = @_; | |||||||||||
| 293 | |||||||||||||
| 294 | 0 | my $mapping = $self->mapping; | |||||||||||
| 295 | 0 | ▶ | my $request->{method} = $mapping->{get_several_tracks}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_several_tracks"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_several_tracks"}{"method"} // "GET"
$mapping->{"get_several_tracks"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_several_tracks"}{"method"}
| |||||||||||||
| 296 | 0 | ▶ | $request->{uri} = $mapping->{get_several_tracks}{uri} // 'https://api.spotify.com/v1/tracks'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_several_tracks"}{"uri"} // "https://api.spotify.com/v1/tracks"
MC/DC0%0/1
$mapping->{"get_several_tracks"}{"uri"} // "https://api.spotify.com/v1/tracks"
$mapping->{"get_several_tracks"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_several_tracks"}{"uri"}
| |||||||||||||
| 297 | $request->{param} = $mapping->{get_several_tracks}{param} // { | ||||||||||||
| 298 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_several_tracks"}{"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_several_tracks"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"ids", {"type", "string", "required", "required"}, "market", {"type", "string", "required", "optional"}}}
$mapping->{"get_several_tracks"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_several_tracks"}{"param"}
| |||||||||||||
| 299 | 'Authorization' => { | ||||||||||||
| 300 | type => 'string', | ||||||||||||
| 301 | required => 'required', | ||||||||||||
| 302 | }, | ||||||||||||
| 303 | }, | ||||||||||||
| 304 | query_parameter => { | ||||||||||||
| 305 | 'ids' => { | ||||||||||||
| 306 | type => 'string', | ||||||||||||
| 307 | required => 'required', | ||||||||||||
| 308 | }, | ||||||||||||
| 309 | 'market' => { | ||||||||||||
| 310 | type => 'string', | ||||||||||||
| 311 | required => 'optional', | ||||||||||||
| 312 | }, | ||||||||||||
| 313 | }, | ||||||||||||
| 314 | }; | ||||||||||||
| 315 | my $response_objs = $mapping->{get_several_tracks}{response} // [ | ||||||||||||
| 316 | 0 | ▶ | 'an object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_several_tracks"}{"response"} // ["an object", "an object"]
MC/DC0%0/1
$mapping->{"get_several_tracks"}{"response"} // ["an object", "an object"]
$mapping->{"get_several_tracks"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_several_tracks"}{"response"}
| |||||||||||||
| 317 | 'an object', | ||||||||||||
| 318 | |||||||||||||
| 319 | ]; | ||||||||||||
| 320 | |||||||||||||
| 321 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 322 | 2 | } | |||||||||||
| 323 | |||||||||||||
| 324 | =head2 get_track | ||||||||||||
| 325 | |||||||||||||
| 326 | get_track - Get a Track | ||||||||||||
| 327 | |||||||||||||
| 328 | Get Spotify catalog information for a single track identified by its | ||||||||||||
| 329 | unique Spotify ID. | ||||||||||||
| 330 | |||||||||||||
| 331 | with Request details being: | ||||||||||||
| 332 | |||||||||||||
| 333 | =head3 header | ||||||||||||
| 334 | |||||||||||||
| 335 | =over 4 | ||||||||||||
| 336 | |||||||||||||
| 337 | =item Authorization | ||||||||||||
| 338 | |||||||||||||
| 339 | Type: string | Required: required | ||||||||||||
| 340 | A valid access token from the Spotify Accounts service: | ||||||||||||
| 341 | see the Web API Authorization Guide | ||||||||||||
| 342 | for details. | ||||||||||||
| 343 | |||||||||||||
| 344 | =back | ||||||||||||
| 345 | |||||||||||||
| 346 | =head3 path_parameter | ||||||||||||
| 347 | |||||||||||||
| 348 | =over 4 | ||||||||||||
| 349 | |||||||||||||
| 350 | =item id | ||||||||||||
| 351 | |||||||||||||
| 352 | Type: string | Required: required | ||||||||||||
| 353 | The Spotify ID | ||||||||||||
| 354 | for the track. | ||||||||||||
| 355 | |||||||||||||
| 356 | =back | ||||||||||||
| 357 | |||||||||||||
| 358 | =head3 query_parameter | ||||||||||||
| 359 | |||||||||||||
| 360 | =over 4 | ||||||||||||
| 361 | |||||||||||||
| 362 | =item market | ||||||||||||
| 363 | |||||||||||||
| 364 | Type: string | Required: optional | ||||||||||||
| 365 | An ISO 3166-1 alpha-2 country code | ||||||||||||
| 366 | or the string from_token. Provide this parameter if you want to apply Track | ||||||||||||
| 367 | Relinking. | ||||||||||||
| 368 | |||||||||||||
| 369 | =back | ||||||||||||
| 370 | |||||||||||||
| 371 | and Response Objects being: | ||||||||||||
| 372 | |||||||||||||
| 373 | - track object | ||||||||||||
| 374 | |||||||||||||
| 375 | |||||||||||||
| 376 | On success, the HTTP status code in the response header is 200 | ||||||||||||
| 377 | OK and the response body contains a track object | ||||||||||||
| 378 | in JSON format. On error, the header status code is an error code | ||||||||||||
| 379 | and the response body contains an error object.Try in our Web Console | ||||||||||||
| 380 | |||||||||||||
| 381 | =cut | ||||||||||||
| 382 | |||||||||||||
| 383 | 0 | ▶ | async sub get_track { | ||||||||||
|
Subroutine
get_track: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 384 | 0 | my ($self, %args) = @_; | |||||||||||
| 385 | |||||||||||||
| 386 | 0 | my $mapping = $self->mapping; | |||||||||||
| 387 | 0 | ▶ | my $request->{method} = $mapping->{get_track}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_track"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_track"}{"method"} // "GET"
$mapping->{"get_track"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_track"}{"method"}
| |||||||||||||
| 388 | 0 | ▶ | $request->{uri} = $mapping->{get_track}{uri} // 'https://api.spotify.com/v1/tracks/{id}'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_track"}{"uri"} // "https://api.spotify.com/v1/tracks/{id}"
MC/DC0%0/1
$mapping->{"get_track"}{"uri"} // "https://api.spotify.com/v1/tracks/{id}"
$mapping->{"get_track"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_track"}{"uri"}
| |||||||||||||
| 389 | $request->{param} = $mapping->{get_track}{param} // { | ||||||||||||
| 390 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_track"}{"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_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"market", {"type", "string", "required", "optional"}}}
$mapping->{"get_track"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_track"}{"param"}
| |||||||||||||
| 391 | 'Authorization' => { | ||||||||||||
| 392 | type => 'string', | ||||||||||||
| 393 | required => 'required', | ||||||||||||
| 394 | }, | ||||||||||||
| 395 | }, | ||||||||||||
| 396 | path_parameter => { | ||||||||||||
| 397 | 'id' => { | ||||||||||||
| 398 | type => 'string', | ||||||||||||
| 399 | required => 'required', | ||||||||||||
| 400 | }, | ||||||||||||
| 401 | }, | ||||||||||||
| 402 | query_parameter => { | ||||||||||||
| 403 | 'market' => { | ||||||||||||
| 404 | type => 'string', | ||||||||||||
| 405 | required => 'optional', | ||||||||||||
| 406 | }, | ||||||||||||
| 407 | }, | ||||||||||||
| 408 | }; | ||||||||||||
| 409 | my $response_objs = $mapping->{get_track}{response} // [ | ||||||||||||
| 410 | 0 | ▶ | 'track object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_track"}{"response"} // ["track object"]
MC/DC0%0/1
$mapping->{"get_track"}{"response"} // ["track object"]
$mapping->{"get_track"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_track"}{"response"}
| |||||||||||||
| 411 | |||||||||||||
| 412 | ]; | ||||||||||||
| 413 | |||||||||||||
| 414 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 415 | 2 | } | |||||||||||
| 416 | |||||||||||||
| 417 | 2 | 1; | |||||||||||