get_streams: Get Streams Gets information about active streams.

View source: R/get_streams.R

get_streamsR Documentation

Get Streams Gets information about active streams.

Description

Get Streams Gets information about active streams.

Usage

get_streams(
  first = 20,
  after = NULL,
  before = NULL,
  community_id = NULL,
  game_id = NULL,
  language = NULL,
  type = NULL,
  user_id = NULL,
  user_login = NULL
)

Arguments

first

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

after

Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response.

before

Cursor for backward pagination: tells the server where to start fetching the next set of results, in a multi-page response. (Do not use, not working due to API issue last checked on 27/12/2017

community_id

Returns streams in a specified community ID. You can specify up to 100 IDs.

game_id

Returns streams broadcasting a specified game ID. You can specify up to 100 IDs.

language

Stream language. You can specify up to 100 languages.

type

Stream type: "all", "live", "vodcast". Default: "all".

user_id

Returns streams broadcast by one or more specified user IDs. You can specify up to 100 IDs.

user_login

Returns streams broadcast by one or more specified user login names. You can specify up to 100 names.

Details

Streams are returned sorted by number of current viewers, in descending order. Across multiple pages of results, there may be duplicate or missing streams, as viewers join and leave streams.

Because the query only returns up to 100 elements, you need to use the pagination parameters if you need more than 100 results. For example, if you want the first 150 streams, you need to query with first=100 and call it again with first=50 and pagination=X, where X is the pagination marker returned in the first call.

Value

A list with "data" (a data frame) and a "pagination" cursor.

References

https://dev.twitch.tv/docs/api/reference/#get-streams


Freguglia/rTwitchAPI documentation built on Dec. 6, 2022, 3:44 a.m.