Retrieve a the last limit items a user has watched, including the method by
which it was logged (e.g. scrobble or checkin).
Source
user_history() wraps endpoint /users/:id/history/:type/:item_id?start_at=,end_at=.
Arguments
- user
character(1): Target username (orslug). Defaults to"me", the OAuth user. Can also be of length greater than 1, in which case the function is called on alluservalues separately and the result is combined.- type
character(1): Either"shows"or"movies". For season/episode-specific functions, valuesseasonsorepisodesare also allowed.- item_id
character(1): The ID of the item you're looking for.- limit
integer(1) [10L]: Number of items to return. Must be greater than0and will be coerced viaas.integer().- start_at, end_at
character(1): A time-window to filter by. Must be coercible to a datetime object of classPOSIXct. See ISOdate for further information.- extended
character(1): Either"min"(API default) or"full". The latter returns more variables and should generally only be used if required. Seevignette("tRakt")for more details.
Value
A tibble(). If the function has a limit parameter
(defaulting to 10), this will be the (maximum) number of rows of the tibble.
If there are no results (or the API is unreachable), an empty tibble() is returned.
Details
This function wraps the API method
/users/:id/history/:type.
Note
For type = "shows", the
original output contains a nested object with show and episode data,
which are unnested by this function. Due to duplicate variable names,
all episode-related variables are prefixed with episode_. This results in the
episode number having the name episode_episode, which is quite silly. Sorry.
See also
Other user data:
user_collection(),
user_comments(),
user_likes(),
user_network(),
user_profile(),
user_ratings(),
user_stats(),
user_watched(),
user_watchlist()
