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

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

getChannelInfo(user)

async

Retrieves the channel data for the given user.

ParameterTypeDescription
userUserIdResolvable

The user you want to get channel info for.

Return type: HelixChannel | null

startChannelCommercial(broadcaster, length)

async

Starts a commercial on a channel.

ParameterTypeDescription
broadcasterUserIdResolvable

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

The length of the commercial, in seconds.

Return type: void

updateChannelInfo(user, data)

async

Updates the given user's channel data.

ParameterTypeDescription
userUserIdResolvable

The user you want to update channel info for.

dataHelixChannelUpdate

The channel info to set.

Return type: void