Playlists can have both tracks and albums as items.
/api/playlists/addTrack
Adds a track to a playlist.
Param | Type | Required | Description | |
---|---|---|---|---|
playlist_id | Int | yes | the playlist to add the track(s) to | |
track_id | Int | String | yes | The track id, or comma separated ids of the tracks to add |
Returns the resulting ClientPlaylist.
NOTE: If more than one track id is sent, this may result in a halfway completed action if one or more of the ids is invalid, so you’ll get back an error
parameter in your response as well as the final playlist
.
/api/playlists/removeTrack
Removes a track from a playlist.
Param | Type | Required | Description |
---|---|---|---|
playlist_id | Int | yes | the playlist to remove the track from |
track_id | Int | yes | The track id to remove |
Returns the resulting ClientPlaylist.
/api/playlists/addAlbum
Adds an album to a playlist.
Param | Type | Required | Description | |
---|---|---|---|---|
playlist_id | Int | yes | the playlist to add the album(s) to | |
album_id | Int | String | yes | The album id, or comma separated ids of the albums to add |
Returns the resulting ClientPlaylist.
NOTE: If more than one album id is sent, this may result in a halfway completed action if one or more of the ids is invalid, so you’ll get back an error
parameter in your response as well as the final playlist
.
/api/playlists/removeAlbum
Removes an album from a playlist.
Param | Type | Required | Description |
---|---|---|---|
playlist_id | Int | yes | the playlist to remove the album from |
album_id | Int | yes | The album id to remove |
Returns the resulting ClientPlaylist.