EVOLUTION-MANAGER
Edit File: add_tracks_to_playlist.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Add Tracks to User’s Playlist</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for add_tracks_to_playlist {spotifyr}"><tr><td>add_tracks_to_playlist {spotifyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Add Tracks to User’s Playlist</h2> <h3>Description</h3> <p>Add one or more tracks to a user’s playlist. </p> <h3>Usage</h3> <pre> add_tracks_to_playlist( playlist_id, uris, position = NULL, authorization = get_spotify_authorization_code() ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>playlist_id</code></td> <td> <p>Required. The <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify ID</a> for the playlist.</p> </td></tr> <tr valign="top"><td><code>uris</code></td> <td> <p>Optional. A character vector of <a href="https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids">Spotify track URIs</a> to add. For example: <br /> uris = c("61H97kuKIpi6kJQRnUEIlh", "2q6vlgBJ432KeZZNt2ZZBV")<br /> A maximum of 100 tracks can be added in one request. The uris will be formed as uris = c("spotify If you have the <code>"spotify:track:"</code> preffix in your vector it will not be duplicated, otherwise it will be added.</p> </td></tr> <tr valign="top"><td><code>position</code></td> <td> <p>Optional. Integer indicating the position to insert the tracks, a zero-based index. For example, to insert the tracks in the first position: <code>position = 0</code>; to insert the tracks in the third position: <code>position = 2</code>. 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.</p> </td></tr> <tr valign="top"><td><code>authorization</code></td> <td> <p>Required. A valid access token from the Spotify Accounts service. See the <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/">Web API authorization Guide</a> for more details. Defaults to <code>spotifyr::get_spotify_authorization_code()</code>. The access token must have been issued on behalf of the current user. <br /> Adding tracks to the current user’s public playlists requires authorization of the <code>playlist-modify-public</code> scope; adding tracks to the current user’s private playlist (including collaborative playlists) requires the <code>playlist-modify-private</code> scope. See <a href="https://developer.spotify.com/documentation/general/guides/authorization-guide/#list-of-scopes">Using Scopes</a>.</p> </td></tr> </table> <h3>Value</h3> <p>The response from the Spotify Web API on the <code>POST</code> request, with a meaningful error message if the operation was not successful. </p> <h3>See Also</h3> <p>Other playlist functions: <code><a href="change_playlist_details.html">change_playlist_details</a>()</code>, <code><a href="check_users_following.html">check_users_following</a>()</code>, <code><a href="create_playlist.html">create_playlist</a>()</code>, <code><a href="get_my_playlists.html">get_my_playlists</a>()</code>, <code><a href="get_playlist.html">get_playlist</a>()</code>, <code><a href="get_user_playlists.html">get_user_playlists</a>()</code>, <code><a href="remove_tracks_from_playlist.html">remove_tracks_from_playlist</a>()</code>, <code><a href="tidy.html">tidy</a>()</code> </p> <hr /><div style="text-align: center;">[Package <em>spotifyr</em> version 2.2.3 <a href="00Index.html">Index</a>]</div> </body></html>