user-methods: User Methods

user-methodsR Documentation

User Methods

Description

These functions retrieve information about Last.fm users. Users are identified by username:

  • raw_user_get_recent_tracks() retrieve a list of recent tracks scrobbled by the user.

  • raw_user_get_top_albums(), raw_user_get_top_artists(), and raw_user_get_top_tracks() retrieve lists of top albums, artists, and tracks, respectively, played by the user.

  • raw_user_get_friends() retrieves a list of user friends.

  • raw_user_get_info() retrieves information about the user.

  • raw_user_get_loved_tracks() gets a list of loved tracks by the user.

  • raw_user_get_personal_tags() gets a list of the user's personal tags.

  • raw_user_get_top_tags() get a list of top objects tagged by the user.

Usage

raw_user_get_recent_tracks(
  username,
  from = NULL,
  to = NULL,
  extended = 0,
  .start_page = 1,
  .n_pages = NULL
)

user_get_recent_tracks(
  username,
  from = NULL,
  to = NULL,
  extended = 0,
  .start_page = 1,
  .n_pages = NULL
)

raw_user_get_top_albums(
  username,
  period = "7day",
  .start_page = 1,
  .n_pages = NULL
)

user_get_top_albums(
  username,
  period = "7day",
  .start_page = 1,
  .n_pages = NULL
)

raw_user_get_top_artists(
  username,
  period = "7day",
  .start_page = 1,
  .n_pages = NULL
)

user_get_top_artists(
  username,
  period = "7day",
  .start_page = 1,
  .n_pages = NULL
)

raw_user_get_top_tracks(
  username,
  period = "7day",
  .start_page = 1,
  .n_pages = NULL
)

user_get_top_tracks(
  username,
  period = "7day",
  .start_page = 1,
  .n_pages = NULL
)

raw_user_get_friends(
  username,
  recent_tracks = TRUE,
  .start_page = 1,
  .n_pages = NULL
)

raw_user_get_info(username = NULL, .page = 1)

raw_user_get_loved_tracks(username, .start_page = 1, .n_pages = NULL)

raw_user_get_personal_tags(
  username,
  tag,
  tagging_type,
  .start_page = 1,
  .n_pages = NULL
)

raw_user_get_top_tags(username, .page = 1)

Arguments

username

The username as a string

from

(Optional) Beginning timestamp of a range - only display scrobbles after this time.

to

(Optional) End timestamp of a range - only display scrobbles before this time.

extended

(Optional) Whether to include extended data in each artist, and whether or not the user has loved each track.

.start_page

The page to start pulling from, by default starts from the 1st page

.n_pages

The total number of pages to pull. If no value is provided, all pages are retrieved.

period

(Optional) The time period to aggregate tracks/albums/artists over as a string. One of overall, 7day, 1month, 3month, 6month, 12month. 7day by default.

recent_tracks

(Optional) Whether to include recent tracks fro friends in the response

.page

Page to query, by default query the first page

tag

The tag you're interested in.

tagging_type

The objects on which the tags were applied as a string

Value

  • raw_user_get_info() and raw_user_get_top_tags() return a single lastfm object.

  • All other raw functions return a list of lastfm objects

  • All tidy functions return a tibble


bkkkk/lastfmr documentation built on Sept. 4, 2022, 7:03 a.m.