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

addTracksToClientPlaylist
Link copied to clipboard
common
suspend fun addTracksToClientPlaylist(playlist: String, vararg tracks: String, position: Int? = null)
Add one or more tracks to a user’s playlist.
addTracksToClientPlaylistRestAction
Link copied to clipboard
common
fun addTracksToClientPlaylistRestAction(playlist: String, vararg tracks: String, position: Int? = null): SpotifyRestAction<Unit>
Add one or more tracks to a user’s playlist.
addTrackToClientPlaylist
Link copied to clipboard
common
suspend fun addTrackToClientPlaylist(playlist: String, track: String, position: Int? = null)
Add a track to a user’s playlist.
addTrackToClientPlaylistRestAction
Link copied to clipboard
common
fun addTrackToClientPlaylistRestAction(playlist: String, track: String, position: Int? = null): SpotifyRestAction<Unit>
Add a track 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.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
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.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
removeAllClientPlaylistTracks
Link copied to clipboard
common
suspend fun removeAllClientPlaylistTracks(playlist: String)
Remove all the tracks in a playlistApi Reference
removeAllClientPlaylistTracksRestAction
Link copied to clipboard
common
fun removeAllClientPlaylistTracksRestAction(playlist: String): SpotifyRestAction<Unit>
Remove all the tracks in a playlistApi Reference
removeTrackFromClientPlaylist
Link copied to clipboard
common
suspend fun removeTrackFromClientPlaylist(playlist: String, track: String, snapshotId: String? = null): PlaylistSnapshot
Remove all occurrences of a track from the specified playlist.
suspend fun removeTrackFromClientPlaylist(playlist: String, track: String, positions: SpotifyTrackPositions, snapshotId: String? = null): PlaylistSnapshot
Remove a track in the specified positions (zero-based) from the specified playlist.
removeTrackFromClientPlaylistRestAction
Link copied to clipboard
common
fun removeTrackFromClientPlaylistRestAction(playlist: String, track: String, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Remove all occurrences of a track from the specified playlist.
fun removeTrackFromClientPlaylistRestAction(playlist: String, track: String, positions: SpotifyTrackPositions, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Remove a track in the specified positions (zero-based) from the specified playlist.
removeTracksFromClientPlaylist
Link copied to clipboard
common
suspend fun removeTracksFromClientPlaylist(playlist: String, vararg tracks: Pair<String, SpotifyTrackPositions>, snapshotId: String? = null): PlaylistSnapshot
Remove tracks (each with their own positions) from the given playlist.
suspend fun removeTracksFromClientPlaylist(playlist: String, vararg tracks: String, snapshotId: String? = null): PlaylistSnapshot
Remove all occurrences of the specified tracks from the given playlist.
common
fun removeTracksFromClientPlaylistRestAction(playlist: String, vararg tracks: Pair<String, SpotifyTrackPositions>, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Remove tracks (each with their own positions) from the given playlist.
fun removeTracksFromClientPlaylistRestAction(playlist: String, vararg tracks: String, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Remove all occurrences of the specified tracks from the given playlist.
reorderClientPlaylistTracks
Link copied to clipboard
common
suspend fun reorderClientPlaylistTracks(playlist: String, reorderRangeStart: Int, reorderRangeLength: Int? = null, insertionPoint: Int, snapshotId: String? = null): PlaylistSnapshot
Reorder a track or a group of tracks in a playlist.
reorderClientPlaylistTracksRestAction
Link copied to clipboard
common
fun reorderClientPlaylistTracksRestAction(playlist: String, reorderRangeStart: Int, reorderRangeLength: Int? = null, insertionPoint: Int, snapshotId: String? = null): SpotifyRestAction<PlaylistSnapshot>
Reorder a track or a group of tracks in a playlist.
replaceClientPlaylistTracks
Link copied to clipboard
common
suspend fun replaceClientPlaylistTracks(playlist: String, vararg tracks: String)
Replace all the tracks in a playlist, overwriting its existing tracks.
replaceClientPlaylistTracksRestAction
Link copied to clipboard
common
fun replaceClientPlaylistTracksRestAction(playlist: String, vararg tracks: String): SpotifyRestAction<Unit>
Replace all the tracks in a playlist, overwriting its existing tracks.
setClientPlaylistTracks
Link copied to clipboard
common
suspend fun setClientPlaylistTracks(playlist: String, vararg tracks: String)
Replace all the tracks in a playlist, overwriting its existing tracks.
setClientPlaylistTracksRestAction
Link copied to clipboard
common
fun setClientPlaylistTracksRestAction(playlist: String, vararg tracks: String): SpotifyRestAction<Unit>
Replace all the tracks in a playlist, overwriting its existing tracks.
toString
Link copied to clipboard
common
open fun toString(): String
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

(source)
Link copied to clipboard