contains

suspend fun contains(type: LibraryType, id: String): Boolean(source)

Check if the LibraryType with id id is already saved in the current Spotify user’s ‘Your Music’ library.

Requires the SpotifyScope.UserLibraryRead scope

Api Reference

Parameters

type

The type of object (album or track)

id

The id or uri of the object

Throws


suspend fun contains(type: LibraryType, vararg ids: String): List<Boolean>(source)

Check if one or more of LibraryType is already saved in the current Spotify user’s ‘Your Music’ library.

Requires the SpotifyScope.UserLibraryRead scope

Api Reference

Parameters

type

The type of objects (album or track)

ids

The ids or uris of the objects. Maximum 50 ids.

Throws

if any of the provided ids is invalid