Get a single comment
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 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("tRakt")
for more details.- extended
character(1)
: Either"min"
(API default) or"full"
. The latter returns more variables and should generally only be used if required. Seevignette("tRakt")
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.
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 × 18
#> 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
#> # ℹ 12 more variables: updated_at <dttm>, replies <int>, likes <int>,
#> # user_rating <int>, 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 × 18
#> 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
#> # ℹ 12 more variables: updated_at <dttm>, replies <int>, likes <int>,
#> # user_rating <int>, 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")
} # }