lib/Net/Async/Spotify/API/Generated/Player.pm

filter: Statementstmt 22.0% 32 / 145 Branchbran n/a Conditioncond 0.0% 0 / 112 MC/DCmcdc 0.0% 0 / 56 Subroutinesub 25.0% 5 / 20 Podpod 93.3% 14 / 15 totaltotal 14.6% 51 / 348 CC 57 SCAR 33.2
CC
57
Cov
12%
add_to_queue
30.0
get_a_users_available_devices
30.0
get_information_about_the_users_current_playback
30.0
CRAP 27.7
« lib/Net/Async/Spotify/API/Generated/Library.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Playlists.pm »
1 package Net::Async::Spotify::API::Generated::Player;
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::Player - Package representing Spotify Player 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_to_queue
33  
34 add_to_queue - Add an item to queue
35  
36 Add an item to the end of the user’s current playback queue.
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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback
48  
49 =back
50  
51 =head3 query_parameter
52  
53 =over 4
54  
55 =item device_id
56  
57 Type: string | Required: optional
58 The id of the device this command is targeting. If
59 not supplied, the user’s currently active device is the target.
60  
61 =item uri
62  
63 Type: string | Required: required
64 The uri of the item to add to the queue. Must be a track or an episode uri.
65  
66 =back
67  
68 and Response Objects being:
69  
70  
71  
72 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
73  
74 =cut
75  
76 0 ▶async sub add_to_queue {
Subroutine add_to_queue: not called CC=5 SCAR=34.0
Pod documented
77 0 my ($self, %args) = @_;
78  
79 0 my $mapping = $self->mapping;
80 0 ▶ my $request->{method} = $mapping->{add_to_queue}{method} // 'POST';
Condition0%0/2
$mapping->{"add_to_queue"}{"method"} // "POST"
l!l
00
MC/DC0%0/1
$mapping->{"add_to_queue"}{"method"} // "POST"
$mapping->{"add_to_queue"}{"method"}
Truth table0%0/2
A
A= $mapping->{"add_to_queue"}{"method"}
Aresult
11
00
81 0 ▶ $request->{uri} = $mapping->{add_to_queue}{uri} // 'https://api.spotify.com/v1/me/player/queue';
Condition0%0/2
$mapping->{"add_to_queue"}{"uri"} // "https://api.spotify.com/v1/me/player/queue"
l!l
00
MC/DC0%0/1
$mapping->{"add_to_queue"}{"uri"} // "https://api.spotify.com/v1/me/player/queue"
$mapping->{"add_to_queue"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"add_to_queue"}{"uri"}
Aresult
11
00
82 $request->{param} = $mapping->{add_to_queue}{param} // {
83 0 ▶ header => {
Condition0%0/2
$mapping->{"add_to_queue"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "uri", {"type", "string", "required", "required"}}}
l!l
00
MC/DC0%0/1
$mapping->{"add_to_queue"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "uri", {"type", "string", "required", "required"}}}
$mapping->{"add_to_queue"}{"param"}
Truth table0%0/2
A
A= $mapping->{"add_to_queue"}{"param"}
Aresult
11
00
84 'Authorization' => {
85 type => 'string',
86 required => 'required',
87 },
88 },
89 query_parameter => {
90 'device_id' => {
91 type => 'string',
92 required => 'optional',
93 },
94 'uri' => {
95 type => 'string',
96 required => 'required',
97 },
98 },
99 };
100 my $response_objs = $mapping->{add_to_queue}{response} // [
101  
102 0 ▶ ];
Condition0%0/2
$mapping->{"add_to_queue"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"add_to_queue"}{"response"} // []
$mapping->{"add_to_queue"}{"response"}
Truth table0%0/2
A
A= $mapping->{"add_to_queue"}{"response"}
Aresult
11
00
103  
104 0 await $self->call_api($request, $response_objs, %args);
105 2 }
106  
107 =head2 get_a_users_available_devices
108  
109 get_a_users_available_devices - Get a User's Available Devices
110  
111 Get information about a user’s available devices.
112  
113 with Request details being:
114  
115 =head3 header
116  
117 =over 4
118  
119 =item Authorization
120  
121 Type: string | Required: required
122 A valid access token from the Spotify Accounts service:
123 see the Web API Authorization Guide
124 for details. The access token must have been issued on behalf of a user.
125 The access token must have the user-read-playback-state scope authorized
126 in order to read information.
127  
128 =back
129  
130 and Response Objects being:
131  
132 - device object
133  
134  
135 A successful request will return a 200 OK response code with a json payload that contains the device objects (see below).
136 When no available devices are found, the request will return a 200 OK response with an empty devices list.Try in our Web Console
137  
138 =cut
139  
140 0 ▶async sub get_a_users_available_devices {
Subroutine get_a_users_available_devices: not called CC=5 SCAR=34.0
Pod documented
141 0 my ($self, %args) = @_;
142  
143 0 my $mapping = $self->mapping;
144 0 ▶ my $request->{method} = $mapping->{get_a_users_available_devices}{method} // 'GET';
Condition0%0/2
$mapping->{"get_a_users_available_devices"}{"method"} // "GET"
l!l
00
MC/DC0%0/1
$mapping->{"get_a_users_available_devices"}{"method"} // "GET"
$mapping->{"get_a_users_available_devices"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_a_users_available_devices"}{"method"}
Aresult
11
00
145 0 ▶ $request->{uri} = $mapping->{get_a_users_available_devices}{uri} // 'https://api.spotify.com/v1/me/player/devices';
Condition0%0/2
$mapping->{"get_a_users_available_devices"}{"uri"} // "https://api.spotify.com/v1/me/player/devices"
l!l
00
MC/DC0%0/1
$mapping->{"get_a_users_available_devices"}{"uri"} // "https://api.spotify.com/v1/me/player/devices"
$mapping->{"get_a_users_available_devices"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_a_users_available_devices"}{"uri"}
Aresult
11
00
146 $request->{param} = $mapping->{get_a_users_available_devices}{param} // {
147 0 ▶ header => {
Condition0%0/2
$mapping->{"get_a_users_available_devices"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}}
l!l
00
MC/DC0%0/1
$mapping->{"get_a_users_available_devices"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}}
$mapping->{"get_a_users_available_devices"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_a_users_available_devices"}{"param"}
Aresult
11
00
148 'Authorization' => {
149 type => 'string',
150 required => 'required',
151 },
152 },
153 };
154 my $response_objs = $mapping->{get_a_users_available_devices}{response} // [
155 0 ▶ 'device object',
Condition0%0/2
$mapping->{"get_a_users_available_devices"}{"response"} // ["device object"]
l!l
00
MC/DC0%0/1
$mapping->{"get_a_users_available_devices"}{"response"} // ["device object"]
$mapping->{"get_a_users_available_devices"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_a_users_available_devices"}{"response"}
Aresult
11
00
156  
157 ];
158  
159 0 await $self->call_api($request, $response_objs, %args);
160 2 }
161  
162 =head2 get_information_about_the_users_current_playback
163  
164 get_information_about_the_users_current_playback - Get Information About The User's Current Playback
165  
166 Get information about the user’s current playback state, including track or episode, progress, and active device.
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.
178  
179 =back
180  
181 =head3 query_parameter
182  
183 =over 4
184  
185 =item additional_types
186  
187 Type: string | Required: optional
188 A comma-separated list of item types that your client supports besides the default track type. Valid types are: track and episode. An unsupported type in the response is expected to be represented as null value in the item field.
189 Note: This parameter was introduced to allow existing clients to maintain their current behaviour and might be deprecated in the future. In addition to providing this parameter, make sure that your client properly handles cases of new
190  
191 =item market
192  
193 Type: string | Required: optional
194 An ISO 3166-1 alpha-2 country code
195 or the string from_token. Provide this parameter if you want to apply Track
196 Relinking.
197  
198 =back
199  
200 and Response Objects being:
201  
202  
203  
204 A successful request will return a 200 OK response code with a json payload that contains information about the current playback. The information returned is for the last known state, which means an inactive device could be returned if it was the last one to execute playback.
205 When no available devices are found, the request will return a 200 OK response but with no data populated.Try in our Web Console
206  
207 =cut
208  
209 0 ▶async sub get_information_about_the_users_current_playback {
Subroutine get_information_about_the_users_current_playback: not called CC=5 SCAR=34.0
Pod documented
210 0 my ($self, %args) = @_;
211  
212 0 my $mapping = $self->mapping;
213 0 ▶ my $request->{method} = $mapping->{get_information_about_the_users_current_playback}{method} // 'GET';
Condition0%0/2
$mapping->{"get_information_about_the_users_current_playback"}{"method"} // "GET"
l!l
00
MC/DC0%0/1
$mapping->{"get_information_about_the_users_current_playback"}{"method"} // "GET"
$mapping->{"get_information_about_the_users_current_playback"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_information_about_the_users_current_playback"}{"method"}
Aresult
11
00
214 0 ▶ $request->{uri} = $mapping->{get_information_about_the_users_current_playback}{uri} // 'https://api.spotify.com/v1/me/player';
Condition0%0/2
$mapping->{"get_information_about_the_users_current_playback"}{"uri"} // "https://api.spotify.com/v1/me/player"
l!l
00
MC/DC0%0/1
$mapping->{"get_information_about_the_users_current_playback"}{"uri"} // "https://api.spotify.com/v1/me/player"
$mapping->{"get_information_about_the_users_current_playback"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_information_about_the_users_current_playback"}{"uri"}
Aresult
11
00
215 $request->{param} = $mapping->{get_information_about_the_users_current_playback}{param} // {
216 0 ▶ header => {
Condition0%0/2
$mapping->{"get_information_about_the_users_current_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"additional_types", {"type", "string", "required", "optional"}, "market", {"type", "string", "required", "optional"}}}
l!l
00
MC/DC0%0/1
$mapping->{"get_information_about_the_users_current_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"additional_types", {"type", "string", "required", "optional"}, "market", {"type", "string", "required", "optional"}}}
$mapping->{"get_information_about_the_users_current_playback"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_information_about_the_users_current_playback"}{"param"}
Aresult
11
00
217 'Authorization' => {
218 type => 'string',
219 required => 'required',
220 },
221 },
222 query_parameter => {
223 'additional_types' => {
224 type => 'string',
225 required => 'optional',
226 },
227 'market' => {
228 type => 'string',
229 required => 'optional',
230 },
231 },
232 };
233 my $response_objs = $mapping->{get_information_about_the_users_current_playback}{response} // [
234  
235 0 ▶ ];
Condition0%0/2
$mapping->{"get_information_about_the_users_current_playback"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"get_information_about_the_users_current_playback"}{"response"} // []
$mapping->{"get_information_about_the_users_current_playback"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_information_about_the_users_current_playback"}{"response"}
Aresult
11
00
236  
237 0 await $self->call_api($request, $response_objs, %args);
238 2 }
239  
240 =head2 get_recently_played
241  
242 get_recently_played - Get Current User's Recently Played Tracks
243  
244 Get tracks from the current user’s recently played tracks.
245 Note: Currently doesn’t support podcast episodes.
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: see the Web API Authorization Guide for details. The access token must have been issued on behalf of a user.
257  
258 =back
259  
260 =head3 query_parameter
261  
262 =over 4
263  
264 =item after
265  
266 Type: integer | Required: optional
267 A Unix timestamp in milliseconds. Returns all items
268 after (but not including) this cursor position. If after is specified, before
269 must not be specified.
270  
271 =item before
272  
273 Type: integer | Required: optional
274 A Unix timestamp in milliseconds. Returns all items
275 before (but not including) this cursor position. If before is specified,
276 after must not be specified.
277  
278 =item limit
279  
280 Type: integer | Required: optional
281 The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
282  
283 =back
284  
285 and Response Objects being:
286  
287 - history object
288  
289  
290 On success, the HTTP status code in the response header is 200 OK and the response body contains an array of play history objects (wrapped in a cursor-based paging object) in JSON format. The play history items each contain the context the track was played from (e.g. playlist, album), the date and time the track was played, and a track object (simplified). On error, the header status code is an error code and the response body contains an error object.If private session is enabled the response will be a 204 NO CONTENT with an empty payload.Try in our Web Console
291  
292 =cut
293  
294 0 ▶async sub get_recently_played {
Subroutine get_recently_played: not called CC=5 SCAR=34.0
Pod documented
295 0 my ($self, %args) = @_;
296  
297 0 my $mapping = $self->mapping;
298 0 ▶ my $request->{method} = $mapping->{get_recently_played}{method} // 'GET';
Condition0%0/2
$mapping->{"get_recently_played"}{"method"} // "GET"
l!l
00
MC/DC0%0/1
$mapping->{"get_recently_played"}{"method"} // "GET"
$mapping->{"get_recently_played"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_recently_played"}{"method"}
Aresult
11
00
299 0 ▶ $request->{uri} = $mapping->{get_recently_played}{uri} // 'https://api.spotify.com/v1/me/player/recently-played';
Condition0%0/2
$mapping->{"get_recently_played"}{"uri"} // "https://api.spotify.com/v1/me/player/recently-played"
l!l
00
MC/DC0%0/1
$mapping->{"get_recently_played"}{"uri"} // "https://api.spotify.com/v1/me/player/recently-played"
$mapping->{"get_recently_played"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_recently_played"}{"uri"}
Aresult
11
00
300 $request->{param} = $mapping->{get_recently_played}{param} // {
301 0 ▶ header => {
Condition0%0/2
$mapping->{"get_recently_played"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"after", {"type", "integer", "required", "optional"}, "before", {"type", "integer", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}}}
l!l
00
MC/DC0%0/1
$mapping->{"get_recently_played"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"after", {"type", "integer", "required", "optional"}, "before", {"type", "integer", "required", "optional"}, "limit", {"type", "integer", "required", "optional"}}}
$mapping->{"get_recently_played"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_recently_played"}{"param"}
Aresult
11
00
302 'Authorization' => {
303 type => 'string',
304 required => 'required',
305 },
306 },
307 query_parameter => {
308 'after' => {
309 type => 'integer',
310 required => 'optional',
311 },
312 'before' => {
313 type => 'integer',
314 required => 'optional',
315 },
316 'limit' => {
317 type => 'integer',
318 required => 'optional',
319 },
320 },
321 };
322 my $response_objs = $mapping->{get_recently_played}{response} // [
323 0 ▶ 'history object',
Condition0%0/2
$mapping->{"get_recently_played"}{"response"} // ["history object"]
l!l
00
MC/DC0%0/1
$mapping->{"get_recently_played"}{"response"} // ["history object"]
$mapping->{"get_recently_played"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_recently_played"}{"response"}
Aresult
11
00
324  
325 ];
326  
327 0 await $self->call_api($request, $response_objs, %args);
328 2 }
329  
330 =head2 get_the_users_currently_playing_track
331  
332 get_the_users_currently_playing_track - Get the User's Currently Playing Track
333  
334 Get the object currently being played on the user’s Spotify account.
335  
336 with Request details being:
337  
338 =head3 header
339  
340 =over 4
341  
342 =item Authorization
343  
344 Type: string | Required: required
345 A valid access token from the Spotify Accounts service:
346 see the Web API Authorization Guide
347 for details. The access token must have been issued on behalf of a user. The
348 access token must have the user-read-currently-playing and/or user-read-playback-state
349 scope authorized in order to read information.
350  
351 =back
352  
353 =head3 query_parameter
354  
355 =over 4
356  
357 =item additional_types
358  
359 Type: string | Required: optional
360 A comma-separated list of item types that your client supports besides the default track type. Valid types are: track and episode. An unsupported type in the response is expected to be represented as null value in the item field.
361 Note: This parameter was introduced to allow existing clients to maintain their current behaviour and might be deprecated in the future. In addition to providing this parameter, make sure that your client properly handles cases of new types in the future by checking against the currently_playing_type field.
362  
363 =item market
364  
365 Type: string | Required: required
366 An ISO 3166-1 alpha-2 country code
367 or the string from_token. Provide this parameter if you want to apply Track
368 Relinking.
369  
370 =back
371  
372 and Response Objects being:
373  
374  
375  
376 A successful request will return a 200 OK response code with a json payload that contains information about the currently playing track or episode and its context (see below). The information returned is for the last known state, which means an inactive device could be returned if it was the last one to execute playback.When no available devices are found, the request will return a 200 OK response but with no data populated.When no track is currently playing, the request will return a 204 NO CONTENT response with no payload.If private session is enabled the response will be a 204 NO CONTENT with an empty payload.Try in our Web Console
377  
378 =cut
379  
380 0 ▶async sub get_the_users_currently_playing_track {
Subroutine get_the_users_currently_playing_track: not called CC=5 SCAR=34.0
Pod documented
381 0 my ($self, %args) = @_;
382  
383 0 my $mapping = $self->mapping;
384 0 ▶ my $request->{method} = $mapping->{get_the_users_currently_playing_track}{method} // 'GET';
Condition0%0/2
$mapping->{"get_the_users_currently_playing_track"}{"method"} // "GET"
l!l
00
MC/DC0%0/1
$mapping->{"get_the_users_currently_playing_track"}{"method"} // "GET"
$mapping->{"get_the_users_currently_playing_track"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_the_users_currently_playing_track"}{"method"}
Aresult
11
00
385 0 ▶ $request->{uri} = $mapping->{get_the_users_currently_playing_track}{uri} // 'https://api.spotify.com/v1/me/player/currently-playing';
Condition0%0/2
$mapping->{"get_the_users_currently_playing_track"}{"uri"} // "https://api.spotify.com/v1/me/player/currently-playing"
l!l
00
MC/DC0%0/1
$mapping->{"get_the_users_currently_playing_track"}{"uri"} // "https://api.spotify.com/v1/me/player/currently-playing"
$mapping->{"get_the_users_currently_playing_track"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_the_users_currently_playing_track"}{"uri"}
Aresult
11
00
386 $request->{param} = $mapping->{get_the_users_currently_playing_track}{param} // {
387 0 ▶ header => {
Condition0%0/2
$mapping->{"get_the_users_currently_playing_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"additional_types", {"type", "string", "required", "optional"}, "market", {"type", "string", "required", "required"}}}
l!l
00
MC/DC0%0/1
$mapping->{"get_the_users_currently_playing_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"additional_types", {"type", "string", "required", "optional"}, "market", {"type", "string", "required", "required"}}}
$mapping->{"get_the_users_currently_playing_track"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_the_users_currently_playing_track"}{"param"}
Aresult
11
00
388 'Authorization' => {
389 type => 'string',
390 required => 'required',
391 },
392 },
393 query_parameter => {
394 'additional_types' => {
395 type => 'string',
396 required => 'optional',
397 },
398 'market' => {
399 type => 'string',
400 required => 'required',
401 },
402 },
403 };
404 my $response_objs = $mapping->{get_the_users_currently_playing_track}{response} // [
405  
406 0 ▶ ];
Condition0%0/2
$mapping->{"get_the_users_currently_playing_track"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"get_the_users_currently_playing_track"}{"response"} // []
$mapping->{"get_the_users_currently_playing_track"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_the_users_currently_playing_track"}{"response"}
Aresult
11
00
407  
408 0 await $self->call_api($request, $response_objs, %args);
409 2 }
410  
411 =head2 pause_a_users_playback
412  
413 pause_a_users_playback - Pause a User's Playback
414  
415 Pause playback on the user’s account.
416  
417 with Request details being:
418  
419 =head3 header
420  
421 =over 4
422  
423 =item Authorization
424  
425 Type: string | Required: required
426 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 a user.
427  
428 =back
429  
430 =head3 query_parameter
431  
432 =over 4
433  
434 =item device_id
435  
436 Type: string | Required: optional
437 The id of the device this command is targeting. If not supplied, the user’s currently active device is the target.
438  
439 =back
440  
441 and Response Objects being:
442  
443  
444  
445 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
446  
447 =cut
448  
449 0 ▶async sub pause_a_users_playback {
Subroutine pause_a_users_playback: not called CC=5 SCAR=34.0
Pod documented
450 0 my ($self, %args) = @_;
451  
452 0 my $mapping = $self->mapping;
453 0 ▶ my $request->{method} = $mapping->{pause_a_users_playback}{method} // 'PUT';
Condition0%0/2
$mapping->{"pause_a_users_playback"}{"method"} // "PUT"
l!l
00
MC/DC0%0/1
$mapping->{"pause_a_users_playback"}{"method"} // "PUT"
$mapping->{"pause_a_users_playback"}{"method"}
Truth table0%0/2
A
A= $mapping->{"pause_a_users_playback"}{"method"}
Aresult
11
00
454 0 ▶ $request->{uri} = $mapping->{pause_a_users_playback}{uri} // 'https://api.spotify.com/v1/me/player/pause';
Condition0%0/2
$mapping->{"pause_a_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/pause"
l!l
00
MC/DC0%0/1
$mapping->{"pause_a_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/pause"
$mapping->{"pause_a_users_playback"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"pause_a_users_playback"}{"uri"}
Aresult
11
00
455 $request->{param} = $mapping->{pause_a_users_playback}{param} // {
456 0 ▶ header => {
Condition0%0/2
$mapping->{"pause_a_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}}}
l!l
00
MC/DC0%0/1
$mapping->{"pause_a_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}}}
$mapping->{"pause_a_users_playback"}{"param"}
Truth table0%0/2
A
A= $mapping->{"pause_a_users_playback"}{"param"}
Aresult
11
00
457 'Authorization' => {
458 type => 'string',
459 required => 'required',
460 },
461 },
462 query_parameter => {
463 'device_id' => {
464 type => 'string',
465 required => 'optional',
466 },
467 },
468 };
469 my $response_objs = $mapping->{pause_a_users_playback}{response} // [
470  
471 0 ▶ ];
Condition0%0/2
$mapping->{"pause_a_users_playback"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"pause_a_users_playback"}{"response"} // []
$mapping->{"pause_a_users_playback"}{"response"}
Truth table0%0/2
A
A= $mapping->{"pause_a_users_playback"}{"response"}
Aresult
11
00
472  
473 0 await $self->call_api($request, $response_objs, %args);
474 2 }
475  
476 =head2 seek_to_position_in_currently_playing_track
477  
478 seek_to_position_in_currently_playing_track - Seek To Position In Currently Playing Track
479  
480 Seeks to the given position in the user’s currently playing track.
481  
482 with Request details being:
483  
484 =head3 header
485  
486 =over 4
487  
488 =item Authorization
489  
490 Type: string | Required: required
491 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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback
492  
493 =back
494  
495 =head3 query_parameter
496  
497 =over 4
498  
499 =item device_id
500  
501 Type: string | Required: optional
502 The id of the device this command is targeting. If
503 not supplied, the user’s currently active device is the target.
504  
505 =item position_ms
506  
507 Type: integer | Required: required
508 The position in milliseconds to seek to. Must be a
509 positive number. Passing in a position that is greater than the length of
510 the track will cause the player to start playing the next song.
511  
512 =back
513  
514 and Response Objects being:
515  
516  
517  
518 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
519  
520 =cut
521  
522 0 ▶async sub seek_to_position_in_currently_playing_track {
Subroutine seek_to_position_in_currently_playing_track: not called CC=5 SCAR=34.0
Pod documented
523 0 my ($self, %args) = @_;
524  
525 0 my $mapping = $self->mapping;
526 0 ▶ my $request->{method} = $mapping->{seek_to_position_in_currently_playing_track}{method} // 'PUT';
Condition0%0/2
$mapping->{"seek_to_position_in_currently_playing_track"}{"method"} // "PUT"
l!l
00
MC/DC0%0/1
$mapping->{"seek_to_position_in_currently_playing_track"}{"method"} // "PUT"
$mapping->{"seek_to_position_in_currently_playing_track"}{"method"}
Truth table0%0/2
A
A= $mapping->{"seek_to_position_in_currently_playing_track"}{"method"}
Aresult
11
00
527 0 ▶ $request->{uri} = $mapping->{seek_to_position_in_currently_playing_track}{uri} // 'https://api.spotify.com/v1/me/player/seek';
Condition0%0/2
$mapping->{"seek_to_position_in_currently_playing_track"}{"uri"} // "https://api.spotify.com/v1/me/player/seek"
l!l
00
MC/DC0%0/1
$mapping->{"seek_to_position_in_currently_playing_track"}{"uri"} // "https://api.spotify.com/v1/me/player/seek"
$mapping->{"seek_to_position_in_currently_playing_track"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"seek_to_position_in_currently_playing_track"}{"uri"}
Aresult
11
00
528 $request->{param} = $mapping->{seek_to_position_in_currently_playing_track}{param} // {
529 0 ▶ header => {
Condition0%0/2
$mapping->{"seek_to_position_in_currently_playing_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "position_ms", {"type", "integer", "required", "required"}}}
l!l
00
MC/DC0%0/1
$mapping->{"seek_to_position_in_currently_playing_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "position_ms", {"type", "integer", "required", "required"}}}
$mapping->{"seek_to_position_in_currently_playing_track"}{"param"}
Truth table0%0/2
A
A= $mapping->{"seek_to_position_in_currently_playing_track"}{"param"}
Aresult
11
00
530 'Authorization' => {
531 type => 'string',
532 required => 'required',
533 },
534 },
535 query_parameter => {
536 'device_id' => {
537 type => 'string',
538 required => 'optional',
539 },
540 'position_ms' => {
541 type => 'integer',
542 required => 'required',
543 },
544 },
545 };
546 my $response_objs = $mapping->{seek_to_position_in_currently_playing_track}{response} // [
547  
548 0 ▶ ];
Condition0%0/2
$mapping->{"seek_to_position_in_currently_playing_track"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"seek_to_position_in_currently_playing_track"}{"response"} // []
$mapping->{"seek_to_position_in_currently_playing_track"}{"response"}
Truth table0%0/2
A
A= $mapping->{"seek_to_position_in_currently_playing_track"}{"response"}
Aresult
11
00
549  
550 0 await $self->call_api($request, $response_objs, %args);
551 2 }
552  
553 =head2 set_repeat_mode_on_users_playback
554  
555 set_repeat_mode_on_users_playback - Set Repeat Mode On User’s Playback
556  
557 Set the repeat mode for the user’s playback. Options are repeat-track,
558 repeat-context, and off.
559  
560 with Request details being:
561  
562 =head3 header
563  
564 =over 4
565  
566 =item Authorization
567  
568 Type: string | Required: required
569 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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback.
570  
571 =back
572  
573 =head3 query_parameter
574  
575 =over 4
576  
577 =item device_id
578  
579 Type: string | Required: optional
580 The id of the device this command is targeting. If
581 not supplied, the user’s currently active device is the target.
582  
583 =item state
584  
585 Type: string | Required: required
586 track, context or off.
587 track will repeat the current track.
588 context will repeat the current context.
589 off will turn repeat off.
590  
591 =back
592  
593 and Response Objects being:
594  
595  
596  
597 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
598  
599 =cut
600  
601 0 ▶async sub set_repeat_mode_on_users_playback {
Subroutine set_repeat_mode_on_users_playback: not called CC=5 SCAR=34.0
Pod documented
602 0 my ($self, %args) = @_;
603  
604 0 my $mapping = $self->mapping;
605 0 ▶ my $request->{method} = $mapping->{set_repeat_mode_on_users_playback}{method} // 'PUT';
Condition0%0/2
$mapping->{"set_repeat_mode_on_users_playback"}{"method"} // "PUT"
l!l
00
MC/DC0%0/1
$mapping->{"set_repeat_mode_on_users_playback"}{"method"} // "PUT"
$mapping->{"set_repeat_mode_on_users_playback"}{"method"}
Truth table0%0/2
A
A= $mapping->{"set_repeat_mode_on_users_playback"}{"method"}
Aresult
11
00
606 0 ▶ $request->{uri} = $mapping->{set_repeat_mode_on_users_playback}{uri} // 'https://api.spotify.com/v1/me/player/repeat';
Condition0%0/2
$mapping->{"set_repeat_mode_on_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/repeat"
l!l
00
MC/DC0%0/1
$mapping->{"set_repeat_mode_on_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/repeat"
$mapping->{"set_repeat_mode_on_users_playback"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"set_repeat_mode_on_users_playback"}{"uri"}
Aresult
11
00
607 $request->{param} = $mapping->{set_repeat_mode_on_users_playback}{param} // {
608 0 ▶ header => {
Condition0%0/2
$mapping->{"set_repeat_mode_on_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "state", {"type", "string", "required", "required"}}}
l!l
00
MC/DC0%0/1
$mapping->{"set_repeat_mode_on_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "state", {"type", "string", "required", "required"}}}
$mapping->{"set_repeat_mode_on_users_playback"}{"param"}
Truth table0%0/2
A
A= $mapping->{"set_repeat_mode_on_users_playback"}{"param"}
Aresult
11
00
609 'Authorization' => {
610 type => 'string',
611 required => 'required',
612 },
613 },
614 query_parameter => {
615 'device_id' => {
616 type => 'string',
617 required => 'optional',
618 },
619 'state' => {
620 type => 'string',
621 required => 'required',
622 },
623 },
624 };
625 my $response_objs = $mapping->{set_repeat_mode_on_users_playback}{response} // [
626  
627 0 ▶ ];
Condition0%0/2
$mapping->{"set_repeat_mode_on_users_playback"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"set_repeat_mode_on_users_playback"}{"response"} // []
$mapping->{"set_repeat_mode_on_users_playback"}{"response"}
Truth table0%0/2
A
A= $mapping->{"set_repeat_mode_on_users_playback"}{"response"}
Aresult
11
00
628  
629 0 await $self->call_api($request, $response_objs, %args);
630 2 }
631  
632 =head2 set_volume_for_users_playback
633  
634 set_volume_for_users_playback - Set Volume For User's Playback
635  
636 Set the volume for the user’s current playback device.
637  
638 with Request details being:
639  
640 =head3 header
641  
642 =over 4
643  
644 =item Authorization
645  
646 Type: string | Required: required
647 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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback.
648  
649 =back
650  
651 =head3 query_parameter
652  
653 =over 4
654  
655 =item device_id
656  
657 Type: string | Required: optional
658 The id of the device this command is targeting. If not supplied, the user’s currently active device is the target.
659  
660 =item volume_percent
661  
662 Type: integer | Required: required
663 The volume to set. Must be a value from 0 to 100 inclusive.
664  
665 =back
666  
667 and Response Objects being:
668  
669  
670  
671 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
672  
673 =cut
674  
675 0 ▶async sub set_volume_for_users_playback {
Subroutine set_volume_for_users_playback: not called CC=5 SCAR=34.0
Pod documented
676 0 my ($self, %args) = @_;
677  
678 0 my $mapping = $self->mapping;
679 0 ▶ my $request->{method} = $mapping->{set_volume_for_users_playback}{method} // 'PUT';
Condition0%0/2
$mapping->{"set_volume_for_users_playback"}{"method"} // "PUT"
l!l
00
MC/DC0%0/1
$mapping->{"set_volume_for_users_playback"}{"method"} // "PUT"
$mapping->{"set_volume_for_users_playback"}{"method"}
Truth table0%0/2
A
A= $mapping->{"set_volume_for_users_playback"}{"method"}
Aresult
11
00
680 0 ▶ $request->{uri} = $mapping->{set_volume_for_users_playback}{uri} // 'https://api.spotify.com/v1/me/player/volume';
Condition0%0/2
$mapping->{"set_volume_for_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/volume"
l!l
00
MC/DC0%0/1
$mapping->{"set_volume_for_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/volume"
$mapping->{"set_volume_for_users_playback"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"set_volume_for_users_playback"}{"uri"}
Aresult
11
00
681 $request->{param} = $mapping->{set_volume_for_users_playback}{param} // {
682 0 ▶ header => {
Condition0%0/2
$mapping->{"set_volume_for_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "volume_percent", {"type", "integer", "required", "required"}}}
l!l
00
MC/DC0%0/1
$mapping->{"set_volume_for_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "volume_percent", {"type", "integer", "required", "required"}}}
$mapping->{"set_volume_for_users_playback"}{"param"}
Truth table0%0/2
A
A= $mapping->{"set_volume_for_users_playback"}{"param"}
Aresult
11
00
683 'Authorization' => {
684 type => 'string',
685 required => 'required',
686 },
687 },
688 query_parameter => {
689 'device_id' => {
690 type => 'string',
691 required => 'optional',
692 },
693 'volume_percent' => {
694 type => 'integer',
695 required => 'required',
696 },
697 },
698 };
699 my $response_objs = $mapping->{set_volume_for_users_playback}{response} // [
700  
701 0 ▶ ];
Condition0%0/2
$mapping->{"set_volume_for_users_playback"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"set_volume_for_users_playback"}{"response"} // []
$mapping->{"set_volume_for_users_playback"}{"response"}
Truth table0%0/2
A
A= $mapping->{"set_volume_for_users_playback"}{"response"}
Aresult
11
00
702  
703 0 await $self->call_api($request, $response_objs, %args);
704 2 }
705  
706 =head2 skip_users_playback_to_next_track
707  
708 skip_users_playback_to_next_track - Skip User’s Playback To Next Track
709  
710 Skips to next track in the user’s queue.
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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback.
722  
723 =back
724  
725 =head3 query_parameter
726  
727 =over 4
728  
729 =item device_id
730  
731 Type: string | Required: optional
732 The id of the device this command is targeting. If not supplied, the user’s currently active device is the target.
733  
734 =back
735  
736 and Response Objects being:
737  
738  
739  
740 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
741  
742 =cut
743  
744 0 ▶async sub skip_users_playback_to_next_track {
Subroutine skip_users_playback_to_next_track: not called CC=5 SCAR=34.0
Pod documented
745 0 my ($self, %args) = @_;
746  
747 0 my $mapping = $self->mapping;
748 0 ▶ my $request->{method} = $mapping->{skip_users_playback_to_next_track}{method} // 'POST';
Condition0%0/2
$mapping->{"skip_users_playback_to_next_track"}{"method"} // "POST"
l!l
00
MC/DC0%0/1
$mapping->{"skip_users_playback_to_next_track"}{"method"} // "POST"
$mapping->{"skip_users_playback_to_next_track"}{"method"}
Truth table0%0/2
A
A= $mapping->{"skip_users_playback_to_next_track"}{"method"}
Aresult
11
00
749 0 ▶ $request->{uri} = $mapping->{skip_users_playback_to_next_track}{uri} // 'https://api.spotify.com/v1/me/player/next';
Condition0%0/2
$mapping->{"skip_users_playback_to_next_track"}{"uri"} // "https://api.spotify.com/v1/me/player/next"
l!l
00
MC/DC0%0/1
$mapping->{"skip_users_playback_to_next_track"}{"uri"} // "https://api.spotify.com/v1/me/player/next"
$mapping->{"skip_users_playback_to_next_track"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"skip_users_playback_to_next_track"}{"uri"}
Aresult
11
00
750 $request->{param} = $mapping->{skip_users_playback_to_next_track}{param} // {
751 0 ▶ header => {
Condition0%0/2
$mapping->{"skip_users_playback_to_next_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}}}
l!l
00
MC/DC0%0/1
$mapping->{"skip_users_playback_to_next_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}}}
$mapping->{"skip_users_playback_to_next_track"}{"param"}
Truth table0%0/2
A
A= $mapping->{"skip_users_playback_to_next_track"}{"param"}
Aresult
11
00
752 'Authorization' => {
753 type => 'string',
754 required => 'required',
755 },
756 },
757 query_parameter => {
758 'device_id' => {
759 type => 'string',
760 required => 'optional',
761 },
762 },
763 };
764 my $response_objs = $mapping->{skip_users_playback_to_next_track}{response} // [
765  
766 0 ▶ ];
Condition0%0/2
$mapping->{"skip_users_playback_to_next_track"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"skip_users_playback_to_next_track"}{"response"} // []
$mapping->{"skip_users_playback_to_next_track"}{"response"}
Truth table0%0/2
A
A= $mapping->{"skip_users_playback_to_next_track"}{"response"}
Aresult
11
00
767  
768 0 await $self->call_api($request, $response_objs, %args);
769 2 }
770  
771 =head2 skip_users_playback_to_previous_track
772  
773 skip_users_playback_to_previous_track - Skip User’s Playback To Previous Track
774  
775 Skips to previous track in the user’s queue.
776  
777 with Request details being:
778  
779 =head3 header
780  
781 =over 4
782  
783 =item Authorization
784  
785 Type: string | Required: required
786 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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback.
787  
788 =back
789  
790 =head3 query_parameter
791  
792 =over 4
793  
794 =item device_id
795  
796 Type: string | Required: optional
797 The id of the device this command is targeting. If
798 not supplied, the user’s currently active device is the target.
799  
800 =back
801  
802 and Response Objects being:
803  
804  
805  
806 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
807  
808 =cut
809  
810 0 ▶async sub skip_users_playback_to_previous_track {
Subroutine skip_users_playback_to_previous_track: not called CC=5 SCAR=34.0
Pod documented
811 0 my ($self, %args) = @_;
812  
813 0 my $mapping = $self->mapping;
814 0 ▶ my $request->{method} = $mapping->{skip_users_playback_to_previous_track}{method} // 'POST';
Condition0%0/2
$mapping->{"skip_users_playback_to_previous_track"}{"method"} // "POST"
l!l
00
MC/DC0%0/1
$mapping->{"skip_users_playback_to_previous_track"}{"method"} // "POST"
$mapping->{"skip_users_playback_to_previous_track"}{"method"}
Truth table0%0/2
A
A= $mapping->{"skip_users_playback_to_previous_track"}{"method"}
Aresult
11
00
815 0 ▶ $request->{uri} = $mapping->{skip_users_playback_to_previous_track}{uri} // 'https://api.spotify.com/v1/me/player/previous';
Condition0%0/2
$mapping->{"skip_users_playback_to_previous_track"}{"uri"} // "https://api.spotify.com/v1/me/player/previous"
l!l
00
MC/DC0%0/1
$mapping->{"skip_users_playback_to_previous_track"}{"uri"} // "https://api.spotify.com/v1/me/player/previous"
$mapping->{"skip_users_playback_to_previous_track"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"skip_users_playback_to_previous_track"}{"uri"}
Aresult
11
00
816 $request->{param} = $mapping->{skip_users_playback_to_previous_track}{param} // {
817 0 ▶ header => {
Condition0%0/2
$mapping->{"skip_users_playback_to_previous_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}}}
l!l
00
MC/DC0%0/1
$mapping->{"skip_users_playback_to_previous_track"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}}}
$mapping->{"skip_users_playback_to_previous_track"}{"param"}
Truth table0%0/2
A
A= $mapping->{"skip_users_playback_to_previous_track"}{"param"}
Aresult
11
00
818 'Authorization' => {
819 type => 'string',
820 required => 'required',
821 },
822 },
823 query_parameter => {
824 'device_id' => {
825 type => 'string',
826 required => 'optional',
827 },
828 },
829 };
830 my $response_objs = $mapping->{skip_users_playback_to_previous_track}{response} // [
831  
832 0 ▶ ];
Condition0%0/2
$mapping->{"skip_users_playback_to_previous_track"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"skip_users_playback_to_previous_track"}{"response"} // []
$mapping->{"skip_users_playback_to_previous_track"}{"response"}
Truth table0%0/2
A
A= $mapping->{"skip_users_playback_to_previous_track"}{"response"}
Aresult
11
00
833  
834 0 await $self->call_api($request, $response_objs, %args);
835 2 }
836  
837 =head2 start_a_users_playback
838  
839 start_a_users_playback - Start/Resume a User's Playback
840  
841 Start a new context or resume current playback on the user’s active device.
842  
843 with Request details being:
844  
845 =head3 header
846  
847 =over 4
848  
849 =item Authorization
850  
851 Type: string | Required: required
852 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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback.
853  
854 =back
855  
856 =head3 json_body_parameter
857  
858 =over 4
859  
860 =item context_uri
861  
862 Type: string | Required: optional
863 string
864  
865 =item offset
866  
867 Type: object | Required: optional
868 object
869  
870 =item position_ms
871  
872 Type: integer | Required: optional
873 integer
874  
875 =item uris
876  
877 Type: array[string] | Required: optional
878 Array of URIs
879  
880 =back
881  
882 =head3 query_parameter
883  
884 =over 4
885  
886 =item device_id
887  
888 Type: string | Required: optional
889 The id of the device this command is targeting. If not supplied, the user’s currently active device is the target.
890  
891 =back
892  
893 and Response Objects being:
894  
895  
896  
897 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
898  
899 =cut
900  
901 0 ▶async sub start_a_users_playback {
Subroutine start_a_users_playback: not called CC=5 SCAR=34.0
Pod documented
902 0 my ($self, %args) = @_;
903  
904 0 my $mapping = $self->mapping;
905 0 ▶ my $request->{method} = $mapping->{start_a_users_playback}{method} // 'PUT';
Condition0%0/2
$mapping->{"start_a_users_playback"}{"method"} // "PUT"
l!l
00
MC/DC0%0/1
$mapping->{"start_a_users_playback"}{"method"} // "PUT"
$mapping->{"start_a_users_playback"}{"method"}
Truth table0%0/2
A
A= $mapping->{"start_a_users_playback"}{"method"}
Aresult
11
00
906 0 ▶ $request->{uri} = $mapping->{start_a_users_playback}{uri} // 'https://api.spotify.com/v1/me/player/play';
Condition0%0/2
$mapping->{"start_a_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/play"
l!l
00
MC/DC0%0/1
$mapping->{"start_a_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/play"
$mapping->{"start_a_users_playback"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"start_a_users_playback"}{"uri"}
Aresult
11
00
907 $request->{param} = $mapping->{start_a_users_playback}{param} // {
908 0 ▶ header => {
Condition0%0/2
$mapping->{"start_a_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "json_body_parameter", {"context_uri", {"type", "string", "required", "optional"}, "offset", {"type", "object", "required", "optional"}, "position_ms", {"type", "integer", "required", "optional"}, "uris", {"type", "array[string]", "required", "optional"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}}}
l!l
00
MC/DC0%0/1
$mapping->{"start_a_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "json_body_parameter", {"context_uri", {"type", "string", "required", "optional"}, "offset", {"type", "object", "required", "optional"}, "position_ms", {"type", "integer", "required", "optional"}, "uris", {"type", "array[string]", "required", "optional"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}}}
$mapping->{"start_a_users_playback"}{"param"}
Truth table0%0/2
A
A= $mapping->{"start_a_users_playback"}{"param"}
Aresult
11
00
909 'Authorization' => {
910 type => 'string',
911 required => 'required',
912 },
913 },
914 json_body_parameter => {
915 'context_uri' => {
916 type => 'string',
917 required => 'optional',
918 },
919 'offset' => {
920 type => 'object',
921 required => 'optional',
922 },
923 'position_ms' => {
924 type => 'integer',
925 required => 'optional',
926 },
927 'uris' => {
928 type => 'array[string]',
929 required => 'optional',
930 },
931 },
932 query_parameter => {
933 'device_id' => {
934 type => 'string',
935 required => 'optional',
936 },
937 },
938 };
939 my $response_objs = $mapping->{start_a_users_playback}{response} // [
940  
941 0 ▶ ];
Condition0%0/2
$mapping->{"start_a_users_playback"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"start_a_users_playback"}{"response"} // []
$mapping->{"start_a_users_playback"}{"response"}
Truth table0%0/2
A
A= $mapping->{"start_a_users_playback"}{"response"}
Aresult
11
00
942  
943 0 await $self->call_api($request, $response_objs, %args);
944 2 }
945  
946 =head2 toggle_shuffle_for_users_playback
947  
948 toggle_shuffle_for_users_playback - Toggle Shuffle For User’s Playback
949  
950 Toggle shuffle on or off for user’s playback.
951  
952 with Request details being:
953  
954 =head3 header
955  
956 =over 4
957  
958 =item Authorization
959  
960 Type: string | Required: required
961 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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback.
962  
963 =back
964  
965 =head3 query_parameter
966  
967 =over 4
968  
969 =item device_id
970  
971 Type: string | Required: optional
972 The id of the device this command is targeting. If
973 not supplied, the user’s currently active device is the target.
974  
975 =item state
976  
977 Type: boolean | Required: required
978 true : Shuffle user’s playback.
979 false : Do not shuffle user’s playback.
980  
981 =back
982  
983 and Response Objects being:
984  
985  
986  
987 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
988  
989 =cut
990  
991 0 ▶async sub toggle_shuffle_for_users_playback {
Subroutine toggle_shuffle_for_users_playback: not called CC=5 SCAR=34.0
Pod documented
992 0 my ($self, %args) = @_;
993  
994 0 my $mapping = $self->mapping;
995 0 ▶ my $request->{method} = $mapping->{toggle_shuffle_for_users_playback}{method} // 'PUT';
Condition0%0/2
$mapping->{"toggle_shuffle_for_users_playback"}{"method"} // "PUT"
l!l
00
MC/DC0%0/1
$mapping->{"toggle_shuffle_for_users_playback"}{"method"} // "PUT"
$mapping->{"toggle_shuffle_for_users_playback"}{"method"}
Truth table0%0/2
A
A= $mapping->{"toggle_shuffle_for_users_playback"}{"method"}
Aresult
11
00
996 0 ▶ $request->{uri} = $mapping->{toggle_shuffle_for_users_playback}{uri} // 'https://api.spotify.com/v1/me/player/shuffle';
Condition0%0/2
$mapping->{"toggle_shuffle_for_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/shuffle"
l!l
00
MC/DC0%0/1
$mapping->{"toggle_shuffle_for_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player/shuffle"
$mapping->{"toggle_shuffle_for_users_playback"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"toggle_shuffle_for_users_playback"}{"uri"}
Aresult
11
00
997 $request->{param} = $mapping->{toggle_shuffle_for_users_playback}{param} // {
998 0 ▶ header => {
Condition0%0/2
$mapping->{"toggle_shuffle_for_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "state", {"type", "boolean", "required", "required"}}}
l!l
00
MC/DC0%0/1
$mapping->{"toggle_shuffle_for_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"device_id", {"type", "string", "required", "optional"}, "state", {"type", "boolean", "required", "required"}}}
$mapping->{"toggle_shuffle_for_users_playback"}{"param"}
Truth table0%0/2
A
A= $mapping->{"toggle_shuffle_for_users_playback"}{"param"}
Aresult
11
00
999 'Authorization' => {
1000 type => 'string',
1001 required => 'required',
1002 },
1003 },
1004 query_parameter => {
1005 'device_id' => {
1006 type => 'string',
1007 required => 'optional',
1008 },
1009 'state' => {
1010 type => 'boolean',
1011 required => 'required',
1012 },
1013 },
1014 };
1015 my $response_objs = $mapping->{toggle_shuffle_for_users_playback}{response} // [
1016  
1017 0 ▶ ];
Condition0%0/2
$mapping->{"toggle_shuffle_for_users_playback"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"toggle_shuffle_for_users_playback"}{"response"} // []
$mapping->{"toggle_shuffle_for_users_playback"}{"response"}
Truth table0%0/2
A
A= $mapping->{"toggle_shuffle_for_users_playback"}{"response"}
Aresult
11
00
1018  
1019 0 await $self->call_api($request, $response_objs, %args);
1020 2 }
1021  
1022 =head2 transfer_a_users_playback
1023  
1024 transfer_a_users_playback - Transfer a User's Playback
1025  
1026 Transfer playback to a new device and determine if it should start playing.
1027  
1028 with Request details being:
1029  
1030 =head3 header
1031  
1032 =over 4
1033  
1034 =item Authorization
1035  
1036 Type: string | Required: required
1037 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 a user.The access token must have the user-modify-playback-state scope authorized in order to control playback.
1038  
1039 =back
1040  
1041 =head3 json_body_parameter
1042  
1043 =over 4
1044  
1045 =item device_ids
1046  
1047 Type: array[string] | Required: required
1048 A JSON array containing the ID of the device on which playback should be started/transferred.For example:{device_ids:["74ASZWbe4lXaubB36ztrGX"]}Note: Although an array is accepted, only a single device_id is currently supported. Supplying more than one will return 400 Bad Request
1049  
1050 =item play
1051  
1052 Type: boolean | Required: optional
1053 true: ensure playback happens on new device.false or not provided: keep the current playback state.
1054  
1055 =back
1056  
1057 and Response Objects being:
1058  
1059  
1060  
1061 A completed request will return a 204 NO CONTENT response code, and then issue the command to the player. Due to the asynchronous nature of the issuance of the command, you should use the Get Information About The User’s Current Playback endpoint to check that your issued command was handled correctly by the player.If the device is not found, the request will return 404 NOT FOUND response code.If the user making the request is non-premium, a 403 FORBIDDEN response code will be returned.Try in our Web Console
1062  
1063 =cut
1064  
1065 0 ▶async sub transfer_a_users_playback {
Subroutine transfer_a_users_playback: not called CC=5 SCAR=34.0
Pod documented
1066 0 my ($self, %args) = @_;
1067  
1068 0 my $mapping = $self->mapping;
1069 0 ▶ my $request->{method} = $mapping->{transfer_a_users_playback}{method} // 'PUT';
Condition0%0/2
$mapping->{"transfer_a_users_playback"}{"method"} // "PUT"
l!l
00
MC/DC0%0/1
$mapping->{"transfer_a_users_playback"}{"method"} // "PUT"
$mapping->{"transfer_a_users_playback"}{"method"}
Truth table0%0/2
A
A= $mapping->{"transfer_a_users_playback"}{"method"}
Aresult
11
00
1070 0 ▶ $request->{uri} = $mapping->{transfer_a_users_playback}{uri} // 'https://api.spotify.com/v1/me/player';
Condition0%0/2
$mapping->{"transfer_a_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player"
l!l
00
MC/DC0%0/1
$mapping->{"transfer_a_users_playback"}{"uri"} // "https://api.spotify.com/v1/me/player"
$mapping->{"transfer_a_users_playback"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"transfer_a_users_playback"}{"uri"}
Aresult
11
00
1071 $request->{param} = $mapping->{transfer_a_users_playback}{param} // {
1072 0 ▶ header => {
Condition0%0/2
$mapping->{"transfer_a_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "json_body_parameter", {"device_ids", {"type", "array[string]", "required", "required"}, "play", {"type", "boolean", "required", "optional"}}}
l!l
00
MC/DC0%0/1
$mapping->{"transfer_a_users_playback"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "json_body_parameter", {"device_ids", {"type", "array[string]", "required", "required"}, "play", {"type", "boolean", "required", "optional"}}}
$mapping->{"transfer_a_users_playback"}{"param"}
Truth table0%0/2
A
A= $mapping->{"transfer_a_users_playback"}{"param"}
Aresult
11
00
1073 'Authorization' => {
1074 type => 'string',
1075 required => 'required',
1076 },
1077 },
1078 json_body_parameter => {
1079 'device_ids' => {
1080 type => 'array[string]',
1081 required => 'required',
1082 },
1083 'play' => {
1084 type => 'boolean',
1085 required => 'optional',
1086 },
1087 },
1088 };
1089 my $response_objs = $mapping->{transfer_a_users_playback}{response} // [
1090  
1091 0 ▶ ];
Condition0%0/2
$mapping->{"transfer_a_users_playback"}{"response"} // []
l!l
00
MC/DC0%0/1
$mapping->{"transfer_a_users_playback"}{"response"} // []
$mapping->{"transfer_a_users_playback"}{"response"}
Truth table0%0/2
A
A= $mapping->{"transfer_a_users_playback"}{"response"}
Aresult
11
00
1092  
1093 0 await $self->call_api($request, $response_objs, %args);
1094 2 }
1095  
1096 2 1;
« lib/Net/Async/Spotify/API/Generated/Library.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Playlists.pm »