View Source Spotify.Player (spotify_ex v2.4.0)
Provides functions for retrieving and manipulating user's current playback.
https://developer.spotify.com/documentation/web-api/reference/player/
Link to this section Summary
Functions
iex> Spotify.Player.currently_playing_url(market: "US")
"https://api.spotify.com/v1/me/player/currently-playing?market=US"iex> Spotify.Player.devices_url
"https://api.spotify.com/v1/me/player/devices"Add an item to the user's playback queue. Spotify Documentation
iex> Spotify.Player.enqueue_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/queue?device_id=abc"Get information about the user's playback currently playing context. Spotify Documentation
Get the user's currently playing tracks. Spotify Documentation
Get the user's available devices. Spotify Documentation
Get the user's recently played tracks. Spotify Documentation
iex> Spotify.Player.next_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/next?device_id=abc"Pause the user's playback. Spotify Documentation
iex> Spotify.Player.pause_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/pause?device_id=abc"Start/resume the user's playback. Spotify Documentation
iex> Spotify.Player.play_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/play?device_id=abc"iex> Spotify.Player.player_url(market: "US")
"https://api.spotify.com/v1/me/player?market=US"iex> Spotify.Player.previous_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/previous?device_id=abc"iex> Spotify.Player.recently_played_url(limit: 50)
"https://api.spotify.com/v1/me/player/recently-played?limit=50"iex> Spotify.Player.repeat_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/repeat?device_id=abc"Seek to position in currently playing track. Spotify Documentation
iex> Spotify.Player.seek_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/seek?device_id=abc"Set repeat mode for the user's playback. Spotify Documentation
Toggle shuffle for the user's playback. Spotify Documentation
Set volume for the user's playback. Spotify Documentation
iex> Spotify.Player.shuffle_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/shuffle?device_id=abc"Skip the user's playback to next track. Spotify Documentation
Skip the user's playback to previous track. Spotify Documentation
Transfer the user's playback. Spotify Documentation
iex> Spotify.Player.volume_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/volume?device_id=abc"Link to this section Functions
iex> Spotify.Player.currently_playing_url(market: "US")
"https://api.spotify.com/v1/me/player/currently-playing?market=US"
iex> Spotify.Player.devices_url
"https://api.spotify.com/v1/me/player/devices"
Add an item to the user's playback queue. Spotify Documentation
Method: POST
Optional Params: device_id
iex> Spotify.Player.enqueue_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/queue?device_id=abc"
Get information about the user's playback currently playing context. Spotify Documentation
Method: GET
Optional Params: market, additional_types
Get the user's currently playing tracks. Spotify Documentation
Method: GET
Optional Params: market, additional_types
Get the user's available devices. Spotify Documentation
Method: GET
Get the user's recently played tracks. Spotify Documentation
Method: GET
Optional Params: limit, after, before
iex> Spotify.Player.next_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/next?device_id=abc"
Pause the user's playback. Spotify Documentation
Method: PUT
Optional Params: device_id
iex> Spotify.Player.pause_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/pause?device_id=abc"
Start/resume the user's playback. Spotify Documentation
Method: PUT
Optional Params: device_id, context_uri, uris, offset, position_ms
iex> Spotify.Player.play_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/play?device_id=abc"
iex> Spotify.Player.player_url(market: "US")
"https://api.spotify.com/v1/me/player?market=US"
iex> Spotify.Player.previous_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/previous?device_id=abc"
iex> Spotify.Player.recently_played_url(limit: 50)
"https://api.spotify.com/v1/me/player/recently-played?limit=50"
iex> Spotify.Player.repeat_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/repeat?device_id=abc"
Seek to position in currently playing track. Spotify Documentation
Method: PUT
Optional Params: device_id
iex> Spotify.Player.seek_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/seek?device_id=abc"
Set repeat mode for the user's playback. Spotify Documentation
Method: PUT
Optional Params: device_id
Toggle shuffle for the user's playback. Spotify Documentation
Method: PUT
Optional Params: device_id
Set volume for the user's playback. Spotify Documentation
Method: PUT
Optional Params: device_id
iex> Spotify.Player.shuffle_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/shuffle?device_id=abc"
Skip the user's playback to next track. Spotify Documentation
Method: POST
Optional Params: device_id
Skip the user's playback to previous track. Spotify Documentation
Method: POST
Optional Params: device_id
Transfer the user's playback. Spotify Documentation
Method: PUT
Optional Params: play
iex> Spotify.Player.volume_url(device_id: "abc")
"https://api.spotify.com/v1/me/player/volume?device_id=abc"