Overview
Can be accessed using client.helix.streams on an ApiClient instance.
Example
const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const stream = await api.helix.streams.getStreamByUserId('125328655');
Methods
createStreamMarker(broadcaster, description)
asyncCreates a new stream marker.
Only works while the specified user's stream is live.
| Parameter | Type | Description |
|---|---|---|
| broadcaster | UserIdResolvable | The broadcaster to create a stream marker for. |
| description | string | The description of the marker. |
getStreamByUserId(user)
asyncRetrieves the current stream for the given user ID.
| Parameter | Type | Description |
|---|---|---|
| user | UserIdResolvable | The user ID to retrieve the stream for. |
getStreamByUserName(user)
asyncRetrieves the current stream for the given user name.
| Parameter | Type | Description |
|---|---|---|
| user | UserNameResolvable | The user name to retrieve the stream for. |
getStreamKey(broadcaster)
asyncRetrieves the stream key of a stream.
| Parameter | Type | Description |
|---|---|---|
| broadcaster | UserIdResolvable | The broadcaster to retrieve the stream key for. |
getStreamMarkersForUser(user)
asyncRetrieves a list of all stream markers for an user.
| Parameter | Type | Description |
|---|---|---|
| user | UserIdResolvable | The user to list the stream markers for. |
getStreamMarkersForUserPaginated(user)
Creates a paginator for all stream markers for an user.
| Parameter | Type | Description |
|---|---|---|
| user | UserIdResolvable | The user to list the stream markers for. |
getStreamMarkersForVideo(videoId)
asyncRetrieves a list of all stream markers for a video.
| Parameter | Type | Description |
|---|---|---|
| videoId | string | The video to list the stream markers for. |
getStreamMarkersForVideoPaginated(videoId)
Creates a paginator for all stream markers for a video.
| Parameter | Type | Description |
|---|---|---|
| videoId | string | The video to list the stream markers for. |
getStreams(filter)
asyncRetrieves a list of streams.
| Parameter | Type | Description |
|---|---|---|
| filter | HelixPaginatedStreamFilter | see below |
| filter.after | string | A cursor to get the following page of. |
| filter.before | string | A cursor to get the previous page of. |
| filter.community | string | Array<string> | A community ID or a list thereof. |
| filter.game | string | Array<string> | A game ID or a list thereof. |
| filter.language | string | Array<string> | A language or a list thereof. |
| filter.limit | string | The number of results per page. |
| filter.type | HelixStreamType | A type of stream. |
| filter.userId | string | Array<string> | A user ID or a list thereof. |
| filter.userName | string | Array<string> | A user name or a list thereof. |
getStreamsPaginated(filter)
Creates a paginator for streams.
| Parameter | Type | Description |
|---|---|---|
| filter | HelixStreamFilter | see below |
| filter.community | string | Array<string> | A community ID or a list thereof. |
| filter.game | string | Array<string> | A game ID or a list thereof. |
| filter.language | string | Array<string> | A language or a list thereof. |
| filter.type | HelixStreamType | A type of stream. |
| filter.userId | string | Array<string> | A user ID or a list thereof. |
| filter.userName | string | Array<string> | A user name or a list thereof. |
getStreamTags(broadcaster)
asyncRetrieves the tags of a stream.
| Parameter | Type | Description |
|---|---|---|
| broadcaster | UserIdResolvable | The broadcaster of the stream. |
replaceStreamTags(broadcaster, tagIds)
asyncReplaces the tags of a stream.
| Parameter | Type | Description |
|---|---|---|
| broadcaster | UserIdResolvable | The broadcaster of the stream. |
| tagIds | Array<string> | The tags to set. If not given, removes all tags. |