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
)

Arguments

id

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.

user_id

A string. Required (Read Documentation for more information). ID of the user who owns the video. Limit 1.

game_id

A string. Required (Read Documentation for more information). ID of the game the video is of. Limit 1.

after

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.

before

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.

first

A string. Optional. Number of values to be returned when getting videos by user or game ID. Limit: 100. Default: 20.

language

A string. Optional. Language of the video being queried. Limit: 1.

period

A string. Optional. Period during which the video was created. Valid values: "all", "day", "week", "month". Default: "all".

sort

A string. Optional. Sort order of the videos. Valid values: "time", "trending", "views". Default: "time".

type

A string. Optional. ype of video. Valid values: "all", "upload", "archive", "highlight". Default: "all".

clean_json

A logical. If TRUE, clean and tidy the data. If FALSE, return the result of httr::content.

Value

A tibble data frame of videos data.

See also

Other Videos: get_all_videos()

Examples

if (FALSE) {
library(twitchr)

twitch_auth()

# Get a user's first 20 videos
videos <- get_videos(user_id = 613890167)
}