(add-item-to-playback-queue tb & {:keys [uri] :as keyvals})
Adds an item with the specified uri to the end of the user's playback queue. Params: uri, device_id.
uri must identify a track ('spotify:track:<track id>') or an episode ('spotify:episode:<episode id>').
Blocking: if enabled, the result is not returned until the given item appears in the user's queue which is obtained with additional API calls. Note that the item may already be present in the queue, so this check is not comprehensive. However, it is enough in the typical case.
https://developer.spotify.com/documentation/web-api/reference/add-to-queue
Adds an item with the specified uri to the end of the user's playback queue. Params: uri, device_id. uri must identify a track ('spotify:track:<track id>') or an episode ('spotify:episode:<episode id>'). Blocking: if enabled, the result is not returned until the given item appears in the user's queue which is obtained with additional API calls. Note that the item may already be present in the queue, so this check is not comprehensive. However, it is enough in the typical case. https://developer.spotify.com/documentation/web-api/reference/add-to-queue
(get-available-devices tb & {:as keyvals})
Returns a list of devices currently running Spotify. No params.
https://developer.spotify.com/documentation/web-api/reference/get-a-users-available-devices
Returns a list of devices currently running Spotify. No params. https://developer.spotify.com/documentation/web-api/reference/get-a-users-available-devices
(get-playback-state tb & {:as keyvals})
Returns information about the current playback status, including item, progress and active device. Params: market, additional_types.
The timestamp output parameter seems to contain the time the current track started playing and can be used to check if the Skip To Next/Skip To Previous track operation has already taken effect.
Returns information about the current playback status, including item, progress and active device. Params: market, additional_types. The timestamp output parameter seems to contain the time the current track started playing and can be used to check if the Skip To Next/Skip To Previous track operation has already taken effect. https://developer.spotify.com/documentation/web-api/reference/get-information-about-the-users-current-playback
(get-recently-played-tracks tb & {:as keyvals})
Returns recently played tracks (not episodes). Params: limit, before, after.
https://developer.spotify.com/documentation/web-api/reference/get-recently-played
Returns recently played tracks (not episodes). Params: limit, before, after. https://developer.spotify.com/documentation/web-api/reference/get-recently-played
(get-user-queue tb & {:as keyvals})
Return the contents of the user's queue. No params.
If there are no active devices, the returned queue will be empty. After transferring playback to a device or modifying the queue, it takes some time before its current value starts to be returned.
https://developer.spotify.com/documentation/web-api/reference/get-queue
Return the contents of the user's queue. No params. If there are no active devices, the returned queue will be empty. After transferring playback to a device or modifying the queue, it takes some time before its current value starts to be returned. https://developer.spotify.com/documentation/web-api/reference/get-queue
(pause-playback tb & {:as keyvals})
Pauses playback. Params: device_id.
Error suppression: if playback is already paused, the server returns status 403 with message 'Player command failed: Restriction violated' and reason 'UNKNOWN'. This error is ignored, i.e. the resulting map is returned directly, instead of being wrapped in a js/Error object (the <? macro throws no exception).
Blocking: if enabled, no result is returned until the state of the playback, fetched by additional API requests, contains the is_playing output parameter as false.
https://developer.spotify.com/documentation/web-api/reference/pause-a-users-playback
Pauses playback. Params: device_id. Error suppression: if playback is already paused, the server returns status 403 with message 'Player command failed: Restriction violated' and reason 'UNKNOWN'. This error is ignored, i.e. the resulting map is returned directly, instead of being wrapped in a js/Error object (the <? macro throws no exception). Blocking: if enabled, no result is returned until the state of the playback, fetched by additional API requests, contains the is_playing output parameter as false. https://developer.spotify.com/documentation/web-api/reference/pause-a-users-playback
(skip-to-next tb & {:as keyvals})
Skips to the next item in the user's queue. Params: device_id.
Blocking: if enabled, no result is returned until the playback state (fetched by additional API requests) contains a different timestamp than before the 'Skip To Next' API command was called. (See also: get-playback-state.)
Note that a race is possible where at the same time: 1. Spotify player skips to the next track because the current one ends, 2. this function is called. Therefore, if you want to be sure that exactly one track was skipped, you should work with a paused player (see pause-playback).
https://developer.spotify.com/documentation/web-api/reference/skip-users-playback-to-next-track
Skips to the next item in the user's queue. Params: device_id. Blocking: if enabled, no result is returned until the playback state (fetched by additional API requests) contains a different timestamp than before the 'Skip To Next' API command was called. (See also: get-playback-state.) Note that a race is possible where at the same time: 1. Spotify player skips to the next track because the current one ends, 2. this function is called. Therefore, if you want to be sure that exactly one track was skipped, you should work with a paused player (see pause-playback). https://developer.spotify.com/documentation/web-api/reference/skip-users-playback-to-next-track
(skip-to-previous tb & {:as keyvals})
Skips to the previous item in the user's queue. Params: device_id.
Blocking: like for skip-to-next (see also notes to that function about possible race condition).
https://developer.spotify.com/documentation/web-api/reference/skip-users-playback-to-previous-track
Skips to the previous item in the user's queue. Params: device_id. Blocking: like for skip-to-next (see also notes to that function about possible race condition). https://developer.spotify.com/documentation/web-api/reference/skip-users-playback-to-previous-track
(start-or-resume-playback tb & {:keys [b/context_uri b/uris] :as keyvals})
Starts/resumes playback. Params: device_id, b/context_uri, b/uris, b/offset, b/position_ms.
Error suppression: as for pause-playback, except error 403 is suppressed in case of double start.
Blocking: like for pause-playback, except that is_playing is tested for true. Also, if either b/context_uri or b/uris is given, an additional check is made to see if b/context_uri or one of b/uris is actually being played.
https://developer.spotify.com/documentation/web-api/reference/start-a-users-playback
Starts/resumes playback. Params: device_id, b/context_uri, b/uris, b/offset, b/position_ms. Error suppression: as for pause-playback, except error 403 is suppressed in case of double start. Blocking: like for pause-playback, except that is_playing is tested for true. Also, if either b/context_uri or b/uris is given, an additional check is made to see if b/context_uri or one of b/uris is actually being played. https://developer.spotify.com/documentation/web-api/reference/start-a-users-playback
(toggle-playback-shuffle tb & {:keys [state] :as keyvals})
Toggles playback shuffle. Params: state, device_id.
Blocking: if enabled, no result is returned until the shuffle state (fetched by additional API requests) has the same value as the state input parameter.
https://developer.spotify.com/documentation/web-api/reference/toggle-shuffle-for-users-playback
Toggles playback shuffle. Params: state, device_id. Blocking: if enabled, no result is returned until the shuffle state (fetched by additional API requests) has the same value as the state input parameter. https://developer.spotify.com/documentation/web-api/reference/toggle-shuffle-for-users-playback
(transfer-playback tb & {:keys [b/device_ids] :as keyvals})
Transfers playback to the specified device and determines whether it should start playing. Despite the array parameter b/device_ids, only one device is supported. Params: b/device_ids, b/play.
Blocking: if enabled, no result is returned until the list of available devices, fetched by additional API calls, contains the specified device with the 'is_active' parameter set to true. The playback queue is returned properly only when the device is active.
https://developer.spotify.com/documentation/web-api/reference/transfer-a-users-playback
Transfers playback to the specified device and determines whether it should start playing. Despite the array parameter b/device_ids, only one device is supported. Params: b/device_ids, b/play. Blocking: if enabled, no result is returned until the list of available devices, fetched by additional API calls, contains the specified device with the 'is_active' parameter set to true. The playback queue is returned properly only when the device is active. https://developer.spotify.com/documentation/web-api/reference/transfer-a-users-playback
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close