Gets clip information by clip ID (one or more), broadcaster ID (one only), or game ID (one only). Note: The clips service returns a maximum of 1000 clips. For a query to be valid, id (one or more), broadcaster_id, or game_id must be specified. You may specify only one of these parameters.

get_clips(
  broadcaster_id = NULL,
  game_id = NULL,
  id = NULL,
  after = NULL,
  before = NULL,
  ended_at = NULL,
  first = NULL,
  started_at = NULL,
  clean_json = TRUE
)

Arguments

broadcaster_id

A numeric. ID of the broadcaster for whom clips are returned. The number of clips returned is determined by the first query-string parameter (default: 20). Results are ordered by view count.

game_id

A numeric. ID of the game for which clips are returned. The number of clips returned is determined by the first query-string parameter (default: 20). Results are ordered by view count.

id

A numeric. ID of the clip being queried. Limit: 100.

after

A character. Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. This applies only to queries specifying broadcaster_id or game_id. The cursor value specified here is from the pagination response field of a prior query.

before

A character. Cursor for backward pagination: tells the server where to start fetching the next set of results, in a multi-page response. This applies only to queries specifying broadcaster_id or game_id. The cursor value specified here is from the pagination response field of a prior query.

ended_at

A character. Ending date/time for returned clips, in RFC3339 format. (Note that the seconds value is ignored.) If this is specified, started_at also must be specified; otherwise, the time period is ignored.

first

A numeric. Maximum number of objects to return. Maximum: 100. Default: 20.

started_at

A character. Starting date/time for returned clips, in RFC3339 format. (The seconds value is ignored.) If this is specified, ended_at also should be specified; otherwise, the ended_at date/time will be 1 week after the started_at value.

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 clip data.

See also

Other Clips: get_all_clips()

Examples

if (FALSE) {
twitch_auth()

user <- get_users(login = "KowAndToilet")

clips <- get_clips(broadcaster_id = user$id)
}