Learn R Programming

tuber (version 0.8.0)

get_comment_threads: Get Comments Threads

Description

Get Comments Threads

Usage

get_comment_threads(filter = NULL, part = "snippet", text_format = "html",
  simplify = TRUE, max_results = 100, page_token = NULL, ...)

Arguments

filter
string; Required. named vector of length 1 potential names of the entry in the vector: video_id: video ID. channel_id: channel ID. thread_id: comma-separated list of comment thread IDs threads_related_to_channel: channel ID.
part
Comment resource requested. Required. Comma separated list of one or more of the following: id, snippet. e.g., "id, snippet", "id", etc. Default: snippet.
text_format
Data Type: Character. Default is "html". Only takes "html" or "plainText". Optional.
simplify
Data Type: Boolean. Default is TRUE. If TRUE, the function returns a data frame. Else a list with all the information returned.
max_results
Maximum number of items that should be returned. Integer. Optional. Can be between 20 and 100. Default is 100.
page_token
Specific page in the result set that should be returned. Optional.
Additional arguments passed to tuber_GET.

Value

Nested named list. The entry items is a list of comments along with meta information. Within each of the items is an item snippet which has an item topLevelComment$snippet$textDisplay that contains the actual comment.

If simplify is TRUE, a data.frame with the following columns: authorDisplayName, authorProfileImageUrl, authorChannelUrl, authorChannelId.value, videoId, textDisplay, canRate, viewerRating, likeCount, publishedAt, updatedAt

References

https://developers.google.com/youtube/v3/docs/commentThreads/list

Examples

Run this code
## Not run: ------------------------------------
# 
# # Set API token via yt_oauth() first
# 
# get_comment_threads(filter = c(video_id="N708P-A45D0"))
## ---------------------------------------------

Run the code above in your browser using DataLab