Skip to contents

Get similiar(ish) shows

Usage

shows_related(id, limit = 10L, extended = "min")

Source

shows_related() wraps endpoint /shows/:id/related.

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("tRakt") for more details.

limit

integer(1) [10L]: Number of items to return. Must be greater than 0 and will be coerced via as.integer().

extended

character: Level of detail for the API response.

  • "min" (default): Minimal info (title, year, IDs). Omits the extended query param.

  • "full": Complete info including overview, ratings, runtime, etc.

  • "images": Minimal info plus image URLs (returned as a list-column).

  • "full,images": Complete info plus images.

  • "metadata": Collection endpoints only; adds video/audio metadata.

Multiple values can be combined as a comma-separated string (e.g. "full,images") or a character vector (e.g. c("full", "images")).

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

shows_related("breaking-bad", limit = 5)
#> # A tibble: 5 × 11
#>   related_to   year title aired_episodes imdb  slug  tmdb  tvdb  trakt plex_guid
#>   <chr>       <int> <chr>          <int> <chr> <chr> <chr> <chr> <chr> <chr>    
#> 1 breaking-b…  2015 Mr. …             45 tt41… mr-r… 62560 2895… 93720 5d9c0867…
#> 2 breaking-b…  2015 Bett…             63 tt30… bett… 60059 2731… 59660 5d9c0825…
#> 3 breaking-b…  2013 Peak…             36 tt24… peak… 60574 2709… 60158 5d9c0835…
#> 4 breaking-b…  2014 Fargo             51 tt28… fargo 60622 2696… 60203 5d9c0838…
#> 5 breaking-b…  2015 Narc…             30 tt27… narc… 63351 2826… 94630 5d9c0803…
#> # ℹ 1 more variable: plex_slug <chr>