ClientLibraryApi

class ClientLibraryApi(api: GenericSpotifyApi) : SpotifyEndpoint

Endpoints for retrieving information about, and managing, tracks and albums that the current user has saved in their “Your Music” library.

Api Reference

Constructors

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

Functions

add
Link copied to clipboard
common
suspend fun add(type: LibraryType, vararg ids: String)
Save one or more of LibraryType to the current user’s ‘Your Music’ library.
suspend fun add(type: LibraryType, id: String)
Save one of LibraryType to the current user’s ‘Your Music’ library.
contains
Link copied to clipboard
common
suspend fun contains(type: LibraryType, vararg ids: String): List<Boolean>
Check if one or more of LibraryType is already saved in the current Spotify user’s ‘Your Music’ library.
suspend fun contains(type: LibraryType, id: String): Boolean
Check if the LibraryType with id id is already saved in the current Spotify user’s ‘Your Music’ library.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
getSavedAlbums
Link copied to clipboard
common
suspend fun getSavedAlbums(limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<SavedAlbum>
Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.
getSavedTracks
Link copied to clipboard
common
suspend fun getSavedTracks(limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<SavedTrack>
Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
remove
Link copied to clipboard
common
suspend fun remove(type: LibraryType, vararg ids: String)
Remove one or more of the LibraryType (tracks or albums) from the current user’s ‘Your Music’ library.
suspend fun remove(type: LibraryType, id: String)
Remove one of LibraryType (track or album) from the current user’s ‘Your Music’ library.
toString
Link copied to clipboard
common
open fun toString(): String

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