twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks
Welcome

Classes

ApiClientBadgesApiBitsApiChannelChannelApiChannelFollowChannelPlaceholderChannelSubscriptionChatApiChatBadgeListChatBadgeSetChatBadgeVersionChatEmoteChatEmoteListChattersListCheermoteListConfigErrorCreatedVideoEmoteSetListHelixApiGroupHelixBanHelixBanEventHelixBitsApiHelixBitsLeaderboardHelixBitsLeaderboardEntryHelixChannelHelixChannelApiHelixChannelEditorHelixChannelEmoteHelixChannelPointsApiHelixChannelSearchResultHelixChatApiHelixChatBadgeSetHelixChatBadgeVersionHelixCheermoteListHelixClipHelixClipApiHelixCustomRewardHelixCustomRewardRedemptionHelixEmoteHelixEmoteFromSetHelixEventSubApiHelixEventSubSubscriptionHelixExtensionsApiHelixExtensionTransactionHelixFollowHelixGameHelixGameApiHelixHypeTrainApiHelixHypeTrainContributionHelixHypeTrainEventHelixInstalledExtensionHelixInstalledExtensionListHelixModerationApiHelixModeratorHelixModeratorEventHelixPaginatedRequestHelixPaginatedRequestWithTotalHelixPaginatedScheduleSegmentRequestHelixPollHelixPollApiHelixPollChoiceHelixPredictionHelixPredictionApiHelixPredictionOutcomeHelixPredictorHelixPrivilegedUserHelixScheduleHelixScheduleApiHelixScheduleSegmentHelixSearchApiHelixStreamHelixStreamApiHelixStreamMarkerHelixStreamMarkerWithVideoHelixSubscriptionHelixSubscriptionApiHelixSubscriptionEventHelixTagHelixTagApiHelixTeamHelixTeamApiHelixTeamWithUsersHelixUserHelixUserApiHelixUserBlockHelixUserExtensionHelixUserRelationHelixUserSubscriptionHelixVideoHelixVideoApiHelixWebHooksApiHelixWebHookSubscriptionKrakenApiGroupNoSubscriptionProgramErrorPrivilegedChannelPrivilegedUserSearchApiStreamStreamApiStreamNotLiveErrorSubscriptionTeamTeamApiTeamWithUsersUnsupportedApiUserUserApiUserBlockUserChatInfoUserFollowUserSubscriptionVideoVideoApi

HelixStreamApi

The Helix API methods that deal with streams.

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)

async

Creates a new stream marker.

Only works while the specified user's stream is live.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to create a stream marker for.

descriptionstringnone

The description of the marker.

Return type: HelixStreamMarker

getFollowedStreams(user, pagination)

async

Retrieves the streams that are currently live and are followed by the given user.

ParameterTypeRequiredDefaultDescription
userUserIdResolvablenone

The user to check followed streams for.

paginationHelixForwardPaginationnone
pagination.afterstringnone

A cursor to get the following page of.

pagination.limitstringnone

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.

ParameterTypeRequiredDefaultDescription
userUserIdResolvablenone

The user to check followed streams for.

Return type: HelixPaginatedRequest<HelixStreamData, HelixStream>

getStreamByUserId(user)

async

Retrieves the current stream for the given user ID.

ParameterTypeRequiredDefaultDescription
userUserIdResolvablenone

The user ID to retrieve the stream for.

Return type: HelixStream | null

getStreamByUserName(user)

async

Retrieves the current stream for the given user name.

ParameterTypeRequiredDefaultDescription
userUserNameResolvablenone

The user name to retrieve the stream for.

Return type: HelixStream | null

getStreamKey(broadcaster)

async

Retrieves the stream key of a stream.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the stream key for.

Return type: string

getStreamMarkersForUser(user)

async

Retrieves a list of all stream markers for an user.

ParameterTypeRequiredDefaultDescription
userUserIdResolvablenone

The user to list the stream markers for.

getStreamMarkersForUserPaginated(user)

Creates a paginator for all stream markers for an user.

ParameterTypeRequiredDefaultDescription
userUserIdResolvablenone

The user to list the stream markers for.

Return type: HelixPaginatedRequest<HelixStreamGetMarkersResult, HelixStreamMarkerWithVideo>

getStreamMarkersForVideo(videoId)

async

Retrieves a list of all stream markers for a video.

ParameterTypeRequiredDefaultDescription
videoIdstringnone

The video to list the stream markers for.

getStreamMarkersForVideoPaginated(videoId)

Creates a paginator for all stream markers for a video.

ParameterTypeRequiredDefaultDescription
videoIdstringnone

The video to list the stream markers for.

Return type: HelixPaginatedRequest<HelixStreamGetMarkersResult, HelixStreamMarkerWithVideo>

getStreams(filter)

async

Retrieves a list of streams.

ParameterTypeRequiredDefaultDescription
filterHelixPaginatedStreamFilter{}see below
filter.afterstringnone

A cursor to get the following page of.

filter.beforestringnone

A cursor to get the previous page of.

filter.communitystring | Array<string>none

A community ID or a list thereof.

filter.gamestring | Array<string>none

A game ID or a list thereof.

filter.languagestring | Array<string>none

A language or a list thereof.

filter.limitstringnone

The number of results per page.

filter.typeHelixStreamTypenone

A type of stream.

filter.userIdstring | Array<string>none

A user ID or a list thereof.

filter.userNamestring | Array<string>none

A user name or a list thereof.

getStreamsPaginated(filter)

Creates a paginator for streams.

ParameterTypeRequiredDefaultDescription
filterHelixStreamFilter{}see below
filter.communitystring | Array<string>none

A community ID or a list thereof.

filter.gamestring | Array<string>none

A game ID or a list thereof.

filter.languagestring | Array<string>none

A language or a list thereof.

filter.typeHelixStreamTypenone

A type of stream.

filter.userIdstring | Array<string>none

A user ID or a list thereof.

filter.userNamestring | Array<string>none

A user name or a list thereof.

Return type: HelixPaginatedRequest<HelixStreamData, HelixStream>

getStreamTags(broadcaster)

async

Retrieves the tags of a stream.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster of the stream.

Return type: Array<HelixTag>

replaceStreamTags(broadcaster, tagIds)

async

Replaces the tags of a stream.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster of the stream.

tagIdsArray<string>none

The tags to set. If not given, removes all tags.

Return type: void