get_user_playlists: Get List of User Playlists

View source: R/playlists.R

get_user_playlistsR Documentation

Get List of User Playlists

Description

Get a list of the playlists owned or followed by a Spotify user.

Usage

get_user_playlists(
  user_id,
  limit = 20,
  offset = 0,
  authorization = get_spotify_authorization_code(),
  include_meta_info = FALSE
)

Arguments

user_id

Required. The user's Spotify user ID.

limit

Optional.
Maximum number of playlists to return.
Default: 20
Minimum: 1
Maximum: 50

offset

Optional.
The index of the first playlist to return.
Default: 0 (the first object). Maximum offset: 100,000. Use with limit to get the next set of playlists.

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.
Private playlists are only retrievable for the current user and requires the playlist-read-private scope to have been authorized by the user. Note that this scope alone will not return collaborative playlists, even though they are always private.
Collaborative playlists are only retrievable for the current user and requires the playlist-read-collaborative scope to have been authorized by the user.

include_meta_info

Optional. Boolean indicating whether to include full result, with meta information such as "total", and "limit". Defaults to FALSE.

Value

Returns a data frame of results containing user playlist information. See the official Spotify Web API documentation for more information.

See Also

Other playlist functions: add_tracks_to_playlist(), change_playlist_details(), check_users_following(), create_playlist(), get_my_playlists(), get_playlist(), remove_tracks_from_playlist(), tidy()


spotifyr documentation built on Oct. 30, 2024, 9:13 a.m.