Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_my_recently_played

Get Current User's Recently Played Tracks


Description

Get Current User's Recently Played Tracks

Usage

get_my_recently_played(
  limit = 20,
  after = NULL,
  before = NULL,
  authorization = get_spotify_authorization_code(),
  include_meta_info = FALSE
)

Arguments

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 after is specified, before must not be specified.

before

Optional. A Unix timestamp in milliseconds. Returns all items before (but not including) this cursor position. If before is specified, after must not be specified.

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_access_token(). The access token must have been issued on behalf of the current user.

include_meta_info

Optional. Boolean indicating whether to include full result, with meta information such as "before", "after", and "limit". Defaults to FALSE. The access token must have the user-read-recently-played scope authorized in order to read the user's recently played tracks.

Value

Returns a list or data frame of results containing the most recently played tracks for the current user.

See Also


spotifyr

R Wrapper for the 'Spotify' Web API

v2.2.1
MIT + file LICENSE
Authors
Charlie Thompson [aut], Daniel Antal [aut, cre] (<https://orcid.org/0000-0001-7513-6760>), Josiah Parry [aut] (<https://orcid.org/0000-0001-9910-865X>), Donal Phipps [aut], Tom Wolff [aut]
Initial release
2021-06-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.