The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

The following documentation is automatically generated. Please do not edit this file, but rather the original, inline with Net::Async::Spotify::API::Generated::Library at lib/Net/Async/Spotify/API/Generated/Library.pm (on the system that originally ran this). If you do edit this file, and don't want your changes to be removed, make sure you change the first line.

NAME

Net::Async::Spotify::API::Generated::Library - Package representing Spotify Library API

DESCRIPTION

Autogenerated module. Based on https://developer.spotify.com/documentation/web-api/reference/#reference-index Check crawl-api-doc.pl for more information.

METHODS

check_users_saved_albums

check_users_saved_albums - Check User's Saved Albums

Check if one or more albums is already saved in the current Spotify user’s ‘Your Music’ library.

with Request details being:

Authorization

Type: string | Required: required 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs for the albums. Maximum: 50 IDs.

and Response Objects being:

- error object

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. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console

check_users_saved_episodes

check_users_saved_episodes - Check User's Saved Episodes

Check if one or more episodes is already saved in the current Spotify user’s ‘Your Episodes’ library. 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..

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs for the episodes. Maximum: 50 IDs.

and Response Objects being:

- error object

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. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console

check_users_saved_shows

check_users_saved_shows - Check User's Saved Shows

Check if one or more shows is already saved in the current Spotify user’s library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs for the shows. Maximum: 50 ids.

and Response Objects being:

- error object

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

check_users_saved_tracks

check_users_saved_tracks - Check User's Saved Tracks

Check if one or more tracks is already saved in the current Spotify user’s ‘Your Music’ library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs.

and Response Objects being:

- error object

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. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console

get_users_saved_albums

get_users_saved_albums - Get User's Saved Albums

Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

limit

Type: integer | Required: optional The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.

market

Type: string | Required: optional An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking.

offset

Type: integer | Required: optional 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.

and Response Objects being:

- album object - error object

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

get_users_saved_episodes

get_users_saved_episodes - Get User's Saved Episodes

Get a list of the episodes saved in the current Spotify user’s library. 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.

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

limit

Type: integer | Required: optional The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.

market

Type: string | Required: optional An ISO 3166-1 alpha-2 country code. If a country code is specified, only episodes that are available in that market will be returned. If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter. Note: If neither market or user country are provided, the content is considered unavailable for the client. Users can view the country that is associated with their account in the account settings.

offset

Type: integer | Required: optional 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.

and Response Objects being:

- episode object

 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

get_users_saved_shows

get_users_saved_shows - Get User's Saved Shows

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.

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

limit

Type: integer | Required: optional The maximum number of shows to return. Default: 20. Minimum: 1. Maximum: 50

offset

Type: integer | Required: optional The index of the first show to return. Default: 0 (the first object). Use with limit to get the next set of shows.

and Response Objects being:

- show object

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. 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. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console

get_users_saved_tracks

get_users_saved_tracks - Get User's Saved Tracks

Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

limit

Type: integer | Required: optional The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.

market

Type: string | Required: optional An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking.

offset

Type: integer | Required: optional 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.

and Response Objects being:

- track object

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

remove_albums_user

remove_albums_user - Remove Albums for Current User

Remove one or more albums from the current user’s ‘Your Music’ library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

Content-Type

Type: string | Required: optional Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json

json_body_parameter

ids

Type: array[string] | Required: optional 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.

and Response Objects being:

- error object

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

remove_episodes_user

remove_episodes_user - Remove User's Saved Episodes

Remove one or more episodes from the current user’s library. 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.

with Request details being:

header

Authorization

Type: string | Required: required 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.

Content-Type

Type: string | Required: optional Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json

json_body_parameter

ids

Type: array[string] | Required: optional 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs. Maximum: 50 IDs.

and Response Objects being:

- error object

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

remove_shows_user

remove_shows_user - Remove User's Saved Shows

Delete one or more shows from current Spotify user’s library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of Spotify IDs for the shows to be deleted from the user’s library.

market

Type: string | Required: optional An ISO 3166-1 alpha-2 country code. If a country code is specified, only shows that are available in that market will be removed. If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter. Note: If neither market or user country are provided, the content is considered unavailable for the client. Users can view the country that is associated with their account in the account settings.

and Response Objects being:

- error object

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.Try in our Web Console

remove_tracks_user

remove_tracks_user - Remove User's Saved Tracks

Remove one or more tracks from the current user’s ‘Your Music’ library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

Content-Type

Type: string | Required: optional Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json

json_body_parameter

ids

Type: array[string] | Required: optional 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.

and Response Objects being:

- error object

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

save_albums_user

save_albums_user - Save Albums for Current User

Save one or more albums to the current user’s ‘Your Music’ library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

Content-Type

Type: string | Required: optional Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json

json_body_parameter

ids

Type: array[string] | Required: optional 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.

and Response Objects being:

- error object

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

save_episodes_user

save_episodes_user - Save Episodes for User

Save one or more episodes to the current user’s library. 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.

with Request details being:

header

Authorization

Type: string | Required: required 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.

Content-Type

Type: string | Required: optional Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json

json_body_parameter

ids

Type: array[string] | Required: optional 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs. Maximum: 50 IDs.

and Response Objects being:

- error object

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

save_shows_user

save_shows_user - Save Shows for Current User

Save one or more shows to current Spotify user’s library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs. Maximum: 50 IDs.

and Response Objects being:

- error object

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

save_tracks_user

save_tracks_user - Save Tracks for User

Save one or more tracks to the current user’s ‘Your Music’ library.

with Request details being:

header

Authorization

Type: string | Required: required 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.

Content-Type

Type: string | Required: optional Required if the IDs are passed in the request body, otherwise ignored. The content type of the request body: application/json

json_body_parameter

ids

Type: array[string] | Required: optional 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.

query_parameter

ids

Type: string | Required: required A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.

and Response Objects being:

- error object

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

INHERITED METHODS

Net::Async::Spotify::API::Base

call_api, decode_response, new, parse_response, spotify