Gets video information by video ID (one or more), user ID (one only), or game ID (one only). The following param description is from the Twitch API docs. Last Updated on 2020-11-22.
get_videos(
id = NULL,
user_id = NULL,
game_id = NULL,
after = NULL,
before = NULL,
first = NULL,
language = NULL,
period = NULL,
sort = NULL,
type = NULL,
clean_json = TRUE
)
A string. Required (Read Documentation for more information). ID of the video being queried. Limit: 100. If this is specified, you cannot use any of the optional query parameters below.
A string. Required (Read Documentation for more information). ID of the user who owns the video. Limit 1.
A string. Required (Read Documentation for more information). ID of the game the video is of. Limit 1.
A string. Optional. Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
A string. Optional. Cursor for backward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
A string. Optional. Number of values to be returned when getting videos by user or game ID. Limit: 100. Default: 20.
A string. Optional. Language of the video being queried. Limit: 1.
A string. Optional. Period during which the video was created. Valid values: "all", "day", "week", "month". Default: "all".
A string. Optional. Sort order of the videos. Valid values: "time", "trending", "views". Default: "time".
A string. Optional. ype of video. Valid values: "all", "upload", "archive", "highlight". Default: "all".
A logical. If TRUE
, clean and tidy the data. If FALSE
, return the result of httr::content
.
A tibble data frame of videos data.
Other Videos:
get_all_videos()
if (FALSE) {
library(twitchr)
twitch_auth()
# Get a user's first 20 videos
videos <- get_videos(user_id = 613890167)
}