Gets view count, like count, comment count and other statistics for a YouTube video.
For unlisted videos, you must use OAuth authentication with the channel owner's credentials.
Usage
get_stats(video_id = NULL, ...)
Arguments
- video_id
Character. Id of the video. Required.
- ...
Additional arguments passed to tuber_GET
.
Value
list with 6 elements: id, viewCount, likeCount,
dislikeCount, favoriteCount, commentCount
Examples
if (FALSE) { # \dontrun{
# Set API token via yt_oauth() first
get_stats(video_id="N708P-A45D0")
# For unlisted videos, must authenticate as channel owner:
# yt_oauth("your_client_id", "your_client_secret")
# get_stats(video_id="your_unlisted_video_id")
} # }