Skip to contents

For private users, an authenticated request is required.

Usage

user_watched(
  user = getOption("trakt_username"),
  type = c("shows", "movies"),
  noseasons = TRUE,
  extended = c("min", "full")
)

Source

user_watched() wraps endpoint users/:id/watched/:type.

Arguments

user

character(1): Target username (or slug). Defaults to getOption("trakt_username"). Can also be of length greater than 1, in which case the function is called on all user values separately and the result is combined.

type

character(1): Either "shows" or "movies". For season/episode-specific functions, values seasons or episodes are also allowed.

noseasons

logical(1) [TRUE]: Only for type = "show": Exclude detailed season data from output. This is advisable if you do not need per-episode data and want to be nice to the API.

extended

character(1): Either "min" (API default) or "full". The latter returns more variables and should generally only be used if required. See vignette("finding-things") 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.

Examples

if (FALSE) {
# Use noseasons = TRUE to avoid receiving detailed season/episode data
user_watched(user = "sean", noseasons = TRUE)
}