user_history | R Documentation |
Retrieve a the last limit
items a user has watched, including the method by
which it was logged (e.g. scrobble or checkin).
user_history(
user = getOption("trakt_username"),
type = c("shows", "movies"),
limit = 10L,
start_at = NULL,
end_at = NULL,
extended = c("min", "full")
)
user |
|
type |
|
limit |
|
start_at , end_at |
|
extended |
|
This function wraps the API method
/users/:id/history/:type
.
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.
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.
user_history()
wraps endpoint users/:id/history/:type/:item_id?start_at=&end_at=.
Other user data:
user_collection()
,
user_comments()
,
user_likes()
,
user_network()
,
user_profile()
,
user_ratings()
,
user_stats()
,
user_watched()
,
user_watchlist()
## Not run:
# Shows user "jemus42" watched around christmas 2016
user_history(
user = "jemus42", type = "shows", limit = 5,
start_at = "2015-12-24", end_at = "2015-12-28"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.