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

Classes

ApiClientBadgesApiBitsApiChannelChannelApiChannelFollowChannelPlaceholderChannelSubscriptionChatApiChatBadgeListChatBadgeSetChatBadgeVersionChatEmoteChatEmoteListChattersListCheermoteListConfigErrorCreatedVideoEmoteSetListHelixApiGroupHelixBanHelixBanEventHelixBitsApiHelixBitsLeaderboardHelixBitsLeaderboardEntryHelixChannelHelixChannelApiHelixChannelEditorHelixChannelEmoteHelixChannelPointsApiHelixChannelSearchResultHelixChatApiHelixChatBadgeSetHelixChatBadgeVersionHelixCheermoteListHelixClipHelixClipApiHelixCustomRewardHelixCustomRewardRedemptionHelixEmoteHelixEmoteFromSetHelixEventSubApiHelixEventSubSubscriptionHelixExtensionsApiHelixExtensionTransactionHelixFollowHelixGameHelixGameApiHelixHypeTrainApiHelixHypeTrainContributionHelixHypeTrainEventHelixInstalledExtensionHelixInstalledExtensionListHelixModerationApiHelixModeratorHelixModeratorEventHelixPaginatedRequestHelixPaginatedRequestWithTotalHelixPaginatedScheduleSegmentRequestHelixPollHelixPollApiHelixPollChoiceHelixPredictionHelixPredictionApiHelixPredictionOutcomeHelixPredictorHelixPrivilegedUserHelixScheduleHelixScheduleApiHelixScheduleSegmentHelixSearchApiHelixStreamHelixStreamApiHelixStreamMarkerHelixStreamMarkerWithVideoHelixSubscriptionHelixSubscriptionApiHelixSubscriptionEventHelixTagHelixTagApiHelixTeamHelixTeamApiHelixTeamWithUsersHelixUserHelixUserApiHelixUserBlockHelixUserExtensionHelixUserRelationHelixUserSubscriptionHelixVideoHelixVideoApiHelixWebHooksApiHelixWebHookSubscriptionKrakenApiGroupNoSubscriptionProgramErrorPrivilegedChannelPrivilegedUserSearchApiStreamStreamApiStreamNotLiveErrorSubscriptionTeamTeamApiTeamWithUsersUnsupportedApiUserUserApiUserBlockUserChatInfoUserFollowUserSubscriptionVideoVideoApi

HelixChannelApi

The Helix API methods that deal with channels.

Overview

Can be accessed using client.helix.channels on an ApiClient instance.

Example

const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const channel = await api.helix.channels.getChannelInfo('125328655');

Methods

getChannelEditors(broadcaster)

async

Retrieves a list of users who have editor permissions on your channel.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenonenone
Return type: Array<HelixChannelEditor>

getChannelInfo(user)

async

Retrieves the channel data for the given user.

ParameterTypeRequiredDefaultDescription
userUserIdResolvablenone

The user you want to get channel info for.

Return type: HelixChannel | null

startChannelCommercial(broadcaster, length)

async

Starts a commercial on a channel.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster on whose channel the commercial is started.

length
CommercialLength

The possible lengths of a channel commercial.

Aliased type: 30 | 60 | 90 | 120 | 150 | 180

none

The length of the commercial, in seconds.

Return type: void

updateChannelInfo(user, data)

async

Updates the given user's channel data.

ParameterTypeRequiredDefaultDescription
userUserIdResolvablenone

The user you want to update channel info for.

dataHelixChannelUpdatenone

The channel info to set.

Return type: void