Playlist Objects
Wrap around this Spotify API object model.
Notes
Playlist objects should only be created with Spotify.Playlists.GetPlaylist()
/Spotify.Playlists.CreatePlaylist()
unless they are returned by, or included in other objects.
Playlist objects have the SpotifyAPIBaseClass base class, which provides many properties as pseudo properties.
This will have little/no impact on functionality, but it is still recommended you read the SpotifyAPIBaseClass page to understand how this could impact your code.
Properties
Key | Value description |
---|---|
owner | A User Object representing the owner of the playlist |
public | If the playlist is public or not (true/false) |
tracks | An array of Track Objects that are in the playlist |
Pseudo Properties
Key | Value description |
---|---|
collaborative | Returns true if context is not search and the owner allows other users to modify the playlist. Otherwise returns false. |
description | The playlist description. Only returned for modified, verified playlists, otherwise null. |
external_urls | Known external URLs for this playlist. |
followers | Information about the followers of the playlist. |
href | A link to the Web API endpoint providing full details of the playlist. |
id | The Spotify ID for the playlist. |
images | Array of images for the playlist. The array may be empty or contain up to three images. Note: If returned, the source URL for the image (url) is temporary and will expire in less than a day. |
name | The name of the playlist. |
snapshot_id | The version identifier for the current playlist. Can be supplied in other requests to target a specific playlist version. |
type | The object type: "playlist". |
uri | The Spotify URI for the playlist. |
Methods
All methods for playlist objects call into the Spotify.Playlists
class, which provides raw ID based functions for manipulating playlists.
Definition | Description |
---|---|
AddTrack(TrackObject) |
Takes a Track Object and adds it to the playlist |
RemoveTrack(TrackObject) |
Takes a Track Object and removes it from the playlist |
Play() |
Plays the playlist on the currently active device |
Delete() |
Deletes the playlist |