Title: | Tinyverse R Wrapper for the 'Spotify' Web API |
---|---|
Description: | An R wrapper for the 'Spotify' Web API <https://developer.spotify.com/web-api/>. |
Authors: | Troy Hernandez [aut, cre], Charlie Thompson [aut], Josiah Parry [aut], Donal Phipps [aut], Tom Wolff [aut] |
Maintainer: | Troy Hernandez <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.2 |
Built: | 2025-01-29 02:36:19 UTC |
Source: | https://github.com/troyhernandez/tinyspotifyr |
Add one or more tracks to a user’s playlist.
add_items_to_playlist( playlist_id, uris, position = NULL, market = "US", authorization = get_spotify_authorization_code() )
add_items_to_playlist( playlist_id, uris, position = NULL, market = "US", authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID for the playlist. |
uris |
Optional. A character vector of Spotify track URIs to add. For example |
position |
Optional. Integer indicating the position to insert the tracks, a zero-based index. For example, to insert the tracks in the first position: |
market |
Optional for music. Required for podcasts episodes. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value. Items added to playlist.
Add the latest episode of a podcast to a user’s playlist.
add_latest_to_playlist( playlist_id, uri, position = NULL, market = "US", authorization = get_spotify_authorization_code() )
add_latest_to_playlist( playlist_id, uri, position = NULL, market = "US", authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID for the playlist. |
uri |
The show Spotify URIs to add. For example |
position |
Optional. Integer indicating the position to insert the tracks, a zero-based index. For example, to insert the tracks in the first position: |
market |
Required. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value. Tracks are added to playlist.
Add one or more tracks to a user’s playlist.
add_tracks_to_playlist( playlist_id, uris, position = NULL, market = NULL, authorization = get_spotify_authorization_code() )
add_tracks_to_playlist( playlist_id, uris, position = NULL, market = NULL, authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID for the playlist. |
uris |
Optional. A character vector of Spotify track URIs to add. For example |
position |
Optional. Integer indicating the position to insert the tracks, a zero-based index. For example, to insert the tracks in the first position: |
market |
Optional for music. Required for podcasts episodes. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value. Tracks added to playlist.
Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)
change_playlist_details( playlist_id, name = NULL, public = NULL, collaborative = NULL, description = NULL, authorization = get_spotify_authorization_code() )
change_playlist_details( playlist_id, name = NULL, public = NULL, collaborative = NULL, description = NULL, authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID for the playlist. |
name |
Optional String containing the name for the new playlist, for example |
public |
Optional. Boolean. If |
collaborative |
Optional. Boolean. If |
description |
Optional. String containing the playlist description as displayed in Spotify Clients and in the Web API. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value. Playlist details changed.
Check if Current User Follows Artists or Users
check_me_following(type, ids, authorization = get_spotify_authorization_code())
check_me_following(type, ids, authorization = get_spotify_authorization_code())
type |
Required. String of the ID type: either |
ids |
Required. A character vector of the artist or the user Spotify IDs to check. For example: |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a list of results containing user following status.
Check if Users Follow a Playlist
check_users_following( playlist_id, ids, authorization = get_spotify_authorization_code() )
check_users_following( playlist_id, ids, authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID of the playlist. |
ids |
Required. Spotify User IDs; the ids of the users that you want to check to see if they follow the playlist. Maximum: 5 ids. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. |
Returns a list of results containing user following status.
Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)
create_playlist( user_id, name, public = TRUE, collaborative = FALSE, description = NULL, authorization = get_spotify_authorization_code() )
create_playlist( user_id, name, public = TRUE, collaborative = FALSE, description = NULL, authorization = get_spotify_authorization_code() )
user_id |
Required. The user's Spotify user ID. |
name |
Required. String containing the name for the new playlist, for example |
public |
Optional. Boolean. Defaults to |
collaborative |
Optional. Boolean. Defaults to |
description |
Optional. String containing the playlist description as displayed in Spotify Clients and in the Web API. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a list containing playlist information.
Add the current user as a follower of one or more artists or other Spotify users.
follow_artists_or_users( type, ids, authorization = get_spotify_authorization_code() )
follow_artists_or_users( type, ids, authorization = get_spotify_authorization_code() )
type |
Required. The ID type: either |
ids |
Optional. A character vector of the artist or the user Spotify IDs. For example: |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value. User's account follows another on Spotify.
Add the current user as a follower of a playlist.
follow_playlist( playlist_id, public = FALSE, authorization = get_spotify_authorization_code() )
follow_playlist( playlist_id, public = FALSE, authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID. |
public |
Optional. Defaults to |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Get Spotify catalog information for a single album.
get_album(id, market = NULL, authorization = get_spotify_access_token())
get_album(id, market = NULL, authorization = get_spotify_access_token())
id |
The Spotify ID for the album. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a data frame of results containing album data. See the official documentation for more information.
Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.
get_album_tracks( id, limit = 20, offset = 0, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_album_tracks( id, limit = 20, offset = 0, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
id |
Required. The Spotify ID for the album. |
limit |
Optional. |
offset |
Optional. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing album data. See the official API documentation for more information.
Get Spotify catalog information for multiple albums identified by their Spotify IDs.
get_albums( ids, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_albums( ids, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
ids |
Required. A character vector of the Spotify IDs for the albums. Maximum: 20 IDs. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing album data. See https://developer.spotify.com/documentation/web-api/reference/albums/get-album/ for more information.
Get Spotify catalog information for a single artist identified by their unique Spotify ID.
get_artist(id, authorization = get_spotify_access_token())
get_artist(id, authorization = get_spotify_access_token())
id |
The Spotify ID for the artist. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a data frame of results containing album data. See https://developer.spotify.com/documentation/web-api/reference/albums/get-album/ for more information.
Get Spotify catalog information for multiple artists identified by their Spotify IDs.
get_artist_albums( id, include_groups = c("album", "single", "appears_on", "compilation"), market = NULL, limit = 20, offset = 0, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_artist_albums( id, include_groups = c("album", "single", "appears_on", "compilation"), market = NULL, limit = 20, offset = 0, authorization = get_spotify_access_token(), include_meta_info = FALSE )
id |
The Spotify ID for the artist. |
include_groups |
Optional. A character vector of keywords that will be used to filter the response. If not supplied, all album types will be returned. Valid values are: |
market |
Optional. |
limit |
Optional. |
offset |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing artist data. See https://developer.spotify.com/documentation/web-api/reference/artists/get-several-artists/ for more information.
Get Spotify catalog information about an artist’s top tracks by country.
get_artist_top_tracks( id, market = "US", authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_artist_top_tracks( id, market = "US", authorization = get_spotify_access_token(), include_meta_info = FALSE )
id |
The Spotify ID for the artist. |
market |
Required. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing artist data. See https://developer.spotify.com/documentation/web-api/reference/artists/get-several-artists/ for more information.
Get Spotify catalog information for multiple artists identified by their Spotify IDs.
get_artists( ids, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_artists( ids, authorization = get_spotify_access_token(), include_meta_info = FALSE )
ids |
Required. A character vector of the Spotify IDs for the artists. Maximum: 50 IDs. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing artist data. See https://developer.spotify.com/documentation/web-api/reference/artists/get-several-artists/ for more information.
Get a list of Spotify categories
get_categories(authorization = get_spotify_access_token(), df = TRUE)
get_categories(authorization = get_spotify_access_token(), df = TRUE)
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
df |
(default TRUE). Should the results be formatted as a data frame? If FALSE, the full response JSON will be returned as a list. |
Returns a data frame of results containing album data. See https://developer.spotify.com/documentation/web-api/reference/browse/get-list-categories/ for more information.
Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
get_category( category_id, country = NULL, locale = NULL, authorization = get_spotify_access_token() )
get_category( category_id, country = NULL, locale = NULL, authorization = get_spotify_access_token() )
category_id |
Required. The Spotify ID for the category. |
country |
Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country. |
locale |
Optional. The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
Returns a list of results containing category information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
Get a list of Spotify playlists tagged with a particular category.
get_category_playlists( category_id, market = NULL, limit = 20, offset = 0, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_category_playlists( category_id, market = NULL, limit = 20, offset = 0, authorization = get_spotify_access_token(), include_meta_info = FALSE )
category_id |
Required. The Spotify ID for the category. |
market |
Optional. A country: an ISO 3166-1 alpha-2 country code. |
limit |
Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. |
offset |
Optional. The index of the first item to return. Default: 0 (the first object). Use with |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing category playlists. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
## Not run: ## Get Brazilian party playlists get_category_playlists('party', country = 'BR') ## End(Not run)
## Not run: ## Get Brazilian party playlists get_category_playlists('party', country = 'BR') ## End(Not run)
Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab).
get_featured_playlists( locale = NULL, country = NULL, timestamp = NULL, limit = 20, offset = 0, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_featured_playlists( locale = NULL, country = NULL, timestamp = NULL, limit = 20, offset = 0, authorization = get_spotify_access_token(), include_meta_info = FALSE )
locale |
Optional. The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: |
country |
Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries. |
timestamp |
Optional. A timestamp in ISO 8601 format: |
limit |
Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. |
offset |
Optional. The index of the first item to return. Default: 0 (the first object). Use with |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing featured playlists. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
## Not run: ## Get new Swedish music get_featured_playlists(country = 'SE') ## End(Not run)
## Not run: ## Get new Swedish music get_featured_playlists(country = 'SE') ## End(Not run)
Get Spotify uri information for a show's latest episodes identified by their unique Spotify ID.
get_latest_episode( id, market = "US", authorization = get_spotify_authorization_code() )
get_latest_episode( id, market = "US", authorization = get_spotify_authorization_code() )
id |
The Spotify ID for the show. |
market |
Required. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a string containing the latest episode data for a show. See https://developer.spotify.com/documentation/web-api/reference/shows/get-shows-episodes/ for more information.
Get information about the user’s current playback state, including track, track progress, and active device.
get_my_current_playback( market = NULL, authorization = get_spotify_authorization_code() )
get_my_current_playback( market = NULL, authorization = get_spotify_authorization_code() )
market |
An ISO 3166-1 alpha-2 country code or the string |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a list containing user playback information. See the official Spotify Web API documentation for more information.
Get the object currently being played on the user’s Spotify account.
get_my_currently_playing( market = NULL, authorization = get_spotify_authorization_code() )
get_my_currently_playing( market = NULL, authorization = get_spotify_authorization_code() )
market |
An ISO 3166-1 alpha-2 country code or the string |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
Get information about a user’s available devices.
get_my_devices(authorization = get_spotify_authorization_code())
get_my_devices(authorization = get_spotify_authorization_code())
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a data frame of results containing user device information. See the official Spotify Web API documentation for more information.
Get the current user’s followed artists.
get_my_followed_artists( limit = 20, after = NULL, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
get_my_followed_artists( limit = 20, after = NULL, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
limit |
Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. |
after |
Optional. The last artist ID retrieved from the previous request. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing user's followed artists.
Get a list of the playlists owned or followed by the current Spotify user.
get_my_playlists( limit = 20, offset = 0, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
get_my_playlists( limit = 20, offset = 0, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
limit |
Optional. |
offset |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
Get detailed profile information about the current user (including the current user’s username).
get_my_profile(authorization = get_spotify_authorization_code())
get_my_profile(authorization = get_spotify_authorization_code())
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
Get Current User's Recently Played Tracks
get_my_recently_played( limit = 20, after = NULL, before = NULL, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
get_my_recently_played( limit = 20, after = NULL, before = NULL, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
limit |
Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. |
after |
Optional. A Unix timestamp in milliseconds. Returns all items after (but not including) this cursor position. If |
before |
Optional. A Unix timestamp in milliseconds. Returns all items before (but not including) this cursor position. If |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a list or data frame of results containing the most recently played tracks for the current user.
Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.
get_my_saved_albums( limit = 20, offset = 0, market = NULL, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
get_my_saved_albums( limit = 20, offset = 0, market = NULL, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
limit |
Optional. |
offset |
Optional. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/library/get-users-saved-albums/ for more information.
Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library.
get_my_saved_tracks( limit = 20, offset = 0, market = NULL, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
get_my_saved_tracks( limit = 20, offset = 0, market = NULL, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
limit |
Optional. |
offset |
Optional. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
Get the current user’s top artists or tracks based on calculated affinity.
get_my_top_artists_or_tracks( type = NULL, limit = 20, offset = 0, time_range = "medium_term", authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
get_my_top_artists_or_tracks( type = NULL, limit = 20, offset = 0, time_range = "medium_term", authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
type |
Required. The type of entity to return. Valid values: |
limit |
Optional. |
offset |
Optional. |
time_range |
Optional. Over what time frame the affinities are computed. Valid values: long_term (calculated from several years of data and including all new data as it becomes available), |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing track or album data. See the official API documentation for more information.
Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).
get_new_releases( country = NULL, limit = 20, offset = 0, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_new_releases( country = NULL, limit = 20, offset = 0, authorization = get_spotify_access_token(), include_meta_info = FALSE )
country |
Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries. |
limit |
Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. |
offset |
Optional. The index of the first item to return. Default: 0 (the first object). Use with |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing new releases. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
## Not run: ## Get new Swedish music get_new_releases(country = 'SE') ## End(Not run)
## Not run: ## Get new Swedish music get_new_releases(country = 'SE') ## End(Not run)
Get a playlist owned by a Spotify user.
get_playlist( playlist_id, fields = NULL, market = NULL, authorization = get_spotify_access_token() )
get_playlist( playlist_id, fields = NULL, market = NULL, authorization = get_spotify_access_token() )
playlist_id |
Required. The Spotify ID for the playlist. |
fields |
Optional. Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned. For example, to get just the playlist’s description and URI: |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Both Public and Private playlists belonging to any user are retrievable on provision of a valid access token. Defaults to |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
Get the current image associated with a specific playlist.
get_playlist_cover_image( playlist_id, authorization = get_spotify_authorization_code() )
get_playlist_cover_image( playlist_id, authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID for the playlist. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a data frame of results containing playlist cover image information. See the official Spotify Web API Documentation for more information.
Get full details of the items of a playlist owned by a Spotify user.
get_playlist_items( playlist_id, fields = NULL, limit = 100, offset = 0, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_playlist_items( playlist_id, fields = NULL, limit = 100, offset = 0, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
playlist_id |
Required. The Spotify ID for the playlist. |
fields |
Optional. Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned. For example, to get just the playlist’s creation date and album information: |
limit |
Optional. |
offset |
Optional. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Both Public and Private playlists belonging to any user are retrievable on provision of a valid access token. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
Get full details of the tracks of a playlist owned by a Spotify user.
get_playlist_tracks( playlist_id, fields = NULL, limit = 100, offset = 0, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_playlist_tracks( playlist_id, fields = NULL, limit = 100, offset = 0, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
playlist_id |
Required. The Spotify ID for the playlist. |
fields |
Optional. Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned. For example, to get just the playlist’s creation date and album information: |
limit |
Optional. |
offset |
Optional. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Both Public and Private playlists belonging to any user are retrievable on provision of a valid access token. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-current-users-profile/ for more information.
Create a playlist-style listening experience based on seed artists, tracks and genres.
get_recommendations( limit = 20, market = NULL, seed_artists = NULL, seed_genres = NULL, seed_tracks = NULL, max_acousticness = NULL, max_danceability = NULL, max_duration_ms = NULL, max_energy = NULL, max_instrumentalness = NULL, max_key = NULL, max_liveness = NULL, max_loudness = NULL, max_mode = NULL, max_popularity = NULL, max_speechiness = NULL, max_tempo = NULL, max_time_signature = NULL, max_valence = NULL, min_acousticness = NULL, min_danceability = NULL, min_duration_ms = NULL, min_energy = NULL, min_instrumentalness = NULL, min_key = NULL, min_liveness = NULL, min_loudness = NULL, min_mode = NULL, min_popularity = NULL, min_speechiness = NULL, min_tempo = NULL, min_time_signature = NULL, min_valence = NULL, target_acousticness = NULL, target_danceability = NULL, target_duration_ms = NULL, target_energy = NULL, target_instrumentalness = NULL, target_key = NULL, target_liveness = NULL, target_loudness = NULL, target_mode = NULL, target_popularity = NULL, target_speechiness = NULL, target_tempo = NULL, target_time_signature = NULL, target_valence = NULL, authorization = get_spotify_access_token(), include_seeds_in_response = FALSE )
get_recommendations( limit = 20, market = NULL, seed_artists = NULL, seed_genres = NULL, seed_tracks = NULL, max_acousticness = NULL, max_danceability = NULL, max_duration_ms = NULL, max_energy = NULL, max_instrumentalness = NULL, max_key = NULL, max_liveness = NULL, max_loudness = NULL, max_mode = NULL, max_popularity = NULL, max_speechiness = NULL, max_tempo = NULL, max_time_signature = NULL, max_valence = NULL, min_acousticness = NULL, min_danceability = NULL, min_duration_ms = NULL, min_energy = NULL, min_instrumentalness = NULL, min_key = NULL, min_liveness = NULL, min_loudness = NULL, min_mode = NULL, min_popularity = NULL, min_speechiness = NULL, min_tempo = NULL, min_time_signature = NULL, min_valence = NULL, target_acousticness = NULL, target_danceability = NULL, target_duration_ms = NULL, target_energy = NULL, target_instrumentalness = NULL, target_key = NULL, target_liveness = NULL, target_loudness = NULL, target_mode = NULL, target_popularity = NULL, target_speechiness = NULL, target_tempo = NULL, target_time_signature = NULL, target_valence = NULL, authorization = get_spotify_access_token(), include_seeds_in_response = FALSE )
limit |
Optional. The target size of the list of recommended tracks. For seeds with unusually small pools or when highly restrictive filtering is applied, it may be impossible to generate the requested number of recommended tracks. Debugging information for such cases is available in the response. Default: 20. Minimum: 1. Maximum: 100. |
market |
Optional. An ISO 3166-1 alpha-2 country code or the string |
seed_artists |
A character vector of Spotify IDs for seed artists. Up to 5 seed values may be provided in any combination of |
seed_genres |
A character vector of any genres in the set of available genre seeds. Up to 5 seed values may be provided in any combination of |
seed_tracks |
A character vector of Spotify IDs for a seed track. Up to 5 seed values may be provided in any combination of |
max_acousticness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' acousticness. |
max_danceability |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' danceability. |
max_duration_ms |
Optional. Integer indicating a hard ceiling on recommended tracks' duration in milliseconds. |
max_energy |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' energy. |
max_instrumentalness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' instrumentalness. |
max_key |
Optional. Integer ranging from 1 to 12 indicating a hard ceiling on recommended tracks' key. |
max_liveness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' liveness. |
max_loudness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' loudness. |
max_mode |
Optional. Integer ranging from 0 to 1 indicating a hard ceiling on recommended tracks' mode. |
max_popularity |
Optional. Integer ranging between 0 and 100 indicating a hard ceiling on recommended tracks' popularity. |
max_speechiness |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' speechiness. |
max_tempo |
Optional. Numeric value indicating a hard ceiling on recommended tracks' tempo. |
max_time_signature |
Optional. Integer indicating a hard ceiling on recommended tracks' time signature. |
max_valence |
Optional. Numeric value between 0 and 1 indicating a hard ceiling on recommended tracks' valence. |
min_acousticness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' acousticness. |
min_danceability |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' danceability. |
min_duration_ms |
Optional. Integer indicating a hard floor on recommended tracks' duration in milliseconds. |
min_energy |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' energy. |
min_instrumentalness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' instrumentalness. |
min_key |
Optional. Integer ranging from 1 to 12 indicating a hard floor on recommended tracks' key. |
min_liveness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' liveness. |
min_loudness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' loudness. |
min_mode |
Optional. Integer ranging from 0 to 1 indicating a hard floor on recommended tracks' mode. |
min_popularity |
Optional. Integer ranging between 0 and 100 indicating a hard floor on recommended tracks' popularity. |
min_speechiness |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' speechiness. |
min_tempo |
Optional. Numeric value indicating a hard floor on recommended tracks' tempo. |
min_time_signature |
Optional. Integer indicating a hard floor on recommended tracks' time signature. |
min_valence |
Optional. Numeric value between 0 and 1 indicating a hard floor on recommended tracks' valence. |
target_acousticness |
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' acousticness. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_danceability |
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' danceability. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_duration_ms |
Optional. Integer indicating a target value for recommended tracks' duration in milliseconds. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_energy |
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' energy. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_instrumentalness |
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' instrumentalness. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_key |
Optional. Integer ranging from 1 to 12 indicating a target value for recommended tracks' key. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_liveness |
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' liveness. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_loudness |
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' loudness. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_mode |
Optional. Integer ranging from 0 to 1 indicating a target value for recommended tracks' mode. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_popularity |
Optional. Integer ranging between 0 and 100 indicating a target value for recommended tracks' popularity. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_speechiness |
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' speechiness. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_tempo |
Optional. Numeric value indicating a target value for recommended tracks' tempo. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_time_signature |
Optional. Integer indicating a target value for recommended tracks' time signature. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
target_valence |
Optional. Numeric value between 0 and 1 indicating a target value for recommended tracks' valence. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_seeds_in_response |
Optional. Boolean for whether to include seed object in response. Defaults to |
Returns a data frame of results recommendations. See the official Spotify Web API documentation for more information.
## Not run: ## Get new Swedish music get_recommendations(country = 'SE') ## End(Not run)
## Not run: ## Get new Swedish music get_recommendations(country = 'SE') ## End(Not run)
Get Spotify catalog information for a single show identified by their unique Spotify ID.
get_show(id, market = "US", authorization = get_spotify_access_token())
get_show(id, market = "US", authorization = get_spotify_access_token())
id |
The Spotify ID for the show. |
market |
Required. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a data frame of results containing show data. See https://developer.spotify.com/documentation/web-api/reference/shows/get-a-show/ for more information.
Get Spotify catalog information for a single show identified by their unique Spotify ID.
get_shows(ids, market = "US", authorization = get_spotify_access_token())
get_shows(ids, market = "US", authorization = get_spotify_access_token())
ids |
Required. A comma-separated list of the Spotify IDs for the shows. Maximum: 50 IDs. |
market |
Required. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a data frame of results containing show data. See https://developer.spotify.com/documentation/web-api/reference/shows/get-a-show/ for more information.
Get Spotify catalog information for a show's episodes identified by their unique Spotify ID.
get_shows_episodes( id, market = "US", authorization = get_spotify_access_token() )
get_shows_episodes( id, market = "US", authorization = get_spotify_access_token() )
id |
The Spotify ID for the show. |
market |
Required. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
Returns a data frame of results containing the episode data for a show. See https://developer.spotify.com/documentation/web-api/reference/shows/get-shows-episodes/ for more information.
This function creates a Spotify access token.
get_spotify_access_token( client_id = Sys.getenv("SPOTIFY_CLIENT_ID"), client_secret = Sys.getenv("SPOTIFY_CLIENT_SECRET") )
get_spotify_access_token( client_id = Sys.getenv("SPOTIFY_CLIENT_ID"), client_secret = Sys.getenv("SPOTIFY_CLIENT_SECRET") )
client_id |
Defaults to System Environment variable "SPOTIFY_CLIENT_ID" |
client_secret |
Defaults to System Environment variable "SPOTIFY_CLIENT_SECRET" |
Returns an environment with access token data.
## Not run: get_spotify_access_token() ## End(Not run)
## Not run: get_spotify_access_token() ## End(Not run)
This function creates a Spotify access token.
get_spotify_authorization_code( client_id = Sys.getenv("SPOTIFY_CLIENT_ID"), client_secret = Sys.getenv("SPOTIFY_CLIENT_SECRET"), scope = tinyspotifyr::scopes )
get_spotify_authorization_code( client_id = Sys.getenv("SPOTIFY_CLIENT_ID"), client_secret = Sys.getenv("SPOTIFY_CLIENT_SECRET"), scope = tinyspotifyr::scopes )
client_id |
Defaults to System Envioronment variable "SPOTIFY_CLIENT_ID" |
client_secret |
Defaults to System Envioronment variable "SPOTIFY_CLIENT_SECRET" |
scope |
Space delimited string of spotify scopes, found here: https://developer.spotify.com/documentation/general/guides/scopes/. All scopes are selected by default |
Returns an environment with access token data.
## Not run: get_spotify_authorization_code() ## End(Not run)
## Not run: get_spotify_authorization_code() ## End(Not run)
Get Spotify catalog information for a single track identified by its unique Spotify ID.
get_track(id, market = NULL, authorization = get_spotify_access_token())
get_track(id, market = NULL, authorization = get_spotify_access_token())
id |
The Spotify ID for the track. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
Returns a data frame of results containing track data. See https://developer.spotify.com/documentation/web-api/reference/tracks/get-several-tracks/ for more information.
Get a detailed audio analysis for a single track identified by its unique Spotify ID.
get_track_audio_analysis(id, authorization = get_spotify_access_token())
get_track_audio_analysis(id, authorization = get_spotify_access_token())
id |
The Spotify ID for the track. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
Returns a data frame of results containing track audio analysis data. See https://developer.spotify.com/documentation/web-api/reference/tracks/get-audio-analysis/ for more information.
Get audio feature information for a single track identified by its unique Spotify ID.
get_track_audio_features(ids, authorization = get_spotify_access_token())
get_track_audio_features(ids, authorization = get_spotify_access_token())
ids |
Required. A comma-separated list of the Spotify IDs of the tracks. Maximum: 100 IDs. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
Returns a data frame of results containing track audio features data. See https://developer.spotify.com/documentation/web-api/reference/tracks/get-several-audio-features/ for more information.
Get Spotify catalog information for a single track identified by its unique Spotify ID.
get_tracks( ids, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
get_tracks( ids, market = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
ids |
The Spotify ID for the track. |
market |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing track data. See https://developer.spotify.com/documentation/web-api/reference/tracks/get-several-tracks/ for more information.
Get a list of the playlists owned or followed by a Spotify user.
get_user_playlists( user_id, limit = 20, offset = 0, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
get_user_playlists( user_id, limit = 20, offset = 0, authorization = get_spotify_authorization_code(), include_meta_info = FALSE )
user_id |
Required. The user's Spotify user ID. |
limit |
Optional. |
offset |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing user playlist information. See the official Spotify Web API documentation for more information.
Get public profile information about a Spotify user.
get_user_profile(user_id, authorization = get_spotify_access_token())
get_user_profile(user_id, authorization = get_spotify_access_token())
user_id |
Required. The user's Spotify user ID. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
Returns a data frame of results containing user profile information. See https://developer.spotify.com/documentation/web-api/reference/users-profile/get-users-profile/ for more information.
Check if a string matches the pattern of a Spotify URI
is_uri(s)
is_uri(s)
s |
String to check |
Returns a boolean.
Pause playback on the user’s account.
pause_my_playback( device_id = NULL, authorization = get_spotify_authorization_code() )
pause_my_playback( device_id = NULL, authorization = get_spotify_authorization_code() )
device_id |
Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Pitch class notation lookup
pitch_class_lookup
pitch_class_lookup
An object of class character
of length 12.
Returns a character vector.
Remove one or more tracks from a user’s playlist.
remove_tracks_from_playlist( playlist_id, uris, authorization = get_spotify_authorization_code() )
remove_tracks_from_playlist( playlist_id, uris, authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID for the playlist. |
uris |
Optional. A character vector of Spotify track URIs to add. For example |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value. Tracks are removed from playlist.
Reorder or replace one or more items from a user’s playlist.
reorder_replace_playlist_items( playlist_id, uris, authorization = get_spotify_authorization_code() )
reorder_replace_playlist_items( playlist_id, uris, authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID for the playlist. |
uris |
Optional. A character vector of Spotify track URIs to add. For example |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value. Tracks are added or reordered on playlist.
Vector of valid scopes for spotifyr::get_authorization_code()
scopes
scopes
An object of class character
of length 19.
Returns a character vector.
Get Spotify Catalog information about artists, albums, tracks or playlists that match a keyword string. For more information see the official documentation.
search_spotify( q, type = c("album", "artist", "playlist", "track"), market = NULL, limit = 20, offset = 0, include_external = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
search_spotify( q, type = c("album", "artist", "playlist", "track"), market = NULL, limit = 20, offset = 0, include_external = NULL, authorization = get_spotify_access_token(), include_meta_info = FALSE )
q |
Required. |
type |
A character vector of item types to search across. |
market |
Optional. |
limit |
Optional. |
offset |
Optional. |
include_external |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization guide for more details. Defaults to |
include_meta_info |
Optional. Boolean indicating whether to include full result, with meta information such as |
Returns a data frame of results containing search data.
## Not run: search_spotify('radiohead', 'artist') ## End(Not run)
## Not run: search_spotify('radiohead', 'artist') ## End(Not run)
Seeks to the given position in the user’s currently playing track.
seek_to_position( position_ms, device_id = NULL, authorization = get_spotify_authorization_code() )
seek_to_position( position_ms, device_id = NULL, authorization = get_spotify_authorization_code() )
position_ms |
Required. Integer indicating the position in milliseconds to seek to. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song. |
device_id |
Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Set the repeat mode for the user’s playback. Options are repeat-track, repeat-context, and off.
set_my_repeat_mode( state, device_id = NULL, authorization = get_spotify_authorization_code() )
set_my_repeat_mode( state, device_id = NULL, authorization = get_spotify_authorization_code() )
state |
Required. |
device_id |
Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Set the volume for the user’s current playback device.
set_my_volume( volume_percent, device_id = NULL, authorization = get_spotify_authorization_code() )
set_my_volume( volume_percent, device_id = NULL, authorization = get_spotify_authorization_code() )
volume_percent |
Required. Integer. The volume to set. Must be a value from 0 to 100 inclusive. |
device_id |
Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Skips to next track in the user’s queue.
skip_my_playback( device_id = NULL, authorization = get_spotify_authorization_code() )
skip_my_playback( device_id = NULL, authorization = get_spotify_authorization_code() )
device_id |
Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Skips to previous track in the user’s queue.
skip_my_playback_previous( device_id = NULL, authorization = get_spotify_authorization_code() )
skip_my_playback_previous( device_id = NULL, authorization = get_spotify_authorization_code() )
device_id |
Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Skips to previous track in the user’s queue.
start_my_playback( device_id = NULL, context_uri = NULL, uris = NULL, offset = NULL, position_ms = NULL, authorization = get_spotify_authorization_code() )
start_my_playback( device_id = NULL, context_uri = NULL, uris = NULL, offset = NULL, position_ms = NULL, authorization = get_spotify_authorization_code() )
device_id |
Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target. |
context_uri |
Optional. String of the Spotify URI of the context to play. Valid contexts are albums, artists, playlists. Example |
uris |
Optional. A character vector of the Spotify track URIs to play. For example: |
offset |
Optional. A named list indicating from where the context playback should start. Only available when |
position_ms |
Optional. Integer indicating from what position to start playback. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
tinyspotifyr
packageA Quick and Easy Wrapper for Spotify's Web API
See the README on GitHub
Toggle shuffle on or off for user’s playback.
toggle_my_shuffle( state, device_id = NULL, authorization = get_spotify_authorization_code() )
toggle_my_shuffle( state, device_id = NULL, authorization = get_spotify_authorization_code() )
state |
Required. |
device_id |
Optional. The id of the device this command is targeting. If not supplied, the user’s currently active device is the target. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Transfer playback to a new device and determine if it should start playing.
transfer_my_playback( device_ids, play = FALSE, authorization = get_spotify_authorization_code() )
transfer_my_playback( device_ids, play = FALSE, authorization = get_spotify_authorization_code() )
device_ids |
Required. A character vector containing the ID of the device this on which playback should be started/transferred. Note: only a single device_id is currently supported. |
play |
Optional. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Remove the current user as a follower of a playlist.
unfollow_playlist( playlist_id, authorization = get_spotify_authorization_code() )
unfollow_playlist( playlist_id, authorization = get_spotify_authorization_code() )
playlist_id |
Required. The Spotify ID of the playlist that is to be no longer followed. |
authorization |
Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to |
No return value.
Check API result for error codes
verify_result(res)
verify_result(res)
res |
API result ot check |
No return value.