Learn R Programming

tuber (version 2.0.0)

list_popular_videos: List Most-Popular Videos

Description

Retrieves the `mostPopular` videos chart.

Usage

list_popular_videos(
  region_code = NULL,
  category_id = NULL,
  max_results = 50,
  part = c("snippet", "statistics"),
  language = NULL,
  page_token = NULL,
  simplify = TRUE,
  auth = "key",
  ...
)

Value

A data frame when `simplify = TRUE`; otherwise a videos-list response.

Arguments

region_code

Optional ISO 3166-1 alpha-2 content-region code.

category_id

Optional video-category ID.

max_results

Maximum total number of videos to return.

part

Character vector of video resource parts.

language

Optional language code for localized text.

page_token

Optional page token at which to start.

simplify

If `TRUE`, return a data frame; otherwise return the raw API response with all collected items.

auth

Authentication method, `"key"` or `"token"`.

...

Additional arguments passed to [tuber_GET()].

References

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

Examples

Run this code
if (FALSE) {
list_popular_videos(region_code = "US", max_results = 10)
}

Run the code above in your browser using DataLab