add_latest_to_playlist: Add the latest episode of a podcast to a user’s playlist.

Description Usage Arguments Value

View source: R/playlists.R

Description

Add the latest episode of a podcast to a user’s playlist.

Usage

1
2
3
4
5
6
7
add_latest_to_playlist(
  playlist_id,
  uri,
  position = NULL,
  market = "US",
  authorization = get_spotify_authorization_code()
)

Arguments

playlist_id

Required. The Spotify ID for the playlist.

uri

The show Spotify URIs to add. For example
uris = "spotify:show:6BRSvIBNQnB68GuoXJRCnQ", "spotify:show:1x1n9iWJLYNXYdDgLk5yQu"

position

Optional. Integer indicating the position to insert the tracks, a zero-based index. For example, to insert the tracks in the first position: position = 0; to insert the tracks in the third position: position = 2 . If omitted, the tracks will be appended to the playlist. Tracks are added in the order they are listed in the query string or request body.

market

Required.
An ISO 3166-1 alpha-2 country code or the string "from_token". Provide this parameter if you want to apply Track Relinking

authorization

Required. A valid access token from the Spotify Accounts service. See the Web API authorization Guide for more details. Defaults to spotifyr::get_spotify_authorization_code(). The access token must have been issued on behalf of the current user.
Adding tracks to the current user’s public playlists requires authorization of the playlist-modify-public scope; adding tracks to the current user’s private playlist (including collaborative playlists) requires the playlist-modify-private scope. See Using Scopes.

Value

No return value. Tracks are added to playlist.


tinyspotifyr documentation built on Feb. 24, 2021, 5:09 p.m.