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")
)
Source
seasons_summary()
wraps endpoint shows/:id/seasons.
Arguments
- id
character(1)
: The ID of the item requested. Preferably thetrakt
ID (e.g.1429
). Other options are the trakt.tvslug
(e.g."the-wire"
) orimdb
ID (e.g."tt0306414"
). Can also be of length greater than 1, in which case the function is called on allid
values separately and the result is combined. Seevignette("finding-things")
for more details.- episodes
logical(1) [FALSE]
: IfTRUE
, all episodes for each season are appended as a list-column, with the amount of variables depending onextended
.- drop_specials
logical(1) [TRUE]
: Special episodes (season 0) are dropped- drop_unaired
logical(1) [TRUE]
: Seasons without aired episodes are dropped. Only works ifextended
is"full"
.- extended
character(1)
: Either"min"
(API default) or"full"
. The latter returns more variables and should generally only be used if required. Seevignette("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.
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")
#> # A tibble: 5 × 4
#> season trakt tvdb tmdb
#> <int> <chr> <chr> <chr>
#> 1 1 3950 30272 3572
#> 2 2 3951 40719 3573
#> 3 3 3952 171641 3575
#> 4 4 3953 297361 3576
#> 5 5 3954 490110 3578
if (FALSE) { # \dontrun{
# 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)
} # }