Members
-
spotify :Spotify
-
Description
The spotify client.
Details
Methods
-
get( id, options ) → {Promise.<(Playlist|HTTPError|ApiError)>}
-
Description
Get a playlist owned by a Spotify user.
Parameters
Name Type Description idstring The Spotify ID of the playlist.
optionsPlaylistOptions Returns
Details
-
modify( id, options ) → {Promise.<(Status|HTTPError|ApiError)>}
-
Description
Change a playlist's name and public/private state. (The user must, of course, own the playlist.)
Parameters
Name Type Description idstring The Spotify ID of the playlist.
optionsModifyOptions Returns
Details
-
update( id, options ) → {Status|HTTPError|ApiError}
-
Description
Either reorder or replace items in a playlist depending on the request's parameters.
Parameters
Name Type Description idArray.<string> The Spotify ID of the playlist.
optionsUpdatePlaylistOptions Returns
Details
-
tracks( id, options ) → {Promise.<(Array.<Track>|HTTPError|ApiError)>}
-
Description
Get full details of the items of a playlist owned by a Spotify user.
Parameters
Name Type Description idstring The Spotify ID of the playlist.
optionsPlaylistTracksOptions Returns
Details
-
add( id, uris [, position ] ) → {Promise.<(Status|HTTPError|ApiError)>}
-
Description
Add one or more items to a user's playlist.
Parameters
Name Type Attributes Default Description idstring The Spotify ID of the playlist.
urisContextURI | Array.<ContextURI> A list of Spotify URIs to add, can be track or episode URIs. Maximum: 100
positionnumber <optional> 0 The position to insert the items, a zero-based index.
Returns
Details
-
remove( id, uris [, snapshot ] ) → {Promise.<(Status|HTTPError|ApiError)>}
-
Description
Remove one or more items from a user's playlist.
Parameters
Name Type Attributes Description idstring The Spotify ID of the playlist.
urisContextURI | Array.<ContextURI> A list of Spotify URIs to remove, can be track or episode URIs. Maximum: 100
snapshotstring <optional> The playlist's snapshot ID against which you want to make the changes.
Returns
Details
-
users( [ id ], options ) → {Promise.<(Array.<Playlist>|HTTPError|ApiError)>}
-
Description
Get a list of the playlists owned or followed by the current Spotify user.
Parameters
Name Type Attributes Description idstring <optional> The user's Spotify user ID - if not provided it will default to the current user.
optionsLimitOptions Returns
Details
-
follow( id [, state ] ) → {Promise.<(Status|HTTPError|ApiError)>}
-
Description
Add the current user as a follower of a playlist.
Parameters
Name Type Attributes Default Description idstring The Spotify ID of the playlist.
stateboolean <optional> true If the playlist will be included in user's public playlists.
Returns
Details
-
unfollow( id ) → {Promise.<(Status|HTTPError|ApiError)>}
-
Description
Remove the current user as a follower of a playlist.
Parameters
Name Type Description idstring The Spotify ID of the playlist.
Returns
Details
-
followers( id, users ) → {Array.<boolean>|HTTPError|ApiError}
-
Description
Check to see if one or more Spotify users are following a specified playlist.
Parameters
Name Type Description idstring The Spotify ID of the playlist.
usersstring | Array.<string> A list of Spotify User IDs.
Returns
Details
-
create( id, options ) → {Promise.<(Playlist|HTTPError|ApiError)>}
-
Description
Create a playlist for a Spotify user.
Parameters
Name Type Description idstring The user's Spotify user ID.
optionsModifyOptions Returns
Details
-
featured( [ options ] ) → {Promise.<(Array.<Playlist>|HTTPError|ApiError)>}
-
Description
Get a list of Spotify featured playlists.
Parameters
Name Type Attributes Description optionsFeaturedOptions <optional> Returns
Details
-
categories( id, options ) → {Promise.<(Array.<Playlist>|HTTPError|ApiError)>}
-
Description
Get a list of Spotify playlists tagged with a particular category.
Parameters
Name Type Description idstring The Spotify category ID for the category.
optionsLimitOptions Returns
Details
-
cover( id [, image ] ) → {Promise.<(Image|Status|HTTPError|ApiError)>}
-
Description
Get the current image associated with a specific playlist.
Parameters
Name Type Attributes Description idstring The Spotify ID of the playlist.
imagestring <optional> The Base64 image encoded to upload as cover art.
Returns
Details
-
search( query, options ) → {Promise.<(Array.<Playlist>|HTTPError|ApiError)>}
-
Description
Get Spotify catalog information about playlists.
Parameters
Name Type Description querystring Your search query.
optionsSearchOptions Returns
Details