ClientPlaylistApi

class ClientPlaylistApi(api: GenericSpotifyApi) : PlaylistApi

Endpoints for retrieving information about a user’s playlists and for managing a user’s playlists.

Api Reference

Constructors

ClientPlaylistApi
Link copied to clipboard
common
fun ClientPlaylistApi(api: GenericSpotifyApi)

Functions

addPlayablesToClientPlaylist
Link copied to clipboard
common
suspend fun addPlayablesToClientPlaylist(playlist: String, vararg playables: PlayableUri, position: Int? = null)
Add a Playable to a user’s playlist.
addPlayablesToClientPlaylistRestAction
Link copied to clipboard
common
fun addPlayablesToClientPlaylistRestAction(playlist: String, vararg playables: PlayableUri, position: Int? = null): SpotifyRestAction<Unit>
Add a Playable to a user’s playlist.
addPlayableToClientPlaylist
Link copied to clipboard
common
suspend fun addPlayableToClientPlaylist(playlist: String, playable: PlayableUri, position: Int? = null)
Add a Playable to a user’s playlist.
addPlayableToClientPlaylistRestAction
Link copied to clipboard
common
fun addPlayableToClientPlaylistRestAction(playlist: String, playable: PlayableUri, position: Int? = null): SpotifyRestAction<Unit>
Add a Playable to a user’s playlist.
changeClientPlaylistDetails
Link copied to clipboard
common
suspend fun changeClientPlaylistDetails(playlist: String, name: String? = null, public: Boolean? = null, collaborative: Boolean? = null, description: String? = null)
Change a playlist’s name and public/private state.
changeClientPlaylistDetailsRestAction
Link copied to clipboard
common
fun changeClientPlaylistDetailsRestAction(playlist: String, name: String? = null, public: Boolean? = null, collaborative: Boolean? = null, description: String? = null): SpotifyRestAction<Unit>
Change a playlist’s name and public/private state.
createClientPlaylist
Link copied to clipboard
common
suspend fun createClientPlaylist(name: String, description: String? = null, public: Boolean? = null, collaborative: Boolean? = null, user: String? = null): Playlist
Create a playlist for a Spotify user.
createClientPlaylistRestAction
Link copied to clipboard
common
fun createClientPlaylistRestAction(name: String, description: String? = null, public: Boolean? = null, collaborative: Boolean? = null, user: String? = null): SpotifyRestAction<Playlist>
Create a playlist for a Spotify user.
deleteClientPlaylist
Link copied to clipboard
common
suspend fun deleteClientPlaylist(playlist: String): String
This method is equivalent to unfollowing a playlist with the given playlist.
deleteClientPlaylistRestAction
Link copied to clipboard
common
fun deleteClientPlaylistRestAction(playlist: String): SpotifyRestAction<String>
This method is equivalent to unfollowing a playlist with the given playlist.
getClientPlaylist
Link copied to clipboard
common
suspend fun getClientPlaylist(id: String): SimplePlaylist?
Find a client playlist by its id.
getClientPlaylistRestAction
Link copied to clipboard
common
Find a client playlist by its id.
getClientPlaylists
Link copied to clipboard
common
suspend fun getClientPlaylists(limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null): PagingObject<SimplePlaylist>
Get a list of the playlists owned or followed by a Spotify user.
getClientPlaylistsRestAction
Link copied to clipboard
common
fun getClientPlaylistsRestAction(limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null): SpotifyRestAction<PagingObject<SimplePlaylist>>
Get a list of the playlists owned or followed by a Spotify user.
getPlaylist
Link copied to clipboard
common
suspend fun getPlaylist(playlist: String, market: Market? = null): Playlist?
Get a playlist owned by a Spotify user.
getPlaylistCovers
Link copied to clipboard
common
suspend fun getPlaylistCovers(playlist: String): List<SpotifyImage>
Get the current image(s) associated with a specific playlist.
getPlaylistCoversRestAction
Link copied to clipboard
common
fun getPlaylistCoversRestAction(playlist: String): SpotifyRestAction<List<SpotifyImage>>
Get the current image(s) associated with a specific playlist.
getPlaylistRestAction
Link copied to clipboard
common
fun getPlaylistRestAction(playlist: String, market: Market? = null): SpotifyRestAction<Playlist?>
Get a playlist owned by a Spotify user.
getPlaylistTracks
Link copied to clipboard
common
suspend fun getPlaylistTracks(playlist: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<PlaylistTrack>
Get full details of the tracks of a playlist owned by a Spotify user.
getPlaylistTracksRestAction
Link copied to clipboard
common
fun getPlaylistTracksRestAction(playlist: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): SpotifyRestAction<PagingObject<PlaylistTrack>>
Get full details of the tracks of a playlist owned by a Spotify user.
getUserPlaylists
Link copied to clipboard
common
suspend fun getUserPlaylists(user: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null): PagingObject<SimplePlaylist>
Get a list of the playlists owned or followed by a Spotify user.
getUserPlaylistsRestAction
Link copied to clipboard
common
fun getUserPlaylistsRestAction(user: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null): SpotifyRestAction<PagingObject<SimplePlaylist>>
Get a list of the playlists owned or followed by a Spotify user.
removeAllClientPlaylistPlayables
Link copied to clipboard
common
suspend fun removeAllClientPlaylistPlayables(playlist: String)
Remove all the playables in a playlistApi Reference
common
fun removeAllClientPlaylistPlayablesRestAction(playlist: String): SpotifyRestAction<Unit>
Remove all the playables in a playlistApi Reference
removePlayableFromClientPlaylist
Link copied to clipboard
common
suspend fun removePlayableFromClientPlaylist(playlist: String, playable: PlayableUri, snapshotId: String? = null): PlaylistSnapshot
Remove all occurrences of a playable from the specified playlist.
suspend fun removePlayableFromClientPlaylist(playlist: String, playable: PlayableUri, positions: SpotifyPlayablePositions, snapshotId: String? = null): PlaylistSnapshot
Remove a playable in the specified positions (zero-based) from the specified playlist.
common
fun removePlayableFromClientPlaylistRestAction(playlist: String, playable: PlayableUri, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Remove all occurrences of a playable from the specified playlist.
fun removePlayableFromClientPlaylistRestAction(playlist: String, playable: PlayableUri, positions: SpotifyPlayablePositions, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Remove a playable in the specified positions (zero-based) from the specified playlist.
removePlayablesFromClientPlaylist
Link copied to clipboard
common
suspend fun removePlayablesFromClientPlaylist(playlist: String, vararg playables: PlayableUri, snapshotId: String? = null): PlaylistSnapshot
Remove all occurrences of the specified playables from the given playlist.
suspend fun removePlayablesFromClientPlaylist(playlist: String, vararg playables: Pair<PlayableUri, SpotifyPlayablePositions>, snapshotId: String? = null): PlaylistSnapshot
Remove playables (each with their own positions) from the given playlist.
common
fun removePlayablesFromClientPlaylistRestAction(playlist: String, vararg playables: PlayableUri, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Remove all occurrences of the specified playables from the given playlist.
fun removePlayablesFromClientPlaylistRestAction(playlist: String, vararg playables: Pair<PlayableUri, SpotifyPlayablePositions>, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Remove playables (each with their own positions) from the given playlist.
reorderClientPlaylistPlayables
Link copied to clipboard
common
suspend fun reorderClientPlaylistPlayables(playlist: String, reorderRangeStart: Int, reorderRangeLength: Int? = null, insertionPoint: Int, snapshotId: String? = null): PlaylistSnapshot
Reorder a playable or a group of playables in a playlist.
common
fun reorderClientPlaylistPlayablesRestAction(playlist: String, reorderRangeStart: Int, reorderRangeLength: Int? = null, insertionPoint: Int, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Reorder a playable or a group of playables in a playlist.
replaceClientPlaylistPlayables
Link copied to clipboard
common
suspend fun replaceClientPlaylistPlayables(playlist: String, vararg playables: PlayableUri)
Replace all the playables in a playlist, overwriting its existing playables.
common
fun replaceClientPlaylistPlayablesRestAction(playlist: String, vararg playables: PlayableUri): SpotifyRestAction<Unit>
Replace all the playables in a playlist, overwriting its existing playables.
setClientPlaylistPlayables
Link copied to clipboard
common
suspend fun setClientPlaylistPlayables(playlist: String, vararg playables: PlayableUri)
Replace all the playables in a playlist, overwriting its existing playables.
setClientPlaylistPlayablesRestAction
Link copied to clipboard
common
fun setClientPlaylistPlayablesRestAction(playlist: String, vararg playables: PlayableUri): SpotifyRestAction<Unit>
Replace all the playables in a playlist, overwriting its existing playables.
uploadClientPlaylistCover
Link copied to clipboard
common
suspend fun uploadClientPlaylistCover(playlist: String, imagePath: String? = null, imageFile: VfsFile? = null, image: BufferedImage? = null, imageData: String? = null, imageUrl: String? = null)
Replace the image used to represent a specific playlist.
uploadClientPlaylistCoverRestAction
Link copied to clipboard
common
fun uploadClientPlaylistCoverRestAction(playlist: String, imagePath: String? = null, imageFile: VfsFile? = null, image: BufferedImage? = null, imageData: String? = null, imageUrl: String? = null): SpotifyRestAction<Unit>
Replace the image used to represent a specific playlist.

Properties

api
Link copied to clipboard
common
val api: GenericSpotifyApi
cache
Link copied to clipboard
common
val cache: SpotifyCache

Sources

common source
Link copied to clipboard