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 id
string The Spotify ID of the playlist.
options
PlaylistOptions 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 id
string The Spotify ID of the playlist.
options
ModifyOptions 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 id
Array.<string> The Spotify ID of the playlist.
options
UpdatePlaylistOptions 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 id
string The Spotify ID of the playlist.
options
PlaylistTracksOptions 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 id
string The Spotify ID of the playlist.
uris
ContextURI | Array.<ContextURI> A list of Spotify URIs to add, can be track or episode URIs. Maximum: 100
position
number <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 id
string The Spotify ID of the playlist.
uris
ContextURI | Array.<ContextURI> A list of Spotify URIs to remove, can be track or episode URIs. Maximum: 100
snapshot
string <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 id
string <optional> The user's Spotify user ID - if not provided it will default to the current user.
options
LimitOptions 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 id
string The Spotify ID of the playlist.
state
boolean <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 id
string 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 id
string The Spotify ID of the playlist.
users
string | 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 id
string The user's Spotify user ID.
options
ModifyOptions Returns
Details
-
featured( [ options ] ) → {Promise.<(Array.<Playlist>|HTTPError|ApiError)>}
-
Description
Get a list of Spotify featured playlists.
Parameters
Name Type Attributes Description options
FeaturedOptions <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 id
string The Spotify category ID for the category.
options
LimitOptions 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 id
string The Spotify ID of the playlist.
image
string <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 query
string Your search query.
options
SearchOptions Returns
Details