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 | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to create a stream marker for. |
|
description | string | none |
The description of the marker. |
getStreamByUserId(user)
asyncRetrieves the current stream for the given user ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable | none |
The user ID to retrieve the stream for. |
getStreamByUserName(user)
asyncRetrieves the current stream for the given user name.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserNameResolvable | none |
The user name to retrieve the stream for. |
getStreamKey(broadcaster)
asyncRetrieves the stream key of a stream.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the stream key for. |
getStreamMarkersForUser(user)
asyncRetrieves a list of all stream markers for an user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable | none |
The user to list the stream markers for. |
getStreamMarkersForUserPaginated(user)
Creates a paginator for all stream markers for an user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable | none |
The user to list the stream markers for. |
getStreamMarkersForVideo(videoId)
asyncRetrieves a list of all stream markers for a video.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
videoId | string | none |
The video to list the stream markers for. |
getStreamMarkersForVideoPaginated(videoId)
Creates a paginator for all stream markers for a video.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
videoId | string | none |
The video to list the stream markers for. |
getStreams(filter)
asyncRetrieves a list of streams.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
filter | HelixPaginatedStreamFilter | {} | see below | |
filter.after | string | none |
A cursor to get the following page of. |
|
filter.before | string | none |
A cursor to get the previous page of. |
|
filter.community | string | Array<string> | none |
A community ID or a list thereof. |
|
filter.game | string | Array<string> | none | A game ID or a list thereof. |
|
filter.language | string | Array<string> | none |
A language or a list thereof. |
|
filter.limit | string | none |
The number of results per page. |
|
filter.type | HelixStreamType | none | A type of stream. |
|
filter.userId | string | Array<string> | none | A user ID or a list thereof. |
|
filter.userName | string | Array<string> | none |
A user name or a list thereof. |
getStreamsPaginated(filter)
Creates a paginator for streams.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
filter | HelixStreamFilter | {} | see below | |
filter.community | string | Array<string> | none |
A community ID or a list thereof. |
|
filter.game | string | Array<string> | none | A game ID or a list thereof. |
|
filter.language | string | Array<string> | none |
A language or a list thereof. |
|
filter.type | HelixStreamType | none | A type of stream. |
|
filter.userId | string | Array<string> | none | A user ID or a list thereof. |
|
filter.userName | string | Array<string> | none |
A user name or a list thereof. |
getStreamTags(broadcaster)
asyncRetrieves the tags of a stream.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster of the stream. |
replaceStreamTags(broadcaster, tagIds)
asyncReplaces the tags of a stream.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster of the stream. |
|
tagIds | Array<string> | none |
The tags to set. If not given, removes all tags. |