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

filter: Statementstmt 23.2% 34 / 146 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 23.8% 5 / 21 Podpod 100% 16 / 16 totaltotal 30.0% 55 / 183 SCAR 3.7
CC
1
Cov
23%
check_users_saved_albums
2.0
check_users_saved_episodes
2.0
check_users_saved_shows
2.0
CRAP 1.5
« script/spotify-cli.pl ↑ Summary lib/Net/Async/Spotify/API/Generated/Player.pm »
1 package Net::Async::Spotify::API::Generated::Library;
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.001'; # 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::Library - Package representing Spotify Library 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 =head2 check_users_saved_albums
31  
32 check_users_saved_albums - Check User's Saved Albums
33  
34 Check if one or more albums is already saved in the current Spotify user’s ‘Your Music’ library.
35  
36 with Request details being:
37  
38 =head3 header
39  
40 =over 4
41  
42 =item Authorization
43  
44 Type: string | Required: required
45 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The user-library-read scope must have been authorized by the user.
46  
47 =back
48  
49 =head3 query_parameter
50  
51 =over 4
52  
53 =item ids
54  
55 Type: string | Required: required
56 A comma-separated list of the Spotify IDs for the albums. Maximum: 50 IDs.
57  
58 =back
59  
60 and Response Objects being:
61  
62 - error object
63  
64  
65 On success, the HTTP status code in the response header is 200 OK and the response body contains a JSON array of true or false values, in the same order in which the ids were specified.
66 On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
67  
68 =cut
69  
70 0 ▶async sub check_users_saved_albums {
Subroutine check_users_saved_albums: not called CC=1 SCAR=6.9
Pod documented
71 0 my ($self, %args) = @_;
72  
73 0 my $request->{method} = 'GET';
74 0 $request->{uri} = 'https://api.spotify.com/v1/me/albums/contains';
75 $request->{param} = {
76 0 header => {
77 'Authorization' => {
78 type => 'string',
79 required => 'required',
80 },
81 },
82 query_parameter => {
83 'ids' => {
84 type => 'string',
85 required => 'required',
86 },
87 },
88 };
89 0 my $response_objs = [
90 'error object',
91  
92 ];
93  
94 0 await $self->call_api($request, $response_objs, %args);
95 2 }
96  
97 =head2 check_users_saved_episodes
98  
99 check_users_saved_episodes - Check User's Saved Episodes
100  
101 Check if one or more episodes is already saved in the current Spotify user’s ‘Your Episodes’ library.
102 This API endpoint is in beta and could change without warning. Please share any feedback that you have, or issues that you discover, in our developer community forum..
103  
104 with Request details being:
105  
106 =head3 header
107  
108 =over 4
109  
110 =item Authorization
111  
112 Type: string | Required: required
113 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The user-library-read scope must have been authorized by the user.
114  
115 =back
116  
117 =head3 query_parameter
118  
119 =over 4
120  
121 =item ids
122  
123 Type: string | Required: required
124 A comma-separated list of the Spotify IDs for the episodes. Maximum: 50 IDs.
125  
126 =back
127  
128 and Response Objects being:
129  
130 - error object
131  
132  
133 On success, the HTTP status code in the response header is 200 OK and the response body contains a JSON array of true or false values, in the same order in which the ids were specified.
134 On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
135  
136 =cut
137  
138 0 ▶async sub check_users_saved_episodes {
Subroutine check_users_saved_episodes: not called CC=1 SCAR=6.9
Pod documented
139 0 my ($self, %args) = @_;
140  
141 0 my $request->{method} = 'GET';
142 0 $request->{uri} = 'https://api.spotify.com/v1/me/episodes/contains';
143 $request->{param} = {
144 0 header => {
145 'Authorization' => {
146 type => 'string',
147 required => 'required',
148 },
149 },
150 query_parameter => {
151 'ids' => {
152 type => 'string',
153 required => 'required',
154 },
155 },
156 };
157 0 my $response_objs = [
158 'error object',
159  
160 ];
161  
162 0 await $self->call_api($request, $response_objs, %args);
163 2 }
164  
165 =head2 check_users_saved_shows
166  
167 check_users_saved_shows - Check User's Saved Shows
168  
169 Check if one or more shows is already saved in the current Spotify user’s library.
170  
171 with Request details being:
172  
173 =head3 header
174  
175 =over 4
176  
177 =item Authorization
178  
179 Type: string | Required: required
180 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been isued on behalf of the user. The user-library-read scope must have been authorised by the user.
181  
182 =back
183  
184 =head3 query_parameter
185  
186 =over 4
187  
188 =item ids
189  
190 Type: string | Required: required
191 A comma-separated list of the Spotify IDs for the shows. Maximum: 50 ids.
192  
193 =back
194  
195 and Response Objects being:
196  
197 - error object
198  
199  
200 On success, the HTTP status code in the response header is 200 OK and the response body contains a JSON array of trueor false values, in the same order in which the ids were specified. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
201  
202 =cut
203  
204 0 ▶async sub check_users_saved_shows {
Subroutine check_users_saved_shows: not called CC=1 SCAR=6.9
Pod documented
205 0 my ($self, %args) = @_;
206  
207 0 my $request->{method} = 'GET';
208 0 $request->{uri} = 'https://api.spotify.com/v1/me/shows/contains';
209 $request->{param} = {
210 0 header => {
211 'Authorization' => {
212 type => 'string',
213 required => 'required',
214 },
215 },
216 query_parameter => {
217 'ids' => {
218 type => 'string',
219 required => 'required',
220 },
221 },
222 };
223 0 my $response_objs = [
224 'error object',
225  
226 ];
227  
228 0 await $self->call_api($request, $response_objs, %args);
229 2 }
230  
231 =head2 check_users_saved_tracks
232  
233 check_users_saved_tracks - Check User's Saved Tracks
234  
235 Check if one or more tracks is already saved in the current Spotify user’s ‘Your Music’ library.
236  
237 with Request details being:
238  
239 =head3 header
240  
241 =over 4
242  
243 =item Authorization
244  
245 Type: string | Required: required
246 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The user-library-read scope must have been authorized by the user.
247  
248 =back
249  
250 =head3 query_parameter
251  
252 =over 4
253  
254 =item ids
255  
256 Type: string | Required: required
257 A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs.
258  
259 =back
260  
261 and Response Objects being:
262  
263 - error object
264  
265  
266 On success, the HTTP status code in the response header is 200 OK and the response body contains a JSON array of true or false values, in the same order in which the ids were specified.
267 On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
268  
269 =cut
270  
271 0 ▶async sub check_users_saved_tracks {
Subroutine check_users_saved_tracks: not called CC=1 SCAR=6.9
Pod documented
272 0 my ($self, %args) = @_;
273  
274 0 my $request->{method} = 'GET';
275 0 $request->{uri} = 'https://api.spotify.com/v1/me/tracks/contains';
276 $request->{param} = {
277 0 header => {
278 'Authorization' => {
279 type => 'string',
280 required => 'required',
281 },
282 },
283 query_parameter => {
284 'ids' => {
285 type => 'string',
286 required => 'required',
287 },
288 },
289 };
290 0 my $response_objs = [
291 'error object',
292  
293 ];
294  
295 0 await $self->call_api($request, $response_objs, %args);
296 2 }
297  
298 =head2 get_users_saved_albums
299  
300 get_users_saved_albums - Get User's Saved Albums
301  
302 Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.
303  
304 with Request details being:
305  
306 =head3 header
307  
308 =over 4
309  
310 =item Authorization
311  
312 Type: string | Required: required
313 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The user-library-read scope must have been authorized by the user.
314  
315 =back
316  
317 =head3 query_parameter
318  
319 =over 4
320  
321 =item limit
322  
323 Type: integer | Required: optional
324 The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
325  
326 =item market
327  
328 Type: string | Required: optional
329 An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking.
330  
331 =item offset
332  
333 Type: integer | Required: optional
334 The index of the first object to return. Default: 0 (i.e., the first object). Use with limit to get the next set of objects.
335  
336 =back
337  
338 and Response Objects being:
339  
340 - album object
341 - error object
342  
343  
344 On success, the HTTP status code in the response header is 200 OK and the response body contains an array of saved album objects (wrapped in a paging object) in JSON format. Each album object is accompanied by a timestamp (added_at) to show when it was added. There is also an etag in the header that can be used in future conditional requests.On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
345  
346 =cut
347  
348 0 ▶async sub get_users_saved_albums {
Subroutine get_users_saved_albums: not called CC=1 SCAR=6.9
Pod documented
349 0 my ($self, %args) = @_;
350  
351 0 my $request->{method} = 'GET';
352 0 $request->{uri} = 'https://api.spotify.com/v1/me/albums';
353 $request->{param} = {
354 0 header => {
355 'Authorization' => {
356 type => 'string',
357 required => 'required',
358 },
359 },
360 query_parameter => {
361 'limit' => {
362 type => 'integer',
363 required => 'optional',
364 },
365 'market' => {
366 type => 'string',
367 required => 'optional',
368 },
369 'offset' => {
370 type => 'integer',
371 required => 'optional',
372 },
373 },
374 };
375 0 my $response_objs = [
376 'album object',
377 'error object',
378  
379 ];
380  
381 0 await $self->call_api($request, $response_objs, %args);
382 2 }
383  
384 =head2 get_users_saved_episodes
385  
386 get_users_saved_episodes - Get User's Saved Episodes
387  
388 Get a list of the episodes saved in the current Spotify user’s library.
389 This API endpoint is in beta and could change without warning. Please share any feedback that you have, or issues that you discover, in our developer community forum.
390  
391 with Request details being:
392  
393 =head3 header
394  
395 =over 4
396  
397 =item Authorization
398  
399 Type: string | Required: required
400 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The user-library-read scope must have been authorized by the user.
401  
402 =back
403  
404 =head3 query_parameter
405  
406 =over 4
407  
408 =item limit
409  
410 Type: integer | Required: optional
411 The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
412  
413 =item market
414  
415 Type: string | Required: optional
416 An ISO 3166-1 alpha-2 country code.
417 If a country code is specified, only episodes that are available in that market will be returned.
418 If a valid user access token is specified in the request header, the country associated with
419 the user account will take priority over this parameter.
420 Note: If neither market or user country are provided, the content is considered unavailable for the client.
421 Users can view the country that is associated with their account in the account settings.
422  
423 =item offset
424  
425 Type: integer | Required: optional
426 The index of the first object to return. Default: 0 (i.e., the first object). Use with limit to get the next set of objects.
427  
428 =back
429  
430 and Response Objects being:
431  
432 - episode object
433  
434  
435 On success, the HTTP status code in the response header is 200 OK and the response body contains an array of saved episode 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
436  
437 =cut
438  
439 0 ▶async sub get_users_saved_episodes {
Subroutine get_users_saved_episodes: not called CC=1 SCAR=6.9
Pod documented
440 0 my ($self, %args) = @_;
441  
442 0 my $request->{method} = 'GET';
443 0 $request->{uri} = 'https://api.spotify.com/v1/me/episodes';
444 $request->{param} = {
445 0 header => {
446 'Authorization' => {
447 type => 'string',
448 required => 'required',
449 },
450 },
451 query_parameter => {
452 'limit' => {
453 type => 'integer',
454 required => 'optional',
455 },
456 'market' => {
457 type => 'string',
458 required => 'optional',
459 },
460 'offset' => {
461 type => 'integer',
462 required => 'optional',
463 },
464 },
465 };
466 0 my $response_objs = [
467 'episode object',
468  
469 ];
470  
471 0 await $self->call_api($request, $response_objs, %args);
472 2 }
473  
474 =head2 get_users_saved_shows
475  
476 get_users_saved_shows - Get User's Saved Shows
477  
478 Get a list of shows saved in the current Spotify user’s library. Optional parameters can be used to limit the number of shows returned.
479  
480 with Request details being:
481  
482 =head3 header
483  
484 =over 4
485  
486 =item Authorization
487  
488 Type: string | Required: required
489 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been isued on behalf of the user. The user-library-read scope must have been authorised by the user.
490  
491 =back
492  
493 =head3 query_parameter
494  
495 =over 4
496  
497 =item limit
498  
499 Type: integer | Required: optional
500 The maximum number of shows to return. Default: 20. Minimum: 1. Maximum: 50
501  
502 =item offset
503  
504 Type: integer | Required: optional
505 The index of the first show to return. Default: 0 (the first object). Use with limit to get the next set of shows.
506  
507 =back
508  
509 and Response Objects being:
510  
511 - show object
512  
513  
514 On success, the HTTP status code in the response header is 200 OK and the response body contains an array of saved show objects (wrapped in a paging object) in JSON format.
515 If the current user has no shows saved, the response will be an empty array. If a show is unavailable in the given market it is filtered out. The total field in the paging object represents the number of all items, filtered or not, and thus might be larger than the actual total number of observable items.
516 On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
517  
518 =cut
519  
520 0 ▶async sub get_users_saved_shows {
Subroutine get_users_saved_shows: not called CC=1 SCAR=6.9
Pod documented
521 0 my ($self, %args) = @_;
522  
523 0 my $request->{method} = 'GET';
524 0 $request->{uri} = 'https://api.spotify.com/v1/me/shows';
525 $request->{param} = {
526 0 header => {
527 'Authorization' => {
528 type => 'string',
529 required => 'required',
530 },
531 },
532 query_parameter => {
533 'limit' => {
534 type => 'integer',
535 required => 'optional',
536 },
537 'offset' => {
538 type => 'integer',
539 required => 'optional',
540 },
541 },
542 };
543 0 my $response_objs = [
544 'show object',
545  
546 ];
547  
548 0 await $self->call_api($request, $response_objs, %args);
549 2 }
550  
551 =head2 get_users_saved_tracks
552  
553 get_users_saved_tracks - Get User's Saved Tracks
554  
555 Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library.
556  
557 with Request details being:
558  
559 =head3 header
560  
561 =over 4
562  
563 =item Authorization
564  
565 Type: string | Required: required
566 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The user-library-read scope must have been authorized by the user.
567  
568 =back
569  
570 =head3 query_parameter
571  
572 =over 4
573  
574 =item limit
575  
576 Type: integer | Required: optional
577 The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
578  
579 =item market
580  
581 Type: string | Required: optional
582 An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking.
583  
584 =item offset
585  
586 Type: integer | Required: optional
587 The index of the first object to return. Default: 0 (i.e., the first object). Use with limit to get the next set of objects.
588  
589 =back
590  
591 and Response Objects being:
592  
593 - track object
594  
595  
596 On success, the HTTP status code in the response header is 200 OK and the response body contains an array of saved track 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
597  
598 =cut
599  
600 0 ▶async sub get_users_saved_tracks {
Subroutine get_users_saved_tracks: not called CC=1 SCAR=6.9
Pod documented
601 0 my ($self, %args) = @_;
602  
603 0 my $request->{method} = 'GET';
604 0 $request->{uri} = 'https://api.spotify.com/v1/me/tracks';
605 $request->{param} = {
606 0 header => {
607 'Authorization' => {
608 type => 'string',
609 required => 'required',
610 },
611 },
612 query_parameter => {
613 'limit' => {
614 type => 'integer',
615 required => 'optional',
616 },
617 'market' => {
618 type => 'string',
619 required => 'optional',
620 },
621 'offset' => {
622 type => 'integer',
623 required => 'optional',
624 },
625 },
626 };
627 0 my $response_objs = [
628 'track object',
629  
630 ];
631  
632 0 await $self->call_api($request, $response_objs, %args);
633 2 }
634  
635 =head2 remove_albums_user
636  
637 remove_albums_user - Remove Albums for Current User
638  
639 Remove one or more albums from the current user’s ‘Your Music’ library.
640  
641 with Request details being:
642  
643 =head3 header
644  
645 =over 4
646  
647 =item Authorization
648  
649 Type: string | Required: required
650 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.Modification of the current user’s “Your Music” collection requires authorization of the user-library-modify scope.
651  
652 =item Content-Type
653  
654 Type: string | Required: optional
655 Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json
656  
657 =back
658  
659 =head3 json_body_parameter
660  
661 =over 4
662  
663 =item ids
664  
665 Type: array[string] | Required: optional
666 A JSON array of the Spotify IDs. For example: ["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]A maximum of 50 items can be specified in one request. Note: if the ids parameter is present in the query string, any IDs listed here in the body will be ignored.
667  
668 =back
669  
670 =head3 query_parameter
671  
672 =over 4
673  
674 =item ids
675  
676 Type: string | Required: required
677 A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
678  
679 =back
680  
681 and Response Objects being:
682  
683 - error object
684  
685  
686 On success, the HTTP status code in the response header is 200 Success. On error, the header status code is an error code and the response body contains an error object. Trying to remove an album when you do not have the user’s authorization returns error 403 Forbidden.Try in our Web Console
687  
688 =cut
689  
690 0 ▶async sub remove_albums_user {
Subroutine remove_albums_user: not called CC=1 SCAR=6.9
Pod documented
691 0 my ($self, %args) = @_;
692  
693 0 my $request->{method} = 'DELETE';
694 0 $request->{uri} = 'https://api.spotify.com/v1/me/albums';
695 $request->{param} = {
696 0 header => {
697 'Authorization' => {
698 type => 'string',
699 required => 'required',
700 },
701 'Content-Type' => {
702 type => 'string',
703 required => 'optional',
704 },
705 },
706 json_body_parameter => {
707 'ids' => {
708 type => 'array[string]',
709 required => 'optional',
710 },
711 },
712 query_parameter => {
713 'ids' => {
714 type => 'string',
715 required => 'required',
716 },
717 },
718 };
719 0 my $response_objs = [
720 'error object',
721  
722 ];
723  
724 0 await $self->call_api($request, $response_objs, %args);
725 2 }
726  
727 =head2 remove_episodes_user
728  
729 remove_episodes_user - Remove User's Saved Episodes
730  
731 Remove one or more episodes from the current user’s library.
732 This API endpoint is in beta and could change without warning. Please share any feedback that you have, or issues that you discover, in our developer community forum.
733  
734 with Request details being:
735  
736 =head3 header
737  
738 =over 4
739  
740 =item Authorization
741  
742 Type: string | Required: required
743 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.Modification of the current user’s collection requires authorization of the user-library-modify scope.
744  
745 =item Content-Type
746  
747 Type: string | Required: optional
748 Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json
749  
750 =back
751  
752 =head3 json_body_parameter
753  
754 =over 4
755  
756 =item ids
757  
758 Type: array[string] | Required: optional
759 A JSON array of the Spotify IDs. A maximum of 50 items can be specified in one request. Note: if the ids parameter is present in the query string, any IDs listed here in the body will be ignored.
760  
761 =back
762  
763 =head3 query_parameter
764  
765 =over 4
766  
767 =item ids
768  
769 Type: string | Required: required
770 A comma-separated list of the Spotify IDs. Maximum: 50 IDs.
771  
772 =back
773  
774 and Response Objects being:
775  
776 - error object
777  
778  
779 On success, the HTTP status code in the response header is 200 Success. On error, the header status code is an error code and the response body contains an error object. Trying to remove an episode when you do not have the user’s authorization returns error 403 Forbidden.Try in our Web Console
780  
781 =cut
782  
783 0 ▶async sub remove_episodes_user {
Subroutine remove_episodes_user: not called CC=1 SCAR=6.9
Pod documented
784 0 my ($self, %args) = @_;
785  
786 0 my $request->{method} = 'DELETE';
787 0 $request->{uri} = 'https://api.spotify.com/v1/me/episodes';
788 $request->{param} = {
789 0 header => {
790 'Authorization' => {
791 type => 'string',
792 required => 'required',
793 },
794 'Content-Type' => {
795 type => 'string',
796 required => 'optional',
797 },
798 },
799 json_body_parameter => {
800 'ids' => {
801 type => 'array[string]',
802 required => 'optional',
803 },
804 },
805 query_parameter => {
806 'ids' => {
807 type => 'string',
808 required => 'required',
809 },
810 },
811 };
812 0 my $response_objs = [
813 'error object',
814  
815 ];
816  
817 0 await $self->call_api($request, $response_objs, %args);
818 2 }
819  
820 =head2 remove_shows_user
821  
822 remove_shows_user - Remove User's Saved Shows
823  
824 Delete one or more shows from current Spotify user’s library.
825  
826 with Request details being:
827  
828 =head3 header
829  
830 =over 4
831  
832 =item Authorization
833  
834 Type: string | Required: required
835 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. The user-library-modify scope must have been authorized by the user.
836  
837 =back
838  
839 =head3 query_parameter
840  
841 =over 4
842  
843 =item ids
844  
845 Type: string | Required: required
846 A comma-separated list of Spotify IDs for the shows to be deleted from the user’s library.
847  
848 =item market
849  
850 Type: string | Required: optional
851 An ISO 3166-1 alpha-2 country code.
852 If a country code is specified, only shows that are available in that market will be removed.
853 If a valid user access token is specified in the request header, the country associated with
854 the user account will take priority over this parameter.
855 Note: If neither market or user country are provided, the content is considered unavailable for the client.
856 Users can view the country that is associated with their account in the account settings.
857  
858 =back
859  
860 and Response Objects being:
861  
862 - error object
863  
864  
865 On success, the HTTP status code in the response header is 200 OK.
866 On error, the header status code is an error code and the response body contains an error object. A 403 Forbidden while trying to add a show when you do not have the user’s authorisation.Try in our Web Console
867  
868 =cut
869  
870 0 ▶async sub remove_shows_user {
Subroutine remove_shows_user: not called CC=1 SCAR=6.9
Pod documented
871 0 my ($self, %args) = @_;
872  
873 0 my $request->{method} = 'DELETE';
874 0 $request->{uri} = 'https://api.spotify.com/v1/me/shows';
875 $request->{param} = {
876 0 header => {
877 'Authorization' => {
878 type => 'string',
879 required => 'required',
880 },
881 },
882 query_parameter => {
883 'ids' => {
884 type => 'string',
885 required => 'required',
886 },
887 'market' => {
888 type => 'string',
889 required => 'optional',
890 },
891 },
892 };
893 0 my $response_objs = [
894 'error object',
895  
896 ];
897  
898 0 await $self->call_api($request, $response_objs, %args);
899 2 }
900  
901 =head2 remove_tracks_user
902  
903 remove_tracks_user - Remove User's Saved Tracks
904  
905 Remove one or more tracks from the current user’s ‘Your Music’ library.
906  
907 with Request details being:
908  
909 =head3 header
910  
911 =over 4
912  
913 =item Authorization
914  
915 Type: string | Required: required
916 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.Modification of the current user’s “Your Music” collection requires authorization of the user-library-modify scope.
917  
918 =item Content-Type
919  
920 Type: string | Required: optional
921 Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json
922  
923 =back
924  
925 =head3 json_body_parameter
926  
927 =over 4
928  
929 =item ids
930  
931 Type: array[string] | Required: optional
932 A JSON array of the Spotify IDs. For example: ["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]A maximum of 50 items can be specified in one request. Note: if the ids parameter is present in the query string, any IDs listed here in the body will be ignored.
933  
934 =back
935  
936 =head3 query_parameter
937  
938 =over 4
939  
940 =item ids
941  
942 Type: string | Required: required
943 A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
944  
945 =back
946  
947 and Response Objects being:
948  
949 - error object
950  
951  
952 On success, the HTTP status code in the response header is 200 Success. On error, the header status code is an error code and the response body contains an error object. Trying to remove an album when you do not have the user’s authorization returns error 403 Forbidden.Try in our Web Console
953  
954 =cut
955  
956 0 ▶async sub remove_tracks_user {
Subroutine remove_tracks_user: not called CC=1 SCAR=6.9
Pod documented
957 0 my ($self, %args) = @_;
958  
959 0 my $request->{method} = 'DELETE';
960 0 $request->{uri} = 'https://api.spotify.com/v1/me/tracks';
961 $request->{param} = {
962 0 header => {
963 'Authorization' => {
964 type => 'string',
965 required => 'required',
966 },
967 'Content-Type' => {
968 type => 'string',
969 required => 'optional',
970 },
971 },
972 json_body_parameter => {
973 'ids' => {
974 type => 'array[string]',
975 required => 'optional',
976 },
977 },
978 query_parameter => {
979 'ids' => {
980 type => 'string',
981 required => 'required',
982 },
983 },
984 };
985 0 my $response_objs = [
986 'error object',
987  
988 ];
989  
990 0 await $self->call_api($request, $response_objs, %args);
991 2 }
992  
993 =head2 save_albums_user
994  
995 save_albums_user - Save Albums for Current User
996  
997 Save one or more albums to the current user’s ‘Your Music’ library.
998  
999 with Request details being:
1000  
1001 =head3 header
1002  
1003 =over 4
1004  
1005 =item Authorization
1006  
1007 Type: string | Required: required
1008 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.Modification of the current user’s “Your Music” collection requires authorization of the user-library-modify scope.
1009  
1010 =item Content-Type
1011  
1012 Type: string | Required: optional
1013 Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json
1014  
1015 =back
1016  
1017 =head3 json_body_parameter
1018  
1019 =over 4
1020  
1021 =item ids
1022  
1023 Type: array[string] | Required: optional
1024 A JSON array of the Spotify IDs. For example: ["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]A maximum of 50 items can be specified in one request. Note: if the ids parameter is present in the query string, any IDs listed here in the body will be ignored.
1025  
1026 =back
1027  
1028 =head3 query_parameter
1029  
1030 =over 4
1031  
1032 =item ids
1033  
1034 Type: string | Required: required
1035 A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
1036  
1037 =back
1038  
1039 and Response Objects being:
1040  
1041 - error object
1042  
1043  
1044 On success, the HTTP status code in the response header is 201 Created. On error, the header status code is an error code and the response body contains an error object. Trying to add an album when you do not have the user’s authorization returns error 403 Forbidden.Try in our Web Console
1045  
1046 =cut
1047  
1048 0 ▶async sub save_albums_user {
Subroutine save_albums_user: not called CC=1 SCAR=6.9
Pod documented
1049 0 my ($self, %args) = @_;
1050  
1051 0 my $request->{method} = 'PUT';
1052 0 $request->{uri} = 'https://api.spotify.com/v1/me/albums';
1053 $request->{param} = {
1054 0 header => {
1055 'Authorization' => {
1056 type => 'string',
1057 required => 'required',
1058 },
1059 'Content-Type' => {
1060 type => 'string',
1061 required => 'optional',
1062 },
1063 },
1064 json_body_parameter => {
1065 'ids' => {
1066 type => 'array[string]',
1067 required => 'optional',
1068 },
1069 },
1070 query_parameter => {
1071 'ids' => {
1072 type => 'string',
1073 required => 'required',
1074 },
1075 },
1076 };
1077 0 my $response_objs = [
1078 'error object',
1079  
1080 ];
1081  
1082 0 await $self->call_api($request, $response_objs, %args);
1083 2 }
1084  
1085 =head2 save_episodes_user
1086  
1087 save_episodes_user - Save Episodes for User
1088  
1089 Save one or more episodes to the current user’s library.
1090 This API endpoint is in beta and could change without warning. Please share any feedback that you have, or issues that you discover, in our developer community forum.
1091  
1092 with Request details being:
1093  
1094 =head3 header
1095  
1096 =over 4
1097  
1098 =item Authorization
1099  
1100 Type: string | Required: required
1101 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.Modification of the current user’s “Your Music” collection requires authorization of the user-library-modify scope.
1102  
1103 =item Content-Type
1104  
1105 Type: string | Required: optional
1106 Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json
1107  
1108 =back
1109  
1110 =head3 json_body_parameter
1111  
1112 =over 4
1113  
1114 =item ids
1115  
1116 Type: array[string] | Required: optional
1117 A JSON array of the Spotify IDs. A maximum of 50 items can be specified in one request. Note: if the ids parameter is present in the query string, any IDs listed here in the body will be ignored.
1118  
1119 =back
1120  
1121 =head3 query_parameter
1122  
1123 =over 4
1124  
1125 =item ids
1126  
1127 Type: string | Required: required
1128 A comma-separated list of the Spotify IDs. Maximum: 50 IDs.
1129  
1130 =back
1131  
1132 and Response Objects being:
1133  
1134 - error object
1135  
1136  
1137 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 add an episode when you do not have the user’s authorization, returns error 403 Forbidden.Try in our Web Console
1138  
1139 =cut
1140  
1141 0 ▶async sub save_episodes_user {
Subroutine save_episodes_user: not called CC=1 SCAR=6.9
Pod documented
1142 0 my ($self, %args) = @_;
1143  
1144 0 my $request->{method} = 'PUT';
1145 0 $request->{uri} = 'https://api.spotify.com/v1/me/episodes';
1146 $request->{param} = {
1147 0 header => {
1148 'Authorization' => {
1149 type => 'string',
1150 required => 'required',
1151 },
1152 'Content-Type' => {
1153 type => 'string',
1154 required => 'optional',
1155 },
1156 },
1157 json_body_parameter => {
1158 'ids' => {
1159 type => 'array[string]',
1160 required => 'optional',
1161 },
1162 },
1163 query_parameter => {
1164 'ids' => {
1165 type => 'string',
1166 required => 'required',
1167 },
1168 },
1169 };
1170 0 my $response_objs = [
1171 'error object',
1172  
1173 ];
1174  
1175 0 await $self->call_api($request, $response_objs, %args);
1176 2 }
1177  
1178 =head2 save_shows_user
1179  
1180 save_shows_user - Save Shows for Current User
1181  
1182 Save one or more shows to current Spotify user’s library.
1183  
1184 with Request details being:
1185  
1186 =head3 header
1187  
1188 =over 4
1189  
1190 =item Authorization
1191  
1192 Type: string | Required: required
1193 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. The user-library-modify scope must have been authorized by the user.
1194  
1195 =back
1196  
1197 =head3 query_parameter
1198  
1199 =over 4
1200  
1201 =item ids
1202  
1203 Type: string | Required: required
1204 A comma-separated list of the Spotify IDs. Maximum: 50 IDs.
1205  
1206 =back
1207  
1208 and Response Objects being:
1209  
1210 - error object
1211  
1212  
1213 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. A 403 Forbidden while trying to add a show when you do not have the user’s authorisation or when the user already has have over 10,000 items saved in library.Try in our Web Console
1214  
1215 =cut
1216  
1217 0 ▶async sub save_shows_user {
Subroutine save_shows_user: not called CC=1 SCAR=6.9
Pod documented
1218 0 my ($self, %args) = @_;
1219  
1220 0 my $request->{method} = 'PUT';
1221 0 $request->{uri} = 'https://api.spotify.com/v1/me/shows';
1222 $request->{param} = {
1223 0 header => {
1224 'Authorization' => {
1225 type => 'string',
1226 required => 'required',
1227 },
1228 },
1229 query_parameter => {
1230 'ids' => {
1231 type => 'string',
1232 required => 'required',
1233 },
1234 },
1235 };
1236 0 my $response_objs = [
1237 'error object',
1238  
1239 ];
1240  
1241 0 await $self->call_api($request, $response_objs, %args);
1242 2 }
1243  
1244 =head2 save_tracks_user
1245  
1246 save_tracks_user - Save Tracks for User
1247  
1248 Save one or more tracks to the current user’s ‘Your Music’ library.
1249  
1250 with Request details being:
1251  
1252 =head3 header
1253  
1254 =over 4
1255  
1256 =item Authorization
1257  
1258 Type: string | Required: required
1259 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.Modification of the current user’s “Your Music” collection requires authorization of the user-library-modify scope.
1260  
1261 =item Content-Type
1262  
1263 Type: string | Required: optional
1264 Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json
1265  
1266 =back
1267  
1268 =head3 json_body_parameter
1269  
1270 =over 4
1271  
1272 =item ids
1273  
1274 Type: array[string] | Required: optional
1275 A JSON array of the Spotify IDs. For example: ["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]A maximum of 50 items can be specified in one request. Note: if the ids parameter is present in the query string, any IDs listed here in the body will be ignored.
1276  
1277 =back
1278  
1279 =head3 query_parameter
1280  
1281 =over 4
1282  
1283 =item ids
1284  
1285 Type: string | Required: required
1286 A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.
1287  
1288 =back
1289  
1290 and Response Objects being:
1291  
1292 - error object
1293  
1294  
1295 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 add a track when you do not have the user’s authorization, or when you have over 10.000 tracks in Your Music, returns error 403 Forbidden.Try in our Web Console
1296  
1297 =cut
1298  
1299 0 ▶async sub save_tracks_user {
Subroutine save_tracks_user: not called CC=1 SCAR=6.9
Pod documented
1300 0 my ($self, %args) = @_;
1301  
1302 0 my $request->{method} = 'PUT';
1303 0 $request->{uri} = 'https://api.spotify.com/v1/me/tracks';
1304 $request->{param} = {
1305 0 header => {
1306 'Authorization' => {
1307 type => 'string',
1308 required => 'required',
1309 },
1310 'Content-Type' => {
1311 type => 'string',
1312 required => 'optional',
1313 },
1314 },
1315 json_body_parameter => {
1316 'ids' => {
1317 type => 'array[string]',
1318 required => 'optional',
1319 },
1320 },
1321 query_parameter => {
1322 'ids' => {
1323 type => 'string',
1324 required => 'required',
1325 },
1326 },
1327 };
1328 0 my $response_objs = [
1329 'error object',
1330  
1331 ];
1332  
1333 0 await $self->call_api($request, $response_objs, %args);
1334 2 }
1335  
1336 2 1;
« script/spotify-cli.pl ↑ Summary lib/Net/Async/Spotify/API/Generated/Player.pm »