Overview
Methods
- createStreamMarkera
- getFollowedStreamsa
- getFollowedStreamsPaginated
- getStreamByUserIda
- getStreamByUserIdBatcheda
- getStreamByUserNamea
- getStreamByUserNameBatcheda
- getStreamKeya
- getStreamMarkersForUsera
- getStreamMarkersForUserPaginated
- getStreamMarkersForVideoa
- getStreamMarkersForVideoPaginated
- getStreamsa
- getStreamsByUserIdsa
- getStreamsByUserNamesa
- getStreamsPaginated
Can be accessed using client.streams
on an ApiClient instance.
Example
const api = new ApiClient({ authProvider }); const stream = await api.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 A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to create a stream marker for. | |
description | string | none | The description of the marker. |
getFollowedStreams(user, pagination)
asyncGets the streams that are currently live and are followed by the given user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to check followed streams for. | |
pagination | HelixForwardPagination | none | see below | |
pagination.after | string | none | A cursor to get the following page of. | |
pagination.limit | number | none | The number of results per page. |
getFollowedStreamsPaginated(user)
Creates a paginator for the streams that are currently live and are followed by the given user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to check followed streams for. |
getStreamByUserId(user)
asyncGets the current stream for the given user ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user ID to get the stream for. |
getStreamByUserIdBatched(user)
asyncGets the current stream for the given user ID, batching multiple calls into fewer requests as the API allows.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user ID to get the stream for. |
getStreamByUserName(user)
asyncGets the current stream for the given username.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserNameResolvable A user name or a user or channel object. Aliased type: string | UserNameResolveableType | none | The username to get the stream for. |
getStreamByUserNameBatched(user)
asyncGets the current stream for the given username, batching multiple calls into fewer requests as the API allows.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserNameResolvable A user name or a user or channel object. Aliased type: string | UserNameResolveableType | none | The username to get the stream for. |
getStreamKey(broadcaster)
asyncGets the stream key of a stream.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to get the stream key for. |
getStreamMarkersForUser(user, pagination)
asyncGets a list of all stream markers for a user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to list the stream markers for. | |
pagination | HelixPagination | none | see below | |
pagination.after | string | none | A cursor to get the following page of. | |
pagination.before | string | none | A cursor to get the previous page of. | |
pagination.limit | number | none | The number of results per page. |
getStreamMarkersForUserPaginated(user)
Creates a paginator for all stream markers for a user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to list the stream markers for. |
getStreamMarkersForVideo(user, videoId, pagination)
asyncGets a list of all stream markers for a video.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user the video belongs to. | |
videoId | string | none | The video to list the stream markers for. | |
pagination | HelixPagination | none | see below | |
pagination.after | string | none | A cursor to get the following page of. | |
pagination.before | string | none | A cursor to get the previous page of. | |
pagination.limit | number | none | The number of results per page. |
getStreamMarkersForVideoPaginated(user, videoId)
Creates a paginator for all stream markers for a video.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user the video belongs to. | |
videoId | string | none | The video to list the stream markers for. |
getStreams(filter)
asyncGets a list of streams.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
filter | HelixPaginatedStreamFilter | <complex> | 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.game | string | string[] | none | A game ID or a list thereof. | |
filter.language | string | string[] | none | A language or a list thereof. | |
filter.limit | number | none | The number of results per page. | |
filter.type | HelixStreamType The type of a stream. Aliased type: "live" | "vodcast" | "" | none | A type of stream. | |
filter.userId | string | string[] | none | A user ID or a list thereof. | |
filter.userName | string | string[] | none | A user name or a list thereof. |
getStreamsByUserIds(users)
asyncGets the current streams for the given user IDs.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
users | UserIdResolvable []A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user IDs to get the streams for. |
getStreamsByUserNames(users)
asyncGets the current streams for the given usernames.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
users | UserNameResolvable []A user name or a user or channel object. Aliased type: string | UserNameResolveableType | none | The username to get the streams for. |
getStreamsPaginated(filter)
Creates a paginator for streams.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
filter | HelixStreamFilter | <complex> | see below | |
filter.game | string | string[] | none | A game ID or a list thereof. | |
filter.language | string | string[] | none | A language or a list thereof. | |
filter.type | HelixStreamType The type of a stream. Aliased type: "live" | "vodcast" | "" | none | A type of stream. | |
filter.userId | string | string[] | none | A user ID or a list thereof. | |
filter.userName | string | string[] | none | A user name or a list thereof. |