Skip to contents

Get all comments of a thing

Usage

movies_comments(
  id,
  sort = c("newest", "oldest", "likes", "replies"),
  extended = c("min", "full"),
  limit = 10L
)

shows_comments(
  id,
  sort = c("newest", "oldest", "likes", "replies"),
  extended = c("min", "full"),
  limit = 10L
)

seasons_comments(
  id,
  season = 1L,
  sort = c("newest", "oldest", "likes", "replies"),
  extended = c("min", "full"),
  limit = 10L
)

episodes_comments(
  id,
  season = 1L,
  episode = 1L,
  sort = c("newest", "oldest", "likes", "replies"),
  extended = c("min", "full"),
  limit = 10L
)

Source

movies_comments() wraps endpoint movies/:id/comments/:sort.

shows_comments() wraps endpoint shows/:id/comments/:sort.

seasons_comments() wraps endpoint shows/:id/seasons/:season/comments/:sort.

episodes_comments() wraps endpoint shows/:id/seasons/:season/episodes/:episode/comments/:sort.

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.

sort

character(1) ["newest"]: Comment sort order, one of "newest", "oldest", "likes" or "replies".

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.

limit

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

season, episode

integer(1) [1L]: The season and eisode number. If longer, e.g. 1:5, the function is vectorized and the output will be combined. This may result in a lot of API calls. Use wisely.

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.

Functions

  • movies_comments(): Get comments for a movie

  • shows_comments(): Get comments for a movie

  • seasons_comments(): Get comments for a season

  • episodes_comments(): Get comments for an episode

Examples

if (FALSE) { # \dontrun{
movies_comments(193972)
shows_comments(46241, sort = "likes")
seasons_comments(46241, season = 1, sort = "likes")
episodes_comments(46241, season = 1, episode = 2, sort = "likes")
} # }