Liking cljdoc? Tell your friends :D

spojure.player


add-item-to-playback-queuecljs

(add-item-to-playback-queue spj & {:keys [uri] :as params})

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
sourceraw docstring

get-available-devicescljs

(get-available-devices spj & {:as params})

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
sourceraw docstring

get-playback-statecljs

(get-playback-state spj & {:as params})

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

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
sourceraw docstring

get-recently-played-trackscljs

(get-recently-played-tracks spj & {:as params})

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
sourceraw docstring

get-user-queuecljs

(get-user-queue spj & {:as params})

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
sourceraw docstring

pause-playbackcljs

(pause-playback spj & {:as params})

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
sourceraw docstring

skip-to-nextcljs

(skip-to-next spj & {:as params})

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
sourceraw docstring

skip-to-previouscljs

(skip-to-previous spj & {:as params})

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
sourceraw docstring

start-or-resume-playbackcljs

(start-or-resume-playback spj & {:keys [b/context_uri b/uris] :as params})

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.

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.

https://developer.spotify.com/documentation/web-api/reference/start-a-users-playback
sourceraw docstring

toggle-playback-shufflecljs

(toggle-playback-shuffle spj & {:keys [state] :as params})

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
sourceraw docstring

transfer-playbackcljs

(transfer-playback spj & {:keys [b/device_ids] :as params})

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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close