user_list_items: Get a user's list's items

View source: R/user_list_items.R

user_list_itemsR Documentation

Get a user's list's items

Description

Get a user's list's items

Usage

user_list_items(
  user = getOption("trakt_username"),
  list_id,
  type = NULL,
  extended = c("min", "full")
)

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.

list_id

The list identifier, either trakt ID or slug of the list. Can be optained via the website (URL slug) or e.g. user_lists.

type

character(1) [NULL]: If not NULL, only items of that media type are returned. Possible values are "movie", "show", "season", "episode", "person".

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.

Source

user_list_items() wraps endpoint users/:id/lists/:list_id/items/:type.

See Also

Other list methods: lists_popular(), media_lists, user_list(), user_list_comments(), user_lists()

Examples

## Not run: 
# A large list with various media types
# All items
user_list_items("sp1ti", list_id = "5615781", extended = "min")

# Movies only
user_list_items("sp1ti", list_id = "5615781", extended = "min", type = "movie")

# Shows...
user_list_items("sp1ti", list_id = "5615781", extended = "min", type = "shows")

# Only seasons
user_list_items("sp1ti", list_id = "5615781", extended = "min", type = "season")

# Only episodes
user_list_items("sp1ti", list_id = "5615781", extended = "min", type = "episodes")

## End(Not run)

jemus42/tRakt documentation built on May 4, 2024, 9:21 a.m.