seasons_summary: Get a show's seasons

View source: R/seasons_summary.R

seasons_summaryR Documentation

Get a show's seasons

Description

Get details for a show's seasons, e.g. how many seasons there are and how many epsiodes each season has. With episodes == TRUE and extended == "full", this function is also suitable to retrieve all episode data for all seasons of a show with just a single API call.

Usage

seasons_summary(
  id,
  episodes = FALSE,
  drop_specials = TRUE,
  drop_unaired = TRUE,
  extended = c("min", "full")
)

Arguments

id

character(1): The ID of the item requested. Preferably the trakt ID (e.g. 1429). Other options are the trakt.tv slug (e.g. "the-wire") or imdb ID (e.g. "tt0306414"). Can also be of length greater than 1, in which case the function is called on all id values separately and the result is combined. See vignette("finding-things") for more details.

episodes

logical(1) [FALSE]: If TRUE, all episodes for each season are appended as a list-column, with the amount of variables depending on extended.

drop_specials

logical(1) [TRUE]: Special episodes (season 0) are dropped

drop_unaired

logical(1) [TRUE]: Seasons without aired episodes are dropped. Only works if extended is "full".

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

seasons_summary() wraps endpoint shows/:id/seasons.

See Also

Other season data: media_comments, media_lists, media_people, media_ratings(), media_stats(), seasons_season()

Other episode data: episodes_summary(), media_comments, media_lists, media_people, media_ratings(), media_stats(), media_translations, media_watching, seasons_season(), shows_next_episode()

Other summary methods: comments_comment(), episodes_summary(), movies_summary(), people_summary(), shows_summary(), user_profile()

Examples

# Get just the season numbers and their IDs
seasons_summary("breaking-bad", extended = "min")
## Not run: 
# Get season numbers, ratings, votes, titles and other metadata as well as
# a list-column containing all episode data
seasons_summary("utopia", extended = "full", episodes = TRUE)

## End(Not run)

jemus42/tRakt documentation built on April 19, 2024, 3:25 a.m.