Get a single comment
Usage
comments_comment(id, extended = "min")
comments_replies(id, extended = "min")
comments_likes(id, extended = "min")
comments_item(id, extended = "min")Source
comments_comment() wraps endpoint /comments/:id.
comments_replies() wraps endpoint /comments/:id/replies.
comments_likes() wraps endpoint /comments/:id/likes.
comments_item() wraps endpoint /comments/:id/item.
Arguments
- id
character(1): The ID of the item requested. Preferably thetraktID (e.g.1429). Other options are the trakt.tvslug(e.g."the-wire") orimdbID (e.g."tt0306414"). Can also be of length greater than 1, in which case the function is called on allidvalues separately and the result is combined. Seevignette("tRakt")for more details.- extended
character: Level of detail for the API response."min"(default): Minimal info (title, year, IDs). Omits theextendedquery 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.
Functions
comments_replies(): Get a comment's repliescomments_likes(): Get users who liked a comment.comments_item(): Get the media item attached to the comment.
See also
Other comment methods:
comments_trending(),
comments_updates(),
media_comments,
user_comments(),
user_list_comments()
Other summary methods:
episodes_summary(),
movies_summary(),
people_summary(),
seasons_summary(),
shows_summary(),
user_profile()
Other comment methods:
comments_trending(),
comments_updates(),
media_comments,
user_comments(),
user_list_comments()
Other comment methods:
comments_trending(),
comments_updates(),
media_comments,
user_comments(),
user_list_comments()
Other comment methods:
comments_trending(),
comments_updates(),
media_comments,
user_comments(),
user_list_comments()
Examples
# A single comment
comments_comment("236397")
#> # A tibble: 1 × 19
#> id comment spoiler review parent_id created_at
#> <int> <chr> <lgl> <lgl> <int> <dttm>
#> 1 236397 All the gun inflicted dea… FALSE FALSE 0 2019-06-09 21:33:00
#> # ℹ 13 more variables: updated_at <dttm>, replies <int>, likes <int>,
#> # user_rating <int>, language <chr>, username <chr>, private <lgl>,
#> # deleted <lgl>, user_name <chr>, vip <lgl>, vip_ep <lgl>, director <lgl>,
#> # user_slug <chr>
# Multiple comments
comments_comment(c("236397", "112561"))
#> # A tibble: 2 × 19
#> id comment spoiler review parent_id created_at
#> <int> <chr> <lgl> <lgl> <int> <dttm>
#> 1 236397 All the gun inflicted dea… FALSE FALSE 0 2019-06-09 21:33:00
#> 2 112561 Seriously though what the… FALSE FALSE 0 2017-01-31 17:48:59
#> # ℹ 13 more variables: updated_at <dttm>, replies <int>, likes <int>,
#> # user_rating <int>, language <chr>, username <chr>, private <lgl>,
#> # deleted <lgl>, user_name <chr>, vip <lgl>, vip_ep <lgl>, director <lgl>,
#> # user_slug <chr>
if (FALSE) { # \dontrun{
comments_replies("236397")
} # }
if (FALSE) { # \dontrun{
comments_likes("236397")
} # }
if (FALSE) { # \dontrun{
# A movie
comments_item("236397")
comments_item("236397", extended = "full")
# A show
comments_item("120768")
comments_item("120768", extended = "full")
# A season
comments_item("140265")
comments_item("140265", extended = "full")
# An episode
comments_item("136632")
comments_item("136632", extended = "full")
} # }
