Client Player Api
These endpoints allow for viewing and controlling user playback. Please view the official documentation for more information on how this works. This is in beta and is available for premium users only. Endpoints are not guaranteed to work and are subject to change!
Constructors
ClientPlayerApi
Link copied to clipboard
Types
PlayerRepeatState
Link copied to clipboard
enum PlayerRepeatState : Enum<ClientPlayerApi.PlayerRepeatState> , ResultEnum
Content copied to clipboard
Functions
addItemToEndOfQueue
Link copied to clipboard
suspend fun addItemToEndOfQueue(uri: PlayableUri, deviceId: String? = null)
Content copied to clipboard
addItemToEndOfQueueRestAction
Link copied to clipboard
fun addItemToEndOfQueueRestAction(uri: PlayableUri, deviceId: String? = null): SpotifyRestAction<Unit>
Content copied to clipboard
getCurrentContext
Link copied to clipboard
getCurrentContextRestAction
Link copied to clipboard
fun getCurrentContextRestAction(): SpotifyRestAction<CurrentlyPlayingContext?>
Content copied to clipboard
getCurrentlyPlaying
Link copied to clipboard
getCurrentlyPlayingRestAction
Link copied to clipboard
fun getCurrentlyPlayingRestAction(): SpotifyRestAction<CurrentlyPlayingObject?>
Content copied to clipboard
getDevices
Link copied to clipboard
getDevicesRestAction
Link copied to clipboard
getRecentlyPlayed
Link copied to clipboard
suspend fun getRecentlyPlayed(limit: Int? = api.spotifyApiOptions.defaultLimit, before: String? = null, after: String? = null): CursorBasedPagingObject<PlayHistory>
Content copied to clipboard
getRecentlyPlayedRestAction
Link copied to clipboard
fun getRecentlyPlayedRestAction(limit: Int? = api.spotifyApiOptions.defaultLimit, before: String? = null, after: String? = null): SpotifyRestAction<CursorBasedPagingObject<PlayHistory>>
Content copied to clipboard
pauseRestAction
Link copied to clipboard
resumeRestAction
Link copied to clipboard
seekRestAction
Link copied to clipboard
fun seekRestAction(positionMs: Long, deviceId: String? = null): SpotifyRestAction<Unit>
Content copied to clipboard
setRepeatMode
Link copied to clipboard
suspend fun setRepeatMode(state: ClientPlayerApi.PlayerRepeatState, deviceId: String? = null)
Content copied to clipboard
setRepeatModeRestAction
Link copied to clipboard
fun setRepeatModeRestAction(state: ClientPlayerApi.PlayerRepeatState, deviceId: String? = null): SpotifyRestAction<Unit>
Content copied to clipboard
setVolumeRestAction
Link copied to clipboard
fun setVolumeRestAction(volumePercent: Int, deviceId: String? = null): SpotifyRestAction<Unit>
Content copied to clipboard
skipBehind
Link copied to clipboard
skipBehindRestAction
Link copied to clipboard
fun skipBehindRestAction(deviceId: String? = null): SpotifyRestAction<String>
Content copied to clipboard
skipForward
Link copied to clipboard
skipForwardRestAction
Link copied to clipboard
fun skipForwardRestAction(deviceId: String? = null): SpotifyRestAction<String>
Content copied to clipboard
startPlayback
Link copied to clipboard
suspend fun startPlayback(contextUri: ContextUri? = null, offsetIndex: Int? = null, offsetPlayableUri: PlayableUri? = null, playableUrisToPlay: List<PlayableUri>? = null, deviceId: String? = null)
Content copied to clipboard
suspend fun startPlayback(artistId: String? = null, playlistId: String? = null, albumId: String? = null, showId: String? = null, offsetLocalTrackId: String? = null, offsetTrackId: String? = null, offsetEpisodeId: String? = null, offsetIndex: Int? = null, trackIdsToPlay: List<String>? = null, localTrackIdsToPlay: List<String>? = null, episodeIdsToPlay: List<String>? = null, deviceId: String? = null)
Content copied to clipboard
startPlaybackRestAction
Link copied to clipboard
fun startPlaybackRestAction(contextUri: ContextUri? = null, offsetIndex: Int? = null, offsetPlayableUri: PlayableUri? = null, playableUrisToPlay: List<PlayableUri>? = null, deviceId: String? = null): SpotifyRestAction<Unit>
Content copied to clipboard
fun startPlaybackRestAction(artistId: String? = null, playlistId: String? = null, albumId: String? = null, showId: String? = null, offsetLocalTrackId: String? = null, offsetTrackId: String? = null, offsetEpisodeId: String? = null, offsetIndex: Int? = null, trackIdsToPlay: List<String>? = null, localTrackIdsToPlay: List<String>? = null, episodeIdsToPlay: List<String>? = null, deviceId: String? = null): SpotifyRestAction<Unit>
Content copied to clipboard
toggleShuffle
Link copied to clipboard
suspend fun toggleShuffle(shuffle: Boolean, deviceId: String? = null): String
Content copied to clipboard
toggleShuffleRestAction
Link copied to clipboard
fun toggleShuffleRestAction(shuffle: Boolean, deviceId: String? = null): SpotifyRestAction<String>
Content copied to clipboard
transferPlayback
Link copied to clipboard
transferPlaybackRestAction
Link copied to clipboard
fun transferPlaybackRestAction(deviceId: String, play: Boolean? = null): SpotifyRestAction<Unit>
Content copied to clipboard
Properties
Sources
common source
Link copied to clipboard