addItemToQueue

suspend fun addItemToQueue(uri: String, deviceId: String? = null): HttpStatusCode(source)

Will be internal once the whole API is covered


suspend fun addItemToQueue(track: Track, deviceId: String?): HttpStatusCode(source)
suspend fun addItemToQueue(track: LinkedTrack, deviceId: String?): HttpStatusCode(source)

Adds a track to the user's queue

Return

HttpStatusCode.NoContent if the request succeeded, HttpStatusCode.NotFound if the device was not found, HttpStatusCode.Forbidden if the user is non-premium

Parameters

track

The track to add to the queue

deviceId

The device ID, if not provided, the user's current active device is targeted


suspend fun addItemToQueue(episode: Episode, deviceId: String?): HttpStatusCode(source)

Adds an episode to the user's queue

Return

HttpStatusCode.NoContent if the request succeeded, HttpStatusCode.NotFound if the device was not found, HttpStatusCode.Forbidden if the user is non-premium

Parameters

episode

The episode to add to the queue

deviceId

The device ID, if not provided, the user's current active device is targeted