new PlaylistManager( spotify )

Description

Manages spotify playing.

Parameters
Name Type Description
spotify Spotify

The spotify client.

Details

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
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

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

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

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

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

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

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

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

Description

Get a list of Spotify featured playlists.

Parameters
Name Type Attributes Description
options FeaturedOptions <optional>
Returns

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

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

Description

Get Spotify catalog information about playlists.

Parameters
Name Type Description
query string

Your search query.

options SearchOptions
Returns