« lib/Net/Async/Spotify/API/Generated/Player.pm
↑ Summary
lib/Net/Async/Spotify/API/Generated/Browse.pm »
| 1 | package Net::Async::Spotify::API::Generated::Playlists; | ||||||||||||
| 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::Playlists - Package representing Spotify Playlists 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 add_tracks_to_playlist | ||||||||||||
| 33 | |||||||||||||
| 34 | add_tracks_to_playlist - Add Items to a Playlist | ||||||||||||
| 35 | |||||||||||||
| 36 | Add one or more items to a user’s playlist. | ||||||||||||
| 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 access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been issued on behalf of the user.Adding items to the current user’s public playlists requires authorization of the playlist-modify-public scope; adding items to the current user’s private playlist (including collaborative playlists) requires the playlist-modify-private scope. See Using Scopes. | ||||||||||||
| 48 | |||||||||||||
| 49 | =item Content-Type | ||||||||||||
| 50 | |||||||||||||
| 51 | Type: string | Required: required | ||||||||||||
| 52 | Required if URIs are passed in the request body, otherwise ignored. The content type of the request body: application/json | ||||||||||||
| 53 | |||||||||||||
| 54 | =back | ||||||||||||
| 55 | |||||||||||||
| 56 | =head3 json_body_parameter | ||||||||||||
| 57 | |||||||||||||
| 58 | =over 4 | ||||||||||||
| 59 | |||||||||||||
| 60 | =item position | ||||||||||||
| 61 | |||||||||||||
| 62 | Type: integer | Required: optional | ||||||||||||
| 63 | The position to insert the items, a zero-based index. For example, to insert the items in the first position: position=0 ; to insert the items in the third position: position=2. If omitted, the items will be appended to the playlist. Items are added in the order they appear in the uris array. For example: {"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M"], "position": 3} | ||||||||||||
| 64 | |||||||||||||
| 65 | =item uris | ||||||||||||
| 66 | |||||||||||||
| 67 | Type: array[string] | Required: optional | ||||||||||||
| 68 | A JSON array of the Spotify URIs to add. For example: {"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M", "spotify:episode:512ojhOuo1ktJprKbVcKyQ"]}A maximum of 100 items can be added in one request. Note: if the uris parameter is present in the query string, any URIs listed here in the body will be ignored. | ||||||||||||
| 69 | |||||||||||||
| 70 | =back | ||||||||||||
| 71 | |||||||||||||
| 72 | =head3 path_parameter | ||||||||||||
| 73 | |||||||||||||
| 74 | =over 4 | ||||||||||||
| 75 | |||||||||||||
| 76 | =item playlist_id | ||||||||||||
| 77 | |||||||||||||
| 78 | Type: string | Required: required | ||||||||||||
| 79 | The Spotify ID | ||||||||||||
| 80 | for the playlist. | ||||||||||||
| 81 | |||||||||||||
| 82 | =back | ||||||||||||
| 83 | |||||||||||||
| 84 | =head3 query_parameter | ||||||||||||
| 85 | |||||||||||||
| 86 | =over 4 | ||||||||||||
| 87 | |||||||||||||
| 88 | =item position | ||||||||||||
| 89 | |||||||||||||
| 90 | Type: integer | Required: optional | ||||||||||||
| 91 | The position to insert the items, a zero-based index. For example, to insert the items in the first position: position=0; to insert the items in the third position: position=2 . If omitted, the items will be appended to the playlist. Items are added in the order they are listed in the query string or request body. | ||||||||||||
| 92 | |||||||||||||
| 93 | =item uris | ||||||||||||
| 94 | |||||||||||||
| 95 | Type: string | Required: optional | ||||||||||||
| 96 | A comma-separated list of Spotify URIs to add, can be track or episode URIs. For example:uris=spotify:track:4iV5W9uYEdYUVa79Axb7Rh, spotify:track:1301WleyT98MSxVHPZCA6M, spotify:episode:512ojhOuo1ktJprKbVcKyQA maximum of 100 items can be added in one request. Note: it is likely that passing a large number of item URIs as a query parameter will exceed the maximum length of the request URI. When adding a large number of items, it is recommended to pass them in the request body, see below. | ||||||||||||
| 97 | |||||||||||||
| 98 | =back | ||||||||||||
| 99 | |||||||||||||
| 100 | and Response Objects being: | ||||||||||||
| 101 | |||||||||||||
| 102 | - error object | ||||||||||||
| 103 | |||||||||||||
| 104 | |||||||||||||
| 105 | On success, the HTTP status code in the response header is 201 Created. The response body contains a snapshot_id in JSON format. The snapshot_id can be used to identify your playlist version in future requests. On error, the header status code is an error code and the response body contains an error object. Trying to add an item when you do not have the user’s authorization, or when there are more than 10.000 items in the playlist, returns error 403 Forbidden.Try in our Web Console | ||||||||||||
| 106 | |||||||||||||
| 107 | =cut | ||||||||||||
| 108 | |||||||||||||
| 109 | 0 | ▶ | async sub add_tracks_to_playlist { | ||||||||||
|
Subroutine
add_tracks_to_playlist: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 110 | 0 | my ($self, %args) = @_; | |||||||||||
| 111 | |||||||||||||
| 112 | 0 | my $mapping = $self->mapping; | |||||||||||
| 113 | 0 | ▶ | my $request->{method} = $mapping->{add_tracks_to_playlist}{method} // 'POST'; | ||||||||||
|
Condition0%0/2
$mapping->{"add_tracks_to_playlist"}{"method"} // "POST"
MC/DC0%0/1
$mapping->{"add_tracks_to_playlist"}{"method"} // "POST"
$mapping->{"add_tracks_to_playlist"}{"method"}
Truth table0%0/2
A
A= $mapping->{"add_tracks_to_playlist"}{"method"}
| |||||||||||||
| 114 | 0 | ▶ | $request->{uri} = $mapping->{add_tracks_to_playlist}{uri} // 'https://api.spotify.com/v1/playlists/{playlist_id}/tracks'; | ||||||||||
|
Condition0%0/2
$mapping->{"add_tracks_to_playlist"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/tracks"
MC/DC0%0/1
$mapping->{"add_tracks_to_playlist"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/tracks"
$mapping->{"add_tracks_to_playlist"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"add_tracks_to_playlist"}{"uri"}
| |||||||||||||
| 115 | $request->{param} = $mapping->{add_tracks_to_playlist}{param} // { | ||||||||||||
| 116 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"add_tracks_to_playlist"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "required"}}, "json_body_parameter", {"position", {"type", "integer", "required", "optional"}, "uris", {"type", "array[string]", "required", "optional"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}, "query_parameter", {"position", {"type", "integer", "required", "optional"}, "uris", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"add_tracks_to_playlist"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "required"}}, "json_body_parameter", {"position", {"type", "integer", "required", "optional"}, "uris", {"type", "array[string]", "required", "optional"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}, "query_parameter", {"position", {"type", "integer", "required", "optional"}, "uris", {"type", "string", "required", "optional"}}}
$mapping->{"add_tracks_to_playlist"}{"param"}
Truth table0%0/2
A
A= $mapping->{"add_tracks_to_playlist"}{"param"}
| |||||||||||||
| 117 | 'Authorization' => { | ||||||||||||
| 118 | type => 'string', | ||||||||||||
| 119 | required => 'required', | ||||||||||||
| 120 | }, | ||||||||||||
| 121 | 'Content-Type' => { | ||||||||||||
| 122 | type => 'string', | ||||||||||||
| 123 | required => 'required', | ||||||||||||
| 124 | }, | ||||||||||||
| 125 | }, | ||||||||||||
| 126 | json_body_parameter => { | ||||||||||||
| 127 | 'position' => { | ||||||||||||
| 128 | type => 'integer', | ||||||||||||
| 129 | required => 'optional', | ||||||||||||
| 130 | }, | ||||||||||||
| 131 | 'uris' => { | ||||||||||||
| 132 | type => 'array[string]', | ||||||||||||
| 133 | required => 'optional', | ||||||||||||
| 134 | }, | ||||||||||||
| 135 | }, | ||||||||||||
| 136 | path_parameter => { | ||||||||||||
| 137 | 'playlist_id' => { | ||||||||||||
| 138 | type => 'string', | ||||||||||||
| 139 | required => 'required', | ||||||||||||
| 140 | }, | ||||||||||||
| 141 | }, | ||||||||||||
| 142 | query_parameter => { | ||||||||||||
| 143 | 'position' => { | ||||||||||||
| 144 | type => 'integer', | ||||||||||||
| 145 | required => 'optional', | ||||||||||||
| 146 | }, | ||||||||||||
| 147 | 'uris' => { | ||||||||||||
| 148 | type => 'string', | ||||||||||||
| 149 | required => 'optional', | ||||||||||||
| 150 | }, | ||||||||||||
| 151 | }, | ||||||||||||
| 152 | }; | ||||||||||||
| 153 | my $response_objs = $mapping->{add_tracks_to_playlist}{response} // [ | ||||||||||||
| 154 | 0 | ▶ | 'error object', | ||||||||||
|
Condition0%0/2
$mapping->{"add_tracks_to_playlist"}{"response"} // ["error object"]
MC/DC0%0/1
$mapping->{"add_tracks_to_playlist"}{"response"} // ["error object"]
$mapping->{"add_tracks_to_playlist"}{"response"}
Truth table0%0/2
A
A= $mapping->{"add_tracks_to_playlist"}{"response"}
| |||||||||||||
| 155 | |||||||||||||
| 156 | ]; | ||||||||||||
| 157 | |||||||||||||
| 158 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 159 | 2 | } | |||||||||||
| 160 | |||||||||||||
| 161 | =head2 change_playlist_details | ||||||||||||
| 162 | |||||||||||||
| 163 | change_playlist_details - Change a Playlist's Details | ||||||||||||
| 164 | |||||||||||||
| 165 | Change a playlist’s name and public/private state. (The user must, of | ||||||||||||
| 166 | course, own the playlist.) | ||||||||||||
| 167 | |||||||||||||
| 168 | with Request details being: | ||||||||||||
| 169 | |||||||||||||
| 170 | =head3 header | ||||||||||||
| 171 | |||||||||||||
| 172 | =over 4 | ||||||||||||
| 173 | |||||||||||||
| 174 | =item Authorization | ||||||||||||
| 175 | |||||||||||||
| 176 | Type: string | Required: required | ||||||||||||
| 177 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been issued on behalf of the user.Changing a public playlist for a user requires authorization of the playlist-modify-public scope; changing a private playlist requires the playlist-modify-private scope. See Using Scopes. | ||||||||||||
| 178 | |||||||||||||
| 179 | =item Content-Type | ||||||||||||
| 180 | |||||||||||||
| 181 | Type: string | Required: required | ||||||||||||
| 182 | The content type of the request body: application/json | ||||||||||||
| 183 | |||||||||||||
| 184 | =back | ||||||||||||
| 185 | |||||||||||||
| 186 | =head3 json_body_parameter | ||||||||||||
| 187 | |||||||||||||
| 188 | =over 4 | ||||||||||||
| 189 | |||||||||||||
| 190 | =item collaborative | ||||||||||||
| 191 | |||||||||||||
| 192 | Type: boolean | Required: optional | ||||||||||||
| 193 | If true , the playlist will become collaborative and other users will be able to modify the playlist in their Spotify client. Note: You can only set collaborative to true on non-public playlists. | ||||||||||||
| 194 | |||||||||||||
| 195 | =item description | ||||||||||||
| 196 | |||||||||||||
| 197 | Type: string | Required: optional | ||||||||||||
| 198 | Value for playlist description as displayed in Spotify Clients and in the Web API. | ||||||||||||
| 199 | |||||||||||||
| 200 | =item name | ||||||||||||
| 201 | |||||||||||||
| 202 | Type: string | Required: optional | ||||||||||||
| 203 | The new name for the playlist, for example "My New Playlist Title" | ||||||||||||
| 204 | |||||||||||||
| 205 | =item public | ||||||||||||
| 206 | |||||||||||||
| 207 | Type: boolean | Required: optional | ||||||||||||
| 208 | If true the playlist will be public, if false it will be private. | ||||||||||||
| 209 | |||||||||||||
| 210 | =back | ||||||||||||
| 211 | |||||||||||||
| 212 | =head3 path_parameter | ||||||||||||
| 213 | |||||||||||||
| 214 | =over 4 | ||||||||||||
| 215 | |||||||||||||
| 216 | =item playlist_id | ||||||||||||
| 217 | |||||||||||||
| 218 | Type: string | Required: required | ||||||||||||
| 219 | The Spotify ID | ||||||||||||
| 220 | for the playlist. | ||||||||||||
| 221 | |||||||||||||
| 222 | =back | ||||||||||||
| 223 | |||||||||||||
| 224 | and Response Objects being: | ||||||||||||
| 225 | |||||||||||||
| 226 | - error object | ||||||||||||
| 227 | |||||||||||||
| 228 | |||||||||||||
| 229 | On success the HTTP status code in the response header is 200 OK.On error, the header status code is an error code and the response body contains an error object. Trying to change a playlist when you do not have the user’s authorization returns error 403 Forbidden.Try in our Web Console | ||||||||||||
| 230 | |||||||||||||
| 231 | =cut | ||||||||||||
| 232 | |||||||||||||
| 233 | 0 | ▶ | async sub change_playlist_details { | ||||||||||
|
Subroutine
change_playlist_details: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 234 | 0 | my ($self, %args) = @_; | |||||||||||
| 235 | |||||||||||||
| 236 | 0 | my $mapping = $self->mapping; | |||||||||||
| 237 | 0 | ▶ | my $request->{method} = $mapping->{change_playlist_details}{method} // 'PUT'; | ||||||||||
|
Condition0%0/2
$mapping->{"change_playlist_details"}{"method"} // "PUT"
MC/DC0%0/1
$mapping->{"change_playlist_details"}{"method"} // "PUT"
$mapping->{"change_playlist_details"}{"method"}
Truth table0%0/2
A
A= $mapping->{"change_playlist_details"}{"method"}
| |||||||||||||
| 238 | 0 | ▶ | $request->{uri} = $mapping->{change_playlist_details}{uri} // 'https://api.spotify.com/v1/playlists/{playlist_id}'; | ||||||||||
|
Condition0%0/2
$mapping->{"change_playlist_details"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}"
MC/DC0%0/1
$mapping->{"change_playlist_details"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}"
$mapping->{"change_playlist_details"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"change_playlist_details"}{"uri"}
| |||||||||||||
| 239 | $request->{param} = $mapping->{change_playlist_details}{param} // { | ||||||||||||
| 240 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"change_playlist_details"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "required"}}, "json_body_parameter", {"collaborative", {"type", "boolean", "required", "optional"}, "description", {"type", "string", "required", "optional"}, "name", {"type", "string", "required", "optional"}, "public", {"type", "boolean", "required", "optional"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"change_playlist_details"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "required"}}, "json_body_parameter", {"collaborative", {"type", "boolean", "required", "optional"}, "description", {"type", "string", "required", "optional"}, "name", {"type", "string", "required", "optional"}, "public", {"type", "boolean", "required", "optional"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}}
$mapping->{"change_playlist_details"}{"param"}
Truth table0%0/2
A
A= $mapping->{"change_playlist_details"}{"param"}
| |||||||||||||
| 241 | 'Authorization' => { | ||||||||||||
| 242 | type => 'string', | ||||||||||||
| 243 | required => 'required', | ||||||||||||
| 244 | }, | ||||||||||||
| 245 | 'Content-Type' => { | ||||||||||||
| 246 | type => 'string', | ||||||||||||
| 247 | required => 'required', | ||||||||||||
| 248 | }, | ||||||||||||
| 249 | }, | ||||||||||||
| 250 | json_body_parameter => { | ||||||||||||
| 251 | 'collaborative' => { | ||||||||||||
| 252 | type => 'boolean', | ||||||||||||
| 253 | required => 'optional', | ||||||||||||
| 254 | }, | ||||||||||||
| 255 | 'description' => { | ||||||||||||
| 256 | type => 'string', | ||||||||||||
| 257 | required => 'optional', | ||||||||||||
| 258 | }, | ||||||||||||
| 259 | 'name' => { | ||||||||||||
| 260 | type => 'string', | ||||||||||||
| 261 | required => 'optional', | ||||||||||||
| 262 | }, | ||||||||||||
| 263 | 'public' => { | ||||||||||||
| 264 | type => 'boolean', | ||||||||||||
| 265 | required => 'optional', | ||||||||||||
| 266 | }, | ||||||||||||
| 267 | }, | ||||||||||||
| 268 | path_parameter => { | ||||||||||||
| 269 | 'playlist_id' => { | ||||||||||||
| 270 | type => 'string', | ||||||||||||
| 271 | required => 'required', | ||||||||||||
| 272 | }, | ||||||||||||
| 273 | }, | ||||||||||||
| 274 | }; | ||||||||||||
| 275 | my $response_objs = $mapping->{change_playlist_details}{response} // [ | ||||||||||||
| 276 | 0 | ▶ | 'error object', | ||||||||||
|
Condition0%0/2
$mapping->{"change_playlist_details"}{"response"} // ["error object"]
MC/DC0%0/1
$mapping->{"change_playlist_details"}{"response"} // ["error object"]
$mapping->{"change_playlist_details"}{"response"}
Truth table0%0/2
A
A= $mapping->{"change_playlist_details"}{"response"}
| |||||||||||||
| 277 | |||||||||||||
| 278 | ]; | ||||||||||||
| 279 | |||||||||||||
| 280 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 281 | 2 | } | |||||||||||
| 282 | |||||||||||||
| 283 | =head2 create_playlist | ||||||||||||
| 284 | |||||||||||||
| 285 | create_playlist - Create a Playlist | ||||||||||||
| 286 | |||||||||||||
| 287 | Create a playlist for a Spotify user. (The playlist will be empty until | ||||||||||||
| 288 | you add tracks.) | ||||||||||||
| 289 | |||||||||||||
| 290 | with Request details being: | ||||||||||||
| 291 | |||||||||||||
| 292 | =head3 header | ||||||||||||
| 293 | |||||||||||||
| 294 | =over 4 | ||||||||||||
| 295 | |||||||||||||
| 296 | =item Authorization | ||||||||||||
| 297 | |||||||||||||
| 298 | Type: string | Required: required | ||||||||||||
| 299 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been issued on behalf of the user. Creating a public playlist for a user requires authorization of the playlist-modify-public scope; creating a private playlist requires the playlist-modify-private scope. See Using Scopes. | ||||||||||||
| 300 | |||||||||||||
| 301 | =item Content-Type | ||||||||||||
| 302 | |||||||||||||
| 303 | Type: string | Required: optional | ||||||||||||
| 304 | The content type of the request body: application/json | ||||||||||||
| 305 | |||||||||||||
| 306 | =back | ||||||||||||
| 307 | |||||||||||||
| 308 | =head3 json_body_parameter | ||||||||||||
| 309 | |||||||||||||
| 310 | =over 4 | ||||||||||||
| 311 | |||||||||||||
| 312 | =item collaborative | ||||||||||||
| 313 | |||||||||||||
| 314 | Type: boolean | Required: optional | ||||||||||||
| 315 | Defaults to false . If true the playlist will be collaborative. Note that to create a collaborative playlist you must also set public to false . To create collaborative playlists you must have granted playlist-modify-private and playlist-modify-public scopes . | ||||||||||||
| 316 | |||||||||||||
| 317 | =item description | ||||||||||||
| 318 | |||||||||||||
| 319 | Type: string | Required: optional | ||||||||||||
| 320 | value for playlist description as displayed in Spotify Clients and in the Web API. | ||||||||||||
| 321 | |||||||||||||
| 322 | =item name | ||||||||||||
| 323 | |||||||||||||
| 324 | Type: string | Required: required | ||||||||||||
| 325 | The name for the new playlist, for example "Your Coolest Playlist" . This name does not need to be unique; a user may have several playlists with the same name. | ||||||||||||
| 326 | |||||||||||||
| 327 | =item public | ||||||||||||
| 328 | |||||||||||||
| 329 | Type: boolean | Required: optional | ||||||||||||
| 330 | Defaults to true . If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope | ||||||||||||
| 331 | |||||||||||||
| 332 | =back | ||||||||||||
| 333 | |||||||||||||
| 334 | =head3 path_parameter | ||||||||||||
| 335 | |||||||||||||
| 336 | =over 4 | ||||||||||||
| 337 | |||||||||||||
| 338 | =item user_id | ||||||||||||
| 339 | |||||||||||||
| 340 | Type: string | Required: required | ||||||||||||
| 341 | The user’s Spotify user ID. | ||||||||||||
| 342 | |||||||||||||
| 343 | =back | ||||||||||||
| 344 | |||||||||||||
| 345 | and Response Objects being: | ||||||||||||
| 346 | |||||||||||||
| 347 | - playlist object | ||||||||||||
| 348 | - error object | ||||||||||||
| 349 | |||||||||||||
| 350 | |||||||||||||
| 351 | On success, the response body contains the created playlist object | ||||||||||||
| 352 | in JSON format and the HTTP status code in the response header is 200 OK or | ||||||||||||
| 353 | 201 Created. There is also a Location response header giving the Web API | ||||||||||||
| 354 | endpoint for the new playlist.On error, the header status code is an error code and the response body contains an error object. Trying to create a playlist when you do not have the user’s authorization returns error 403 Forbidden.Try in our Web Console | ||||||||||||
| 355 | |||||||||||||
| 356 | =cut | ||||||||||||
| 357 | |||||||||||||
| 358 | 0 | ▶ | async sub create_playlist { | ||||||||||
|
Subroutine
create_playlist: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 359 | 0 | my ($self, %args) = @_; | |||||||||||
| 360 | |||||||||||||
| 361 | 0 | my $mapping = $self->mapping; | |||||||||||
| 362 | 0 | ▶ | my $request->{method} = $mapping->{create_playlist}{method} // 'POST'; | ||||||||||
|
Condition0%0/2
$mapping->{"create_playlist"}{"method"} // "POST"
MC/DC0%0/1
$mapping->{"create_playlist"}{"method"} // "POST"
$mapping->{"create_playlist"}{"method"}
Truth table0%0/2
A
A= $mapping->{"create_playlist"}{"method"}
| |||||||||||||
| 363 | 0 | ▶ | $request->{uri} = $mapping->{create_playlist}{uri} // 'https://api.spotify.com/v1/users/{user_id}/playlists'; | ||||||||||
|
Condition0%0/2
$mapping->{"create_playlist"}{"uri"} // "https://api.spotify.com/v1/users/{user_id}/playlists"
MC/DC0%0/1
$mapping->{"create_playlist"}{"uri"} // "https://api.spotify.com/v1/users/{user_id}/playlists"
$mapping->{"create_playlist"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"create_playlist"}{"uri"}
| |||||||||||||
| 364 | $request->{param} = $mapping->{create_playlist}{param} // { | ||||||||||||
| 365 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"create_playlist"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "optional"}}, "json_body_parameter", {"collaborative", {"type", "boolean", "required", "optional"}, "description", {"type", "string", "required", "optional"}, "name", {"type", "string", "required", "required"}, "public", {"type", "boolean", "required", "optional"}}, "path_parameter", {"user_id", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"create_playlist"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "optional"}}, "json_body_parameter", {"collaborative", {"type", "boolean", "required", "optional"}, "description", {"type", "string", "required", "optional"}, "name", {"type", "string", "required", "required"}, "public", {"type", "boolean", "required", "optional"}}, "path_parameter", {"user_id", {"type", "string", "required", "required"}}}
$mapping->{"create_playlist"}{"param"}
Truth table0%0/2
A
A= $mapping->{"create_playlist"}{"param"}
| |||||||||||||
| 366 | 'Authorization' => { | ||||||||||||
| 367 | type => 'string', | ||||||||||||
| 368 | required => 'required', | ||||||||||||
| 369 | }, | ||||||||||||
| 370 | 'Content-Type' => { | ||||||||||||
| 371 | type => 'string', | ||||||||||||
| 372 | required => 'optional', | ||||||||||||
| 373 | }, | ||||||||||||
| 374 | }, | ||||||||||||
| 375 | json_body_parameter => { | ||||||||||||
| 376 | 'collaborative' => { | ||||||||||||
| 377 | type => 'boolean', | ||||||||||||
| 378 | required => 'optional', | ||||||||||||
| 379 | }, | ||||||||||||
| 380 | 'description' => { | ||||||||||||
| 381 | type => 'string', | ||||||||||||
| 382 | required => 'optional', | ||||||||||||
| 383 | }, | ||||||||||||
| 384 | 'name' => { | ||||||||||||
| 385 | type => 'string', | ||||||||||||
| 386 | required => 'required', | ||||||||||||
| 387 | }, | ||||||||||||
| 388 | 'public' => { | ||||||||||||
| 389 | type => 'boolean', | ||||||||||||
| 390 | required => 'optional', | ||||||||||||
| 391 | }, | ||||||||||||
| 392 | }, | ||||||||||||
| 393 | path_parameter => { | ||||||||||||
| 394 | 'user_id' => { | ||||||||||||
| 395 | type => 'string', | ||||||||||||
| 396 | required => 'required', | ||||||||||||
| 397 | }, | ||||||||||||
| 398 | }, | ||||||||||||
| 399 | }; | ||||||||||||
| 400 | my $response_objs = $mapping->{create_playlist}{response} // [ | ||||||||||||
| 401 | 0 | ▶ | 'playlist object', | ||||||||||
|
Condition0%0/2
$mapping->{"create_playlist"}{"response"} // ["playlist object", "error object"]
MC/DC0%0/1
$mapping->{"create_playlist"}{"response"} // ["playlist object", "error object"]
$mapping->{"create_playlist"}{"response"}
Truth table0%0/2
A
A= $mapping->{"create_playlist"}{"response"}
| |||||||||||||
| 402 | 'error object', | ||||||||||||
| 403 | |||||||||||||
| 404 | ]; | ||||||||||||
| 405 | |||||||||||||
| 406 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 407 | 2 | } | |||||||||||
| 408 | |||||||||||||
| 409 | =head2 get_a_list_of_current_users_playlists | ||||||||||||
| 410 | |||||||||||||
| 411 | get_a_list_of_current_users_playlists - Get a List of Current User's Playlists | ||||||||||||
| 412 | |||||||||||||
| 413 | Get a list of the playlists owned or followed by the current Spotify | ||||||||||||
| 414 | user. | ||||||||||||
| 415 | |||||||||||||
| 416 | with Request details being: | ||||||||||||
| 417 | |||||||||||||
| 418 | =head3 header | ||||||||||||
| 419 | |||||||||||||
| 420 | =over 4 | ||||||||||||
| 421 | |||||||||||||
| 422 | =item Authorization | ||||||||||||
| 423 | |||||||||||||
| 424 | Type: string | Required: required | ||||||||||||
| 425 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.Private playlists are only retrievable for the current user and requires the playlist-read-private scope to have been authorized by the user. Note that this scope alone will not return collaborative playlists, even though they are always private.Collaborative playlists are only retrievable for the current user and requires the playlist-read-collaborative scope to have been authorized by the user. | ||||||||||||
| 426 | |||||||||||||
| 427 | =back | ||||||||||||
| 428 | |||||||||||||
| 429 | =head3 query_parameter | ||||||||||||
| 430 | |||||||||||||
| 431 | =over 4 | ||||||||||||
| 432 | |||||||||||||
| 433 | =item limit | ||||||||||||
| 434 | |||||||||||||
| 435 | Type: integer | Required: optional | ||||||||||||
| 436 | ‘The maximum number of playlists to return. Default: | ||||||||||||
| 437 | 20. Minimum: 1. Maximum: 50.’ | ||||||||||||
| 438 | |||||||||||||
| 439 | =item offset | ||||||||||||
| 440 | |||||||||||||
| 441 | Type: integer | Required: optional | ||||||||||||
| 442 | ‘The index of the first playlist to return. Default: | ||||||||||||
| 443 | 0 (the first object). Maximum offset: 100.000. Use with limit to get the | ||||||||||||
| 444 | next set of playlists.’ | ||||||||||||
| 445 | |||||||||||||
| 446 | =back | ||||||||||||
| 447 | |||||||||||||
| 448 | and Response Objects being: | ||||||||||||
| 449 | |||||||||||||
| 450 | - playlist object | ||||||||||||
| 451 | |||||||||||||
| 452 | |||||||||||||
| 453 | 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. Please note that the access token has to be tied to a user.Try in our Web Console | ||||||||||||
| 454 | |||||||||||||
| 455 | =cut | ||||||||||||
| 456 | |||||||||||||
| 457 | 0 | ▶ | async sub get_a_list_of_current_users_playlists { | ||||||||||
|
Subroutine
get_a_list_of_current_users_playlists: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 458 | 0 | my ($self, %args) = @_; | |||||||||||
| 459 | |||||||||||||
| 460 | 0 | my $mapping = $self->mapping; | |||||||||||
| 461 | 0 | ▶ | my $request->{method} = $mapping->{get_a_list_of_current_users_playlists}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_list_of_current_users_playlists"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_a_list_of_current_users_playlists"}{"method"} // "GET"
$mapping->{"get_a_list_of_current_users_playlists"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_a_list_of_current_users_playlists"}{"method"}
| |||||||||||||
| 462 | 0 | ▶ | $request->{uri} = $mapping->{get_a_list_of_current_users_playlists}{uri} // 'https://api.spotify.com/v1/me/playlists'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_list_of_current_users_playlists"}{"uri"} // "https://api.spotify.com/v1/me/playlists"
MC/DC0%0/1
$mapping->{"get_a_list_of_current_users_playlists"}{"uri"} // "https://api.spotify.com/v1/me/playlists"
$mapping->{"get_a_list_of_current_users_playlists"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_a_list_of_current_users_playlists"}{"uri"}
| |||||||||||||
| 463 | $request->{param} = $mapping->{get_a_list_of_current_users_playlists}{param} // { | ||||||||||||
| 464 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_list_of_current_users_playlists"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_a_list_of_current_users_playlists"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
$mapping->{"get_a_list_of_current_users_playlists"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_a_list_of_current_users_playlists"}{"param"}
| |||||||||||||
| 465 | 'Authorization' => { | ||||||||||||
| 466 | type => 'string', | ||||||||||||
| 467 | required => 'required', | ||||||||||||
| 468 | }, | ||||||||||||
| 469 | }, | ||||||||||||
| 470 | query_parameter => { | ||||||||||||
| 471 | 'limit' => { | ||||||||||||
| 472 | type => 'integer', | ||||||||||||
| 473 | required => 'optional', | ||||||||||||
| 474 | }, | ||||||||||||
| 475 | 'offset' => { | ||||||||||||
| 476 | type => 'integer', | ||||||||||||
| 477 | required => 'optional', | ||||||||||||
| 478 | }, | ||||||||||||
| 479 | }, | ||||||||||||
| 480 | }; | ||||||||||||
| 481 | my $response_objs = $mapping->{get_a_list_of_current_users_playlists}{response} // [ | ||||||||||||
| 482 | 0 | ▶ | 'playlist object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_list_of_current_users_playlists"}{"response"} // ["playlist object"]
MC/DC0%0/1
$mapping->{"get_a_list_of_current_users_playlists"}{"response"} // ["playlist object"]
$mapping->{"get_a_list_of_current_users_playlists"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_a_list_of_current_users_playlists"}{"response"}
| |||||||||||||
| 483 | |||||||||||||
| 484 | ]; | ||||||||||||
| 485 | |||||||||||||
| 486 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 487 | 2 | } | |||||||||||
| 488 | |||||||||||||
| 489 | =head2 get_list_users_playlists | ||||||||||||
| 490 | |||||||||||||
| 491 | get_list_users_playlists - Get a List of a User's Playlists | ||||||||||||
| 492 | |||||||||||||
| 493 | Get a list of the playlists owned or followed by a Spotify user. | ||||||||||||
| 494 | |||||||||||||
| 495 | with Request details being: | ||||||||||||
| 496 | |||||||||||||
| 497 | =head3 header | ||||||||||||
| 498 | |||||||||||||
| 499 | =over 4 | ||||||||||||
| 500 | |||||||||||||
| 501 | =item Authorization | ||||||||||||
| 502 | |||||||||||||
| 503 | Type: string | Required: required | ||||||||||||
| 504 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.Private playlists are only retrievable for the current user and requires the playlist-read-private scope to have been authorized by the user. Note that this scope alone will not return collaborative playlists, even though they are always private.Collaborative playlists are only retrievable for the current user and requires the playlist-read-collaborative scope to have been authorized by the user. | ||||||||||||
| 505 | |||||||||||||
| 506 | =back | ||||||||||||
| 507 | |||||||||||||
| 508 | =head3 path_parameter | ||||||||||||
| 509 | |||||||||||||
| 510 | =over 4 | ||||||||||||
| 511 | |||||||||||||
| 512 | =item user_id | ||||||||||||
| 513 | |||||||||||||
| 514 | Type: string | Required: required | ||||||||||||
| 515 | The user’s Spotify user ID. | ||||||||||||
| 516 | |||||||||||||
| 517 | =back | ||||||||||||
| 518 | |||||||||||||
| 519 | =head3 query_parameter | ||||||||||||
| 520 | |||||||||||||
| 521 | =over 4 | ||||||||||||
| 522 | |||||||||||||
| 523 | =item limit | ||||||||||||
| 524 | |||||||||||||
| 525 | Type: integer | Required: optional | ||||||||||||
| 526 | The maximum number of playlists to return. Default: | ||||||||||||
| 527 | 20. Minimum: 1. Maximum: 50. | ||||||||||||
| 528 | |||||||||||||
| 529 | =item offset | ||||||||||||
| 530 | |||||||||||||
| 531 | Type: integer | Required: optional | ||||||||||||
| 532 | The index of the first playlist to return. Default: | ||||||||||||
| 533 | 0 (the first object). Maximum offset: 100.000. Use with limit to get the | ||||||||||||
| 534 | next set of playlists. | ||||||||||||
| 535 | |||||||||||||
| 536 | =back | ||||||||||||
| 537 | |||||||||||||
| 538 | and Response Objects being: | ||||||||||||
| 539 | |||||||||||||
| 540 | - playlist object | ||||||||||||
| 541 | |||||||||||||
| 542 | |||||||||||||
| 543 | 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.Try in our Web Console | ||||||||||||
| 544 | |||||||||||||
| 545 | =cut | ||||||||||||
| 546 | |||||||||||||
| 547 | 0 | ▶ | async sub get_list_users_playlists { | ||||||||||
|
Subroutine
get_list_users_playlists: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 548 | 0 | my ($self, %args) = @_; | |||||||||||
| 549 | |||||||||||||
| 550 | 0 | my $mapping = $self->mapping; | |||||||||||
| 551 | 0 | ▶ | my $request->{method} = $mapping->{get_list_users_playlists}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_list_users_playlists"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_list_users_playlists"}{"method"} // "GET"
$mapping->{"get_list_users_playlists"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_list_users_playlists"}{"method"}
| |||||||||||||
| 552 | 0 | ▶ | $request->{uri} = $mapping->{get_list_users_playlists}{uri} // 'https://api.spotify.com/v1/users/{user_id}/playlists'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_list_users_playlists"}{"uri"} // "https://api.spotify.com/v1/users/{user_id}/playlists"
MC/DC0%0/1
$mapping->{"get_list_users_playlists"}{"uri"} // "https://api.spotify.com/v1/users/{user_id}/playlists"
$mapping->{"get_list_users_playlists"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_list_users_playlists"}{"uri"}
| |||||||||||||
| 553 | $request->{param} = $mapping->{get_list_users_playlists}{param} // { | ||||||||||||
| 554 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_list_users_playlists"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"user_id", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_list_users_playlists"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"user_id", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
$mapping->{"get_list_users_playlists"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_list_users_playlists"}{"param"}
| |||||||||||||
| 555 | 'Authorization' => { | ||||||||||||
| 556 | type => 'string', | ||||||||||||
| 557 | required => 'required', | ||||||||||||
| 558 | }, | ||||||||||||
| 559 | }, | ||||||||||||
| 560 | path_parameter => { | ||||||||||||
| 561 | 'user_id' => { | ||||||||||||
| 562 | type => 'string', | ||||||||||||
| 563 | required => 'required', | ||||||||||||
| 564 | }, | ||||||||||||
| 565 | }, | ||||||||||||
| 566 | query_parameter => { | ||||||||||||
| 567 | 'limit' => { | ||||||||||||
| 568 | type => 'integer', | ||||||||||||
| 569 | required => 'optional', | ||||||||||||
| 570 | }, | ||||||||||||
| 571 | 'offset' => { | ||||||||||||
| 572 | type => 'integer', | ||||||||||||
| 573 | required => 'optional', | ||||||||||||
| 574 | }, | ||||||||||||
| 575 | }, | ||||||||||||
| 576 | }; | ||||||||||||
| 577 | my $response_objs = $mapping->{get_list_users_playlists}{response} // [ | ||||||||||||
| 578 | 0 | ▶ | 'playlist object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_list_users_playlists"}{"response"} // ["playlist object"]
MC/DC0%0/1
$mapping->{"get_list_users_playlists"}{"response"} // ["playlist object"]
$mapping->{"get_list_users_playlists"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_list_users_playlists"}{"response"}
| |||||||||||||
| 579 | |||||||||||||
| 580 | ]; | ||||||||||||
| 581 | |||||||||||||
| 582 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 583 | 2 | } | |||||||||||
| 584 | |||||||||||||
| 585 | =head2 get_playlist | ||||||||||||
| 586 | |||||||||||||
| 587 | get_playlist - Get a Playlist | ||||||||||||
| 588 | |||||||||||||
| 589 | Get a playlist owned by a Spotify user. | ||||||||||||
| 590 | |||||||||||||
| 591 | with Request details being: | ||||||||||||
| 592 | |||||||||||||
| 593 | =head3 header | ||||||||||||
| 594 | |||||||||||||
| 595 | =over 4 | ||||||||||||
| 596 | |||||||||||||
| 597 | =item Authorization | ||||||||||||
| 598 | |||||||||||||
| 599 | Type: string | Required: required | ||||||||||||
| 600 | A valid access token from the Spotify Accounts service: | ||||||||||||
| 601 | see the Web API Authorization Guide | ||||||||||||
| 602 | for details. Both Public and Private playlists belonging to any user are retrievable | ||||||||||||
| 603 | on provision of a valid access token. | ||||||||||||
| 604 | |||||||||||||
| 605 | =back | ||||||||||||
| 606 | |||||||||||||
| 607 | =head3 path_parameter | ||||||||||||
| 608 | |||||||||||||
| 609 | =over 4 | ||||||||||||
| 610 | |||||||||||||
| 611 | =item playlist_id | ||||||||||||
| 612 | |||||||||||||
| 613 | Type: string | Required: required | ||||||||||||
| 614 | The Spotify ID | ||||||||||||
| 615 | for the playlist. | ||||||||||||
| 616 | |||||||||||||
| 617 | =back | ||||||||||||
| 618 | |||||||||||||
| 619 | =head3 query_parameter | ||||||||||||
| 620 | |||||||||||||
| 621 | =over 4 | ||||||||||||
| 622 | |||||||||||||
| 623 | =item additional_types | ||||||||||||
| 624 | |||||||||||||
| 625 | Type: string | Required: optional | ||||||||||||
| 626 | A comma-separated list of item types that your client supports besides the default track type. Valid types are: track and episode. | ||||||||||||
| 627 | Note: This parameter was introduced to allow existing clients to maintain their current behaviour and might be deprecated in the future. | ||||||||||||
| 628 | In addition to providing this parameter, make sure that your client properly handles cases of new types in the future by checking against the type field of each object. | ||||||||||||
| 629 | |||||||||||||
| 630 | =item fields | ||||||||||||
| 631 | |||||||||||||
| 632 | Type: string | Required: optional | ||||||||||||
| 633 | Filters for the query: a comma-separated list of the | ||||||||||||
| 634 | fields to return. If omitted, all fields are returned. For example, to get | ||||||||||||
| 635 | just the playlist’’s description and URI: fields=description,uri. A dot | ||||||||||||
| 636 | separator can be used to specify non-reoccurring fields, while parentheses | ||||||||||||
| 637 | can be used to specify reoccurring fields within objects. For example, to | ||||||||||||
| 638 | get just the added date and user ID of the adder: fields=tracks.items(added_at,added_by.id). | ||||||||||||
| 639 | Use multiple parentheses to drill down into nested objects, for example: fields=tracks.items(track(name,href,album(name,href))). | ||||||||||||
| 640 | Fields can be excluded by prefixing them with an exclamation mark, for example: | ||||||||||||
| 641 | fields=tracks.items(track(name,href,album(!name,href))) | ||||||||||||
| 642 | |||||||||||||
| 643 | =item market | ||||||||||||
| 644 | |||||||||||||
| 645 | Type: string | Required: optional | ||||||||||||
| 646 | An ISO 3166-1 alpha-2 country code | ||||||||||||
| 647 | or the string from_token. Provide this parameter if you want to apply Track | ||||||||||||
| 648 | Relinking. | ||||||||||||
| 649 | For episodes, if a valid user access token is specified in the request header, the country associated with | ||||||||||||
| 650 | the user account will take priority over this parameter. | ||||||||||||
| 651 | Note: If neither market or user country are provided, the episode is considered unavailable for the client. | ||||||||||||
| 652 | |||||||||||||
| 653 | =back | ||||||||||||
| 654 | |||||||||||||
| 655 | and Response Objects being: | ||||||||||||
| 656 | |||||||||||||
| 657 | - playlist object | ||||||||||||
| 658 | |||||||||||||
| 659 | |||||||||||||
| 660 | On success, the response body contains a playlist object in JSON format and the HTTP status code in the response header is 200 OK. If an episode is unavailable in the given market, its information will not be included in the response. On error, the header status code is an error code and the response body contains an error object. Requesting playlists that you do not have the user’s authorization to access returns error 403 Forbidden.Try in our Web Console | ||||||||||||
| 661 | |||||||||||||
| 662 | =cut | ||||||||||||
| 663 | |||||||||||||
| 664 | 0 | ▶ | async sub get_playlist { | ||||||||||
|
Subroutine
get_playlist: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 665 | 0 | my ($self, %args) = @_; | |||||||||||
| 666 | |||||||||||||
| 667 | 0 | my $mapping = $self->mapping; | |||||||||||
| 668 | 0 | ▶ | my $request->{method} = $mapping->{get_playlist}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlist"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_playlist"}{"method"} // "GET"
$mapping->{"get_playlist"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_playlist"}{"method"}
| |||||||||||||
| 669 | 0 | ▶ | $request->{uri} = $mapping->{get_playlist}{uri} // 'https://api.spotify.com/v1/playlists/{playlist_id}'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlist"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}"
MC/DC0%0/1
$mapping->{"get_playlist"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}"
$mapping->{"get_playlist"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_playlist"}{"uri"}
| |||||||||||||
| 670 | $request->{param} = $mapping->{get_playlist}{param} // { | ||||||||||||
| 671 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlist"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}, "query_parameter", {"additional_types", {"type", "string", "required", "optional"}, "fields", {"type", "string", "required", "optional"}, "market", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_playlist"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}, "query_parameter", {"additional_types", {"type", "string", "required", "optional"}, "fields", {"type", "string", "required", "optional"}, "market", {"type", "string", "required", "optional"}}}
$mapping->{"get_playlist"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_playlist"}{"param"}
| |||||||||||||
| 672 | 'Authorization' => { | ||||||||||||
| 673 | type => 'string', | ||||||||||||
| 674 | required => 'required', | ||||||||||||
| 675 | }, | ||||||||||||
| 676 | }, | ||||||||||||
| 677 | path_parameter => { | ||||||||||||
| 678 | 'playlist_id' => { | ||||||||||||
| 679 | type => 'string', | ||||||||||||
| 680 | required => 'required', | ||||||||||||
| 681 | }, | ||||||||||||
| 682 | }, | ||||||||||||
| 683 | query_parameter => { | ||||||||||||
| 684 | 'additional_types' => { | ||||||||||||
| 685 | type => 'string', | ||||||||||||
| 686 | required => 'optional', | ||||||||||||
| 687 | }, | ||||||||||||
| 688 | 'fields' => { | ||||||||||||
| 689 | type => 'string', | ||||||||||||
| 690 | required => 'optional', | ||||||||||||
| 691 | }, | ||||||||||||
| 692 | 'market' => { | ||||||||||||
| 693 | type => 'string', | ||||||||||||
| 694 | required => 'optional', | ||||||||||||
| 695 | }, | ||||||||||||
| 696 | }, | ||||||||||||
| 697 | }; | ||||||||||||
| 698 | my $response_objs = $mapping->{get_playlist}{response} // [ | ||||||||||||
| 699 | 0 | ▶ | 'playlist object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlist"}{"response"} // ["playlist object"]
MC/DC0%0/1
$mapping->{"get_playlist"}{"response"} // ["playlist object"]
$mapping->{"get_playlist"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_playlist"}{"response"}
| |||||||||||||
| 700 | |||||||||||||
| 701 | ]; | ||||||||||||
| 702 | |||||||||||||
| 703 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 704 | 2 | } | |||||||||||
| 705 | |||||||||||||
| 706 | =head2 get_playlist_cover | ||||||||||||
| 707 | |||||||||||||
| 708 | get_playlist_cover - Get a Playlist Cover Image | ||||||||||||
| 709 | |||||||||||||
| 710 | Get the current image associated with a specific playlist. | ||||||||||||
| 711 | |||||||||||||
| 712 | with Request details being: | ||||||||||||
| 713 | |||||||||||||
| 714 | =head3 header | ||||||||||||
| 715 | |||||||||||||
| 716 | =over 4 | ||||||||||||
| 717 | |||||||||||||
| 718 | =item Authorization | ||||||||||||
| 719 | |||||||||||||
| 720 | Type: string | Required: required | ||||||||||||
| 721 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been issued on behalf of the user.This access token must be issued on behalf of the user. Current playlist image for both Public and Private playlists of any user are retrievable on provision of a valid access token. | ||||||||||||
| 722 | |||||||||||||
| 723 | =back | ||||||||||||
| 724 | |||||||||||||
| 725 | =head3 path_parameter | ||||||||||||
| 726 | |||||||||||||
| 727 | =over 4 | ||||||||||||
| 728 | |||||||||||||
| 729 | =item playlist_id | ||||||||||||
| 730 | |||||||||||||
| 731 | Type: string | Required: required | ||||||||||||
| 732 | The Spotify ID | ||||||||||||
| 733 | for the playlist. | ||||||||||||
| 734 | |||||||||||||
| 735 | =back | ||||||||||||
| 736 | |||||||||||||
| 737 | and Response Objects being: | ||||||||||||
| 738 | |||||||||||||
| 739 | - image object | ||||||||||||
| 740 | |||||||||||||
| 741 | |||||||||||||
| 742 | On success, the response body contains a list of image objects in JSON format and the HTTP status code in the response header is 200 OK On error, the header status code is an error code and the response body contains an error object.Try in our Web Console | ||||||||||||
| 743 | |||||||||||||
| 744 | =cut | ||||||||||||
| 745 | |||||||||||||
| 746 | 0 | ▶ | async sub get_playlist_cover { | ||||||||||
|
Subroutine
get_playlist_cover: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 747 | 0 | my ($self, %args) = @_; | |||||||||||
| 748 | |||||||||||||
| 749 | 0 | my $mapping = $self->mapping; | |||||||||||
| 750 | 0 | ▶ | my $request->{method} = $mapping->{get_playlist_cover}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlist_cover"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_playlist_cover"}{"method"} // "GET"
$mapping->{"get_playlist_cover"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_playlist_cover"}{"method"}
| |||||||||||||
| 751 | 0 | ▶ | $request->{uri} = $mapping->{get_playlist_cover}{uri} // 'https://api.spotify.com/v1/playlists/{playlist_id}/images'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlist_cover"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/images"
MC/DC0%0/1
$mapping->{"get_playlist_cover"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/images"
$mapping->{"get_playlist_cover"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_playlist_cover"}{"uri"}
| |||||||||||||
| 752 | $request->{param} = $mapping->{get_playlist_cover}{param} // { | ||||||||||||
| 753 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlist_cover"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"get_playlist_cover"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}}
$mapping->{"get_playlist_cover"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_playlist_cover"}{"param"}
| |||||||||||||
| 754 | 'Authorization' => { | ||||||||||||
| 755 | type => 'string', | ||||||||||||
| 756 | required => 'required', | ||||||||||||
| 757 | }, | ||||||||||||
| 758 | }, | ||||||||||||
| 759 | path_parameter => { | ||||||||||||
| 760 | 'playlist_id' => { | ||||||||||||
| 761 | type => 'string', | ||||||||||||
| 762 | required => 'required', | ||||||||||||
| 763 | }, | ||||||||||||
| 764 | }, | ||||||||||||
| 765 | }; | ||||||||||||
| 766 | my $response_objs = $mapping->{get_playlist_cover}{response} // [ | ||||||||||||
| 767 | 0 | ▶ | 'image object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlist_cover"}{"response"} // ["image object"]
MC/DC0%0/1
$mapping->{"get_playlist_cover"}{"response"} // ["image object"]
$mapping->{"get_playlist_cover"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_playlist_cover"}{"response"}
| |||||||||||||
| 768 | |||||||||||||
| 769 | ]; | ||||||||||||
| 770 | |||||||||||||
| 771 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 772 | 2 | } | |||||||||||
| 773 | |||||||||||||
| 774 | =head2 get_playlists_tracks | ||||||||||||
| 775 | |||||||||||||
| 776 | get_playlists_tracks - Get a Playlist's Items | ||||||||||||
| 777 | |||||||||||||
| 778 | Get full details of the items of a playlist owned by a Spotify user. | ||||||||||||
| 779 | |||||||||||||
| 780 | with Request details being: | ||||||||||||
| 781 | |||||||||||||
| 782 | =head3 header | ||||||||||||
| 783 | |||||||||||||
| 784 | =over 4 | ||||||||||||
| 785 | |||||||||||||
| 786 | =item Authorization | ||||||||||||
| 787 | |||||||||||||
| 788 | Type: string | Required: required | ||||||||||||
| 789 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. Both Public and Private playlists belonging to any user are retrievable on provision of a valid access token. | ||||||||||||
| 790 | |||||||||||||
| 791 | =back | ||||||||||||
| 792 | |||||||||||||
| 793 | =head3 path_parameter | ||||||||||||
| 794 | |||||||||||||
| 795 | =over 4 | ||||||||||||
| 796 | |||||||||||||
| 797 | =item playlist_id | ||||||||||||
| 798 | |||||||||||||
| 799 | Type: string | Required: required | ||||||||||||
| 800 | The Spotify ID | ||||||||||||
| 801 | for the playlist. | ||||||||||||
| 802 | |||||||||||||
| 803 | =back | ||||||||||||
| 804 | |||||||||||||
| 805 | =head3 query_parameter | ||||||||||||
| 806 | |||||||||||||
| 807 | =over 4 | ||||||||||||
| 808 | |||||||||||||
| 809 | =item additional_types | ||||||||||||
| 810 | |||||||||||||
| 811 | Type: string | Required: optional | ||||||||||||
| 812 | A comma-separated list of item types that your client supports besides the default track type. Valid types are: track and episode. | ||||||||||||
| 813 | Note: This parameter was introduced to allow existing clients to maintain their current behaviour and might be deprecated in the future. | ||||||||||||
| 814 | In addition to providing this parameter, make sure that your client properly handles cases of new types in the future by checking against the type field of each object. | ||||||||||||
| 815 | |||||||||||||
| 816 | =item fields | ||||||||||||
| 817 | |||||||||||||
| 818 | Type: string | Required: optional | ||||||||||||
| 819 | Filters for the query: a comma-separated list of the | ||||||||||||
| 820 | fields to return. If omitted, all fields are returned. For example, to get | ||||||||||||
| 821 | just the total number of items and the request limit:fields=total,limitA | ||||||||||||
| 822 | dot separator can be used to specify non-reoccurring fields, while parentheses | ||||||||||||
| 823 | can be used to specify reoccurring fields within objects. For example, to | ||||||||||||
| 824 | get just the added date and user ID of the adder:fields=items(added_at,added_by.id)Use | ||||||||||||
| 825 | multiple parentheses to drill down into nested objects, for example:fields=items(track(name,href,album(name,href)))Fields | ||||||||||||
| 826 | can be excluded by prefixing them with an exclamation mark, for example:fields=items.track.album(!external_urls,images) | ||||||||||||
| 827 | |||||||||||||
| 828 | =item limit | ||||||||||||
| 829 | |||||||||||||
| 830 | Type: integer | Required: optional | ||||||||||||
| 831 | The maximum number of items to return. Default: 100. | ||||||||||||
| 832 | Minimum: 1. Maximum: 100. | ||||||||||||
| 833 | |||||||||||||
| 834 | =item market | ||||||||||||
| 835 | |||||||||||||
| 836 | Type: string | Required: required | ||||||||||||
| 837 | An ISO 3166-1 alpha-2 country code | ||||||||||||
| 838 | or the string from_token. Provide this parameter if you want to apply Track | ||||||||||||
| 839 | Relinking. | ||||||||||||
| 840 | For episodes, if a valid user access token is specified in the request header, the country associated with | ||||||||||||
| 841 | the user account will take priority over this parameter. | ||||||||||||
| 842 | Note: If neither market or user country are provided, the episode is considered unavailable for the client. | ||||||||||||
| 843 | |||||||||||||
| 844 | =item offset | ||||||||||||
| 845 | |||||||||||||
| 846 | Type: integer | Required: optional | ||||||||||||
| 847 | The index of the first item to return. Default: 0 | ||||||||||||
| 848 | (the first object). | ||||||||||||
| 849 | |||||||||||||
| 850 | =back | ||||||||||||
| 851 | |||||||||||||
| 852 | and Response Objects being: | ||||||||||||
| 853 | |||||||||||||
| 854 | - track object | ||||||||||||
| 855 | |||||||||||||
| 856 | |||||||||||||
| 857 | On success, the response body contains an array of track objects and episode objects (depends on the additional_types parameter), wrapped in a paging object in JSON format and the HTTP status code in the response header is 200 OK. If an episode is unavailable in the given market, its information will not be included in the response. On error, the header status code is an error code and the response body contains an error object. Requesting playlists that you do not have the user’s authorization to access returns error 403 Forbidden.Try in our Web Console | ||||||||||||
| 858 | |||||||||||||
| 859 | =cut | ||||||||||||
| 860 | |||||||||||||
| 861 | 0 | ▶ | async sub get_playlists_tracks { | ||||||||||
|
Subroutine
get_playlists_tracks: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 862 | 0 | my ($self, %args) = @_; | |||||||||||
| 863 | |||||||||||||
| 864 | 0 | my $mapping = $self->mapping; | |||||||||||
| 865 | 0 | ▶ | my $request->{method} = $mapping->{get_playlists_tracks}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlists_tracks"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_playlists_tracks"}{"method"} // "GET"
$mapping->{"get_playlists_tracks"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_playlists_tracks"}{"method"}
| |||||||||||||
| 866 | 0 | ▶ | $request->{uri} = $mapping->{get_playlists_tracks}{uri} // 'https://api.spotify.com/v1/playlists/{playlist_id}/tracks'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlists_tracks"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/tracks"
MC/DC0%0/1
$mapping->{"get_playlists_tracks"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/tracks"
$mapping->{"get_playlists_tracks"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_playlists_tracks"}{"uri"}
| |||||||||||||
| 867 | $request->{param} = $mapping->{get_playlists_tracks}{param} // { | ||||||||||||
| 868 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlists_tracks"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}, "query_parameter", {"additional_types", {"type", "string", "required", "optional"}, "fields", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "market", {"type", "string", "required", "required"}, "offset", {"type", "integer", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_playlists_tracks"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}, "query_parameter", {"additional_types", {"type", "string", "required", "optional"}, "fields", {"type", "string", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}, "market", {"type", "string", "required", "required"}, "offset", {"type", "integer", "required", "optional"}}}
$mapping->{"get_playlists_tracks"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_playlists_tracks"}{"param"}
| |||||||||||||
| 869 | 'Authorization' => { | ||||||||||||
| 870 | type => 'string', | ||||||||||||
| 871 | required => 'required', | ||||||||||||
| 872 | }, | ||||||||||||
| 873 | }, | ||||||||||||
| 874 | path_parameter => { | ||||||||||||
| 875 | 'playlist_id' => { | ||||||||||||
| 876 | type => 'string', | ||||||||||||
| 877 | required => 'required', | ||||||||||||
| 878 | }, | ||||||||||||
| 879 | }, | ||||||||||||
| 880 | query_parameter => { | ||||||||||||
| 881 | 'additional_types' => { | ||||||||||||
| 882 | type => 'string', | ||||||||||||
| 883 | required => 'optional', | ||||||||||||
| 884 | }, | ||||||||||||
| 885 | 'fields' => { | ||||||||||||
| 886 | type => 'string', | ||||||||||||
| 887 | required => 'optional', | ||||||||||||
| 888 | }, | ||||||||||||
| 889 | 'limit' => { | ||||||||||||
| 890 | type => 'integer', | ||||||||||||
| 891 | required => 'optional', | ||||||||||||
| 892 | }, | ||||||||||||
| 893 | 'market' => { | ||||||||||||
| 894 | type => 'string', | ||||||||||||
| 895 | required => 'required', | ||||||||||||
| 896 | }, | ||||||||||||
| 897 | 'offset' => { | ||||||||||||
| 898 | type => 'integer', | ||||||||||||
| 899 | required => 'optional', | ||||||||||||
| 900 | }, | ||||||||||||
| 901 | }, | ||||||||||||
| 902 | }; | ||||||||||||
| 903 | my $response_objs = $mapping->{get_playlists_tracks}{response} // [ | ||||||||||||
| 904 | 0 | ▶ | 'track object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_playlists_tracks"}{"response"} // ["track object"]
MC/DC0%0/1
$mapping->{"get_playlists_tracks"}{"response"} // ["track object"]
$mapping->{"get_playlists_tracks"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_playlists_tracks"}{"response"}
| |||||||||||||
| 905 | |||||||||||||
| 906 | ]; | ||||||||||||
| 907 | |||||||||||||
| 908 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 909 | 2 | } | |||||||||||
| 910 | |||||||||||||
| 911 | =head2 remove_tracks_playlist | ||||||||||||
| 912 | |||||||||||||
| 913 | remove_tracks_playlist - Remove Items from a Playlist | ||||||||||||
| 914 | |||||||||||||
| 915 | Remove one or more items from a user’s playlist. | ||||||||||||
| 916 | |||||||||||||
| 917 | with Request details being: | ||||||||||||
| 918 | |||||||||||||
| 919 | =head3 header | ||||||||||||
| 920 | |||||||||||||
| 921 | =over 4 | ||||||||||||
| 922 | |||||||||||||
| 923 | =item Authorization | ||||||||||||
| 924 | |||||||||||||
| 925 | Type: string | Required: required | ||||||||||||
| 926 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide | ||||||||||||
| 927 | for details. The access token must have been issued on behalf of the user. Removing items from a user’s public playlist requires authorization of the playlist-modify-public scope; removing items from a private playlist requires the playlist-modify-private scope. See Using Scopes. | ||||||||||||
| 928 | |||||||||||||
| 929 | =item Content-Type | ||||||||||||
| 930 | |||||||||||||
| 931 | Type: string | Required: required | ||||||||||||
| 932 | The content type of the request body: application/json | ||||||||||||
| 933 | |||||||||||||
| 934 | =back | ||||||||||||
| 935 | |||||||||||||
| 936 | =head3 json_body_parameter | ||||||||||||
| 937 | |||||||||||||
| 938 | =over 4 | ||||||||||||
| 939 | |||||||||||||
| 940 | =item snapshot_id | ||||||||||||
| 941 | |||||||||||||
| 942 | Type: string | Required: optional | ||||||||||||
| 943 | The playlist’s snapshot ID against which you want to make the changes. | ||||||||||||
| 944 | The API will validate that the specified items exist and in the specified positions and make the changes, | ||||||||||||
| 945 | even if more recent changes have been made to the playlist. | ||||||||||||
| 946 | |||||||||||||
| 947 | =item tracks | ||||||||||||
| 948 | |||||||||||||
| 949 | Type: array[string] | Required: required | ||||||||||||
| 950 | An array of objects containing Spotify URIs of the tracks or episodes to remove. | ||||||||||||
| 951 | For example: { "tracks": [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" },{ "uri": "spotify:track:1301WleyT98MSxVHPZCA6M" }] }. A maximum of 100 objects can be sent at once. | ||||||||||||
| 952 | |||||||||||||
| 953 | =back | ||||||||||||
| 954 | |||||||||||||
| 955 | =head3 path_parameter | ||||||||||||
| 956 | |||||||||||||
| 957 | =over 4 | ||||||||||||
| 958 | |||||||||||||
| 959 | =item playlist_id | ||||||||||||
| 960 | |||||||||||||
| 961 | Type: string | Required: required | ||||||||||||
| 962 | The Spotify ID | ||||||||||||
| 963 | |||||||||||||
| 964 | =back | ||||||||||||
| 965 | |||||||||||||
| 966 | and Response Objects being: | ||||||||||||
| 967 | |||||||||||||
| 968 | - error object | ||||||||||||
| 969 | |||||||||||||
| 970 | |||||||||||||
| 971 | On success, the response body contains a snapshot_id in JSON format | ||||||||||||
| 972 | and the HTTP status code in the response header is 200 OK. The snapshot_id | ||||||||||||
| 973 | can be used to identify your playlist version in future requests.On error, the header status code is an error code and the response body contains an error object. | ||||||||||||
| 974 | Trying to remove an item when you do not have the user’s authorization returns error 403 Forbidden. | ||||||||||||
| 975 | Attempting to use several different ways to remove items returns 400 Bad Request. | ||||||||||||
| 976 | Other client errors returning 400 Bad Request include specifying invalid positions.Notes### Frequently Asked Questions: | ||||||||||||
| 977 | Is it possible to delete a playlist? | ||||||||||||
| 978 | No, it isn’t. The reason there is no endpoint for this is explained in our Working With Playlists Guide in the section Following and Unfollowing a Playlist. | ||||||||||||
| 979 | |||||||||||||
| 980 | |||||||||||||
| 981 | Can I use X-HTTP-Method-Override or similar to send a DELETE request overriding the HTTP verb? | ||||||||||||
| 982 | Not at the moment, the delete operation needs to be specified through a DELETE request.Try in our Web Console | ||||||||||||
| 983 | |||||||||||||
| 984 | =cut | ||||||||||||
| 985 | |||||||||||||
| 986 | 0 | ▶ | async sub remove_tracks_playlist { | ||||||||||
|
Subroutine
remove_tracks_playlist: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 987 | 0 | my ($self, %args) = @_; | |||||||||||
| 988 | |||||||||||||
| 989 | 0 | my $mapping = $self->mapping; | |||||||||||
| 990 | 0 | ▶ | my $request->{method} = $mapping->{remove_tracks_playlist}{method} // 'DELETE'; | ||||||||||
|
Condition0%0/2
$mapping->{"remove_tracks_playlist"}{"method"} // "DELETE"
MC/DC0%0/1
$mapping->{"remove_tracks_playlist"}{"method"} // "DELETE"
$mapping->{"remove_tracks_playlist"}{"method"}
Truth table0%0/2
A
A= $mapping->{"remove_tracks_playlist"}{"method"}
| |||||||||||||
| 991 | 0 | ▶ | $request->{uri} = $mapping->{remove_tracks_playlist}{uri} // 'https://api.spotify.com/v1/playlists/{playlist_id}/tracks'; | ||||||||||
|
Condition0%0/2
$mapping->{"remove_tracks_playlist"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/tracks"
MC/DC0%0/1
$mapping->{"remove_tracks_playlist"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/tracks"
$mapping->{"remove_tracks_playlist"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"remove_tracks_playlist"}{"uri"}
| |||||||||||||
| 992 | $request->{param} = $mapping->{remove_tracks_playlist}{param} // { | ||||||||||||
| 993 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"remove_tracks_playlist"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "required"}}, "json_body_parameter", {"snapshot_id", {"type", "string", "required", "optional"}, "tracks", {"type", "array[string]", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"remove_tracks_playlist"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "required"}}, "json_body_parameter", {"snapshot_id", {"type", "string", "required", "optional"}, "tracks", {"type", "array[string]", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}}
$mapping->{"remove_tracks_playlist"}{"param"}
Truth table0%0/2
A
A= $mapping->{"remove_tracks_playlist"}{"param"}
| |||||||||||||
| 994 | 'Authorization' => { | ||||||||||||
| 995 | type => 'string', | ||||||||||||
| 996 | required => 'required', | ||||||||||||
| 997 | }, | ||||||||||||
| 998 | 'Content-Type' => { | ||||||||||||
| 999 | type => 'string', | ||||||||||||
| 1000 | required => 'required', | ||||||||||||
| 1001 | }, | ||||||||||||
| 1002 | }, | ||||||||||||
| 1003 | json_body_parameter => { | ||||||||||||
| 1004 | 'snapshot_id' => { | ||||||||||||
| 1005 | type => 'string', | ||||||||||||
| 1006 | required => 'optional', | ||||||||||||
| 1007 | }, | ||||||||||||
| 1008 | 'tracks' => { | ||||||||||||
| 1009 | type => 'array[string]', | ||||||||||||
| 1010 | required => 'required', | ||||||||||||
| 1011 | }, | ||||||||||||
| 1012 | }, | ||||||||||||
| 1013 | path_parameter => { | ||||||||||||
| 1014 | 'playlist_id' => { | ||||||||||||
| 1015 | type => 'string', | ||||||||||||
| 1016 | required => 'required', | ||||||||||||
| 1017 | }, | ||||||||||||
| 1018 | }, | ||||||||||||
| 1019 | }; | ||||||||||||
| 1020 | my $response_objs = $mapping->{remove_tracks_playlist}{response} // [ | ||||||||||||
| 1021 | 0 | ▶ | 'error object', | ||||||||||
|
Condition0%0/2
$mapping->{"remove_tracks_playlist"}{"response"} // ["error object"]
MC/DC0%0/1
$mapping->{"remove_tracks_playlist"}{"response"} // ["error object"]
$mapping->{"remove_tracks_playlist"}{"response"}
Truth table0%0/2
A
A= $mapping->{"remove_tracks_playlist"}{"response"}
| |||||||||||||
| 1022 | |||||||||||||
| 1023 | ]; | ||||||||||||
| 1024 | |||||||||||||
| 1025 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 1026 | 2 | } | |||||||||||
| 1027 | |||||||||||||
| 1028 | =head2 reorder_or_replace_playlists_tracks | ||||||||||||
| 1029 | |||||||||||||
| 1030 | reorder_or_replace_playlists_tracks - Reorder or Replace a Playlist's Items | ||||||||||||
| 1031 | |||||||||||||
| 1032 | Either reorder or replace items in a playlist depending on the request’s parameters. | ||||||||||||
| 1033 | To reorder items, include range_start, insert_before, range_length and snapshot_id in the request’s body. | ||||||||||||
| 1034 | To replace items, include uris as either a query parameter or in the request’s body. | ||||||||||||
| 1035 | Replacing items in a playlist will overwrite its existing items. This operation can be used for replacing or clearing items in a playlist. | ||||||||||||
| 1036 | |||||||||||||
| 1037 | Note: Replace and reorder are mutually exclusive operations which share the same endpoint, but have different parameters. | ||||||||||||
| 1038 | These operations can’t be applied together in a single request. | ||||||||||||
| 1039 | |||||||||||||
| 1040 | with Request details being: | ||||||||||||
| 1041 | |||||||||||||
| 1042 | =head3 header | ||||||||||||
| 1043 | |||||||||||||
| 1044 | =over 4 | ||||||||||||
| 1045 | |||||||||||||
| 1046 | =item Authorization | ||||||||||||
| 1047 | |||||||||||||
| 1048 | Type: string | Required: required | ||||||||||||
| 1049 | A valid access token from the Spotify Accounts service: | ||||||||||||
| 1050 | see the Web API Authorization Guide for details. | ||||||||||||
| 1051 | The access token must have been issued on behalf of the user. | ||||||||||||
| 1052 | Reordering or replacing items in the current user’s public playlists requires authorization of the playlist-modify-public scope; | ||||||||||||
| 1053 | reordering or replacing items in the current user’s private playlist (including collaborative playlists) requires the playlist-modify-private scope. | ||||||||||||
| 1054 | See Using Scopes. | ||||||||||||
| 1055 | |||||||||||||
| 1056 | =item Content-Type | ||||||||||||
| 1057 | |||||||||||||
| 1058 | Type: string | Required: optional | ||||||||||||
| 1059 | Required if URIs are passed in the request body, otherwise ignored. The content type of the request body: application/json | ||||||||||||
| 1060 | |||||||||||||
| 1061 | =back | ||||||||||||
| 1062 | |||||||||||||
| 1063 | =head3 json_body_parameter | ||||||||||||
| 1064 | |||||||||||||
| 1065 | =over 4 | ||||||||||||
| 1066 | |||||||||||||
| 1067 | =item insert_before | ||||||||||||
| 1068 | |||||||||||||
| 1069 | Type: integer | Required: optional | ||||||||||||
| 1070 | The position where the items should be inserted.To reorder the items to the end of the playlist, simply set insert_before to the position after the last item.Examples:To reorder the first item to the last position in a playlist with 10 items, set range_start to 0, and insert_before to 10.To reorder the last item in a playlist with 10 items to the start of the playlist, set range_start to 9, and insert_before to 0. | ||||||||||||
| 1071 | |||||||||||||
| 1072 | =item range_length | ||||||||||||
| 1073 | |||||||||||||
| 1074 | Type: integer | Required: optional | ||||||||||||
| 1075 | The amount of items to be reordered. Defaults to 1 if not set.The range of items to be reordered begins from the range_start position, and includes the range_length subsequent items.Example:To move the items at index 9-10 to the start of the playlist, range_start is set to 9, and range_length is set to 2. | ||||||||||||
| 1076 | |||||||||||||
| 1077 | =item range_start | ||||||||||||
| 1078 | |||||||||||||
| 1079 | Type: integer | Required: optional | ||||||||||||
| 1080 | The position of the first item to be reordered. | ||||||||||||
| 1081 | |||||||||||||
| 1082 | =item snapshot_id | ||||||||||||
| 1083 | |||||||||||||
| 1084 | Type: string | Required: optional | ||||||||||||
| 1085 | The playlist’s snapshot ID against which you want to make the changes. | ||||||||||||
| 1086 | |||||||||||||
| 1087 | =item uris | ||||||||||||
| 1088 | |||||||||||||
| 1089 | Type: array[string] | Required: optional | ||||||||||||
| 1090 | |||||||||||||
| 1091 | |||||||||||||
| 1092 | =back | ||||||||||||
| 1093 | |||||||||||||
| 1094 | =head3 path_parameter | ||||||||||||
| 1095 | |||||||||||||
| 1096 | =over 4 | ||||||||||||
| 1097 | |||||||||||||
| 1098 | =item playlist_id | ||||||||||||
| 1099 | |||||||||||||
| 1100 | Type: string | Required: required | ||||||||||||
| 1101 | The Spotify ID | ||||||||||||
| 1102 | for the playlist. | ||||||||||||
| 1103 | |||||||||||||
| 1104 | =back | ||||||||||||
| 1105 | |||||||||||||
| 1106 | =head3 query_parameter | ||||||||||||
| 1107 | |||||||||||||
| 1108 | =over 4 | ||||||||||||
| 1109 | |||||||||||||
| 1110 | =item uris | ||||||||||||
| 1111 | |||||||||||||
| 1112 | Type: string | Required: optional | ||||||||||||
| 1113 | A comma-separated list of Spotify URIs to set, can be track or episode URIs. For example: uris=spotify:track:4iV5W9uYEdYUVa79Axb7Rh,spotify:track:1301WleyT98MSxVHPZCA6M,spotify:episode:512ojhOuo1ktJprKbVcKyQA maximum of 100 items can be set in one request. | ||||||||||||
| 1114 | |||||||||||||
| 1115 | =back | ||||||||||||
| 1116 | |||||||||||||
| 1117 | and Response Objects being: | ||||||||||||
| 1118 | |||||||||||||
| 1119 | - error object | ||||||||||||
| 1120 | |||||||||||||
| 1121 | |||||||||||||
| 1122 | On a successful reorder operation, the response body contains a snapshot_id in JSON format | ||||||||||||
| 1123 | and the HTTP status code in the response header is 200 OK. The snapshot_id | ||||||||||||
| 1124 | can be used to identify your playlist version in future requests.On a successful replace operation, the HTTP status code in the response header is 201 | ||||||||||||
| 1125 | Created.On error, the header status code is an error code, | ||||||||||||
| 1126 | the response body contains an error object, | ||||||||||||
| 1127 | and the existing playlist is unmodified. | ||||||||||||
| 1128 | Trying to set an item when you do not have the user’s authorization returns error 403 Forbidden.Try in our Web Console | ||||||||||||
| 1129 | |||||||||||||
| 1130 | =cut | ||||||||||||
| 1131 | |||||||||||||
| 1132 | 0 | ▶ | async sub reorder_or_replace_playlists_tracks { | ||||||||||
|
Subroutine
reorder_or_replace_playlists_tracks: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 1133 | 0 | my ($self, %args) = @_; | |||||||||||
| 1134 | |||||||||||||
| 1135 | 0 | my $mapping = $self->mapping; | |||||||||||
| 1136 | 0 | ▶ | my $request->{method} = $mapping->{reorder_or_replace_playlists_tracks}{method} // 'PUT'; | ||||||||||
|
Condition0%0/2
$mapping->{"reorder_or_replace_playlists_tracks"}{"method"} // "PUT"
MC/DC0%0/1
$mapping->{"reorder_or_replace_playlists_tracks"}{"method"} // "PUT"
$mapping->{"reorder_or_replace_playlists_tracks"}{"method"}
Truth table0%0/2
A
A= $mapping->{"reorder_or_replace_playlists_tracks"}{"method"}
| |||||||||||||
| 1137 | 0 | ▶ | $request->{uri} = $mapping->{reorder_or_replace_playlists_tracks}{uri} // 'https://api.spotify.com/v1/playlists/{playlist_id}/tracks'; | ||||||||||
|
Condition0%0/2
$mapping->{"reorder_or_replace_playlists_tracks"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/tracks"
MC/DC0%0/1
$mapping->{"reorder_or_replace_playlists_tracks"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/tracks"
$mapping->{"reorder_or_replace_playlists_tracks"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"reorder_or_replace_playlists_tracks"}{"uri"}
| |||||||||||||
| 1138 | $request->{param} = $mapping->{reorder_or_replace_playlists_tracks}{param} // { | ||||||||||||
| 1139 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"reorder_or_replace_playlists_tracks"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "optional"}}, "json_body_parameter", {"insert_before", {"type", "integer", "required", "optional"}, "range_length", {"type", "integer", "required", "optional"}, "range_start", {"type", "integer", "required", "optional"}, "snapshot_id", {"type", "string", "required", "optional"}, "uris", {"type", "array[string]", "required", "optional"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}, "query_parameter", {"uris", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"reorder_or_replace_playlists_tracks"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "optional"}}, "json_body_parameter", {"insert_before", {"type", "integer", "required", "optional"}, "range_length", {"type", "integer", "required", "optional"}, "range_start", {"type", "integer", "required", "optional"}, "snapshot_id", {"type", "string", "required", "optional"}, "uris", {"type", "array[string]", "required", "optional"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}, "query_parameter", {"uris", {"type", "string", "required", "optional"}}}
$mapping->{"reorder_or_replace_playlists_tracks"}{"param"}
Truth table0%0/2
A
A= $mapping->{"reorder_or_replace_playlists_tracks"}{"param"}
| |||||||||||||
| 1140 | 'Authorization' => { | ||||||||||||
| 1141 | type => 'string', | ||||||||||||
| 1142 | required => 'required', | ||||||||||||
| 1143 | }, | ||||||||||||
| 1144 | 'Content-Type' => { | ||||||||||||
| 1145 | type => 'string', | ||||||||||||
| 1146 | required => 'optional', | ||||||||||||
| 1147 | }, | ||||||||||||
| 1148 | }, | ||||||||||||
| 1149 | json_body_parameter => { | ||||||||||||
| 1150 | 'insert_before' => { | ||||||||||||
| 1151 | type => 'integer', | ||||||||||||
| 1152 | required => 'optional', | ||||||||||||
| 1153 | }, | ||||||||||||
| 1154 | 'range_length' => { | ||||||||||||
| 1155 | type => 'integer', | ||||||||||||
| 1156 | required => 'optional', | ||||||||||||
| 1157 | }, | ||||||||||||
| 1158 | 'range_start' => { | ||||||||||||
| 1159 | type => 'integer', | ||||||||||||
| 1160 | required => 'optional', | ||||||||||||
| 1161 | }, | ||||||||||||
| 1162 | 'snapshot_id' => { | ||||||||||||
| 1163 | type => 'string', | ||||||||||||
| 1164 | required => 'optional', | ||||||||||||
| 1165 | }, | ||||||||||||
| 1166 | 'uris' => { | ||||||||||||
| 1167 | type => 'array[string]', | ||||||||||||
| 1168 | required => 'optional', | ||||||||||||
| 1169 | }, | ||||||||||||
| 1170 | }, | ||||||||||||
| 1171 | path_parameter => { | ||||||||||||
| 1172 | 'playlist_id' => { | ||||||||||||
| 1173 | type => 'string', | ||||||||||||
| 1174 | required => 'required', | ||||||||||||
| 1175 | }, | ||||||||||||
| 1176 | }, | ||||||||||||
| 1177 | query_parameter => { | ||||||||||||
| 1178 | 'uris' => { | ||||||||||||
| 1179 | type => 'string', | ||||||||||||
| 1180 | required => 'optional', | ||||||||||||
| 1181 | }, | ||||||||||||
| 1182 | }, | ||||||||||||
| 1183 | }; | ||||||||||||
| 1184 | my $response_objs = $mapping->{reorder_or_replace_playlists_tracks}{response} // [ | ||||||||||||
| 1185 | 0 | ▶ | 'error object', | ||||||||||
|
Condition0%0/2
$mapping->{"reorder_or_replace_playlists_tracks"}{"response"} // ["error object"]
MC/DC0%0/1
$mapping->{"reorder_or_replace_playlists_tracks"}{"response"} // ["error object"]
$mapping->{"reorder_or_replace_playlists_tracks"}{"response"}
Truth table0%0/2
A
A= $mapping->{"reorder_or_replace_playlists_tracks"}{"response"}
| |||||||||||||
| 1186 | |||||||||||||
| 1187 | ]; | ||||||||||||
| 1188 | |||||||||||||
| 1189 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 1190 | 2 | } | |||||||||||
| 1191 | |||||||||||||
| 1192 | =head2 upload_custom_playlist_cover | ||||||||||||
| 1193 | |||||||||||||
| 1194 | upload_custom_playlist_cover - Upload a Custom Playlist Cover Image | ||||||||||||
| 1195 | |||||||||||||
| 1196 | Replace the image used to represent a specific playlist. | ||||||||||||
| 1197 | |||||||||||||
| 1198 | with Request details being: | ||||||||||||
| 1199 | |||||||||||||
| 1200 | =head3 header | ||||||||||||
| 1201 | |||||||||||||
| 1202 | =over 4 | ||||||||||||
| 1203 | |||||||||||||
| 1204 | =item Authorization | ||||||||||||
| 1205 | |||||||||||||
| 1206 | Type: string | Required: required | ||||||||||||
| 1207 | A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been issued on behalf of the user.This access token must be tied to the user who owns the playlist, and must have the scope ugc-image-upload granted. In addition, the token must also contain playlist-modify-public and/or playlist-modify-private, depending the public status of the playlist you want to update . See Using Scopes. | ||||||||||||
| 1208 | |||||||||||||
| 1209 | =item Content-Type | ||||||||||||
| 1210 | |||||||||||||
| 1211 | Type: string | Required: required | ||||||||||||
| 1212 | The content type of the request body: image/jpeg | ||||||||||||
| 1213 | |||||||||||||
| 1214 | =back | ||||||||||||
| 1215 | |||||||||||||
| 1216 | =head3 path_parameter | ||||||||||||
| 1217 | |||||||||||||
| 1218 | =over 4 | ||||||||||||
| 1219 | |||||||||||||
| 1220 | =item playlist_id | ||||||||||||
| 1221 | |||||||||||||
| 1222 | Type: string | Required: required | ||||||||||||
| 1223 | The Spotify ID | ||||||||||||
| 1224 | for the playlist. | ||||||||||||
| 1225 | |||||||||||||
| 1226 | =back | ||||||||||||
| 1227 | |||||||||||||
| 1228 | and Response Objects being: | ||||||||||||
| 1229 | |||||||||||||
| 1230 | |||||||||||||
| 1231 | |||||||||||||
| 1232 | If you get status code 429, it means that you have sent too many requests. | ||||||||||||
| 1233 | If this happens, have a look in the Retry-After header, where you will see a number displayed. | ||||||||||||
| 1234 | This is the amount of seconds that you need to wait, before you can retry sending your requests.NotesThe request should contain a Base64 encoded JPEG image data, maximum payload size is 256 KB.Rate Limiting: If you get status code 429, it means that you have sent too many requests. | ||||||||||||
| 1235 | If this happens, have a look in the Retry-After header, where you will see a number displayed. This is the amount of seconds that you need to wait, before you can retry sending your requests.Try in our Web Console | ||||||||||||
| 1236 | |||||||||||||
| 1237 | =cut | ||||||||||||
| 1238 | |||||||||||||
| 1239 | 0 | ▶ | async sub upload_custom_playlist_cover { | ||||||||||
|
Subroutine
upload_custom_playlist_cover: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 1240 | 0 | my ($self, %args) = @_; | |||||||||||
| 1241 | |||||||||||||
| 1242 | 0 | my $mapping = $self->mapping; | |||||||||||
| 1243 | 0 | ▶ | my $request->{method} = $mapping->{upload_custom_playlist_cover}{method} // 'PUT'; | ||||||||||
|
Condition0%0/2
$mapping->{"upload_custom_playlist_cover"}{"method"} // "PUT"
MC/DC0%0/1
$mapping->{"upload_custom_playlist_cover"}{"method"} // "PUT"
$mapping->{"upload_custom_playlist_cover"}{"method"}
Truth table0%0/2
A
A= $mapping->{"upload_custom_playlist_cover"}{"method"}
| |||||||||||||
| 1244 | 0 | ▶ | $request->{uri} = $mapping->{upload_custom_playlist_cover}{uri} // 'https://api.spotify.com/v1/playlists/{playlist_id}/images'; | ||||||||||
|
Condition0%0/2
$mapping->{"upload_custom_playlist_cover"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/images"
MC/DC0%0/1
$mapping->{"upload_custom_playlist_cover"}{"uri"} // "https://api.spotify.com/v1/playlists/{playlist_id}/images"
$mapping->{"upload_custom_playlist_cover"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"upload_custom_playlist_cover"}{"uri"}
| |||||||||||||
| 1245 | $request->{param} = $mapping->{upload_custom_playlist_cover}{param} // { | ||||||||||||
| 1246 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"upload_custom_playlist_cover"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}}
MC/DC0%0/1
$mapping->{"upload_custom_playlist_cover"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}, "Content-Type", {"type", "string", "required", "required"}}, "path_parameter", {"playlist_id", {"type", "string", "required", "required"}}}
$mapping->{"upload_custom_playlist_cover"}{"param"}
Truth table0%0/2
A
A= $mapping->{"upload_custom_playlist_cover"}{"param"}
| |||||||||||||
| 1247 | 'Authorization' => { | ||||||||||||
| 1248 | type => 'string', | ||||||||||||
| 1249 | required => 'required', | ||||||||||||
| 1250 | }, | ||||||||||||
| 1251 | 'Content-Type' => { | ||||||||||||
| 1252 | type => 'string', | ||||||||||||
| 1253 | required => 'required', | ||||||||||||
| 1254 | }, | ||||||||||||
| 1255 | }, | ||||||||||||
| 1256 | path_parameter => { | ||||||||||||
| 1257 | 'playlist_id' => { | ||||||||||||
| 1258 | type => 'string', | ||||||||||||
| 1259 | required => 'required', | ||||||||||||
| 1260 | }, | ||||||||||||
| 1261 | }, | ||||||||||||
| 1262 | }; | ||||||||||||
| 1263 | my $response_objs = $mapping->{upload_custom_playlist_cover}{response} // [ | ||||||||||||
| 1264 | |||||||||||||
| 1265 | 0 | ▶ | ]; | ||||||||||
|
Condition0%0/2
$mapping->{"upload_custom_playlist_cover"}{"response"} // []
MC/DC0%0/1
$mapping->{"upload_custom_playlist_cover"}{"response"} // []
$mapping->{"upload_custom_playlist_cover"}{"response"}
Truth table0%0/2
A
A= $mapping->{"upload_custom_playlist_cover"}{"response"}
| |||||||||||||
| 1266 | |||||||||||||
| 1267 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 1268 | 2 | } | |||||||||||
| 1269 | |||||||||||||
| 1270 | 2 | 1; | |||||||||||