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.
addTrackToClientPlaylist
Link copied to clipboard
common
suspend fun addTrackToClientPlaylist(playlist: String, track: String, position: Int? = null)
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.
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.
deleteClientPlaylist
Link copied to clipboard
common
suspend fun deleteClientPlaylist(playlist: String): 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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.

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