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

Classes

ApiClientBadgesApiBitsApiChannelChannelApiChannelFollowChannelPlaceholderChannelSubscriptionChatApiChatBadgeListChatBadgeSetChatBadgeVersionChatEmoteChatEmoteListChattersListCheermoteListConfigErrorCreatedVideoEmoteSetListHelixApiGroupHelixBanHelixBanEventHelixBitsApiHelixBitsLeaderboardHelixBitsLeaderboardEntryHelixChannelHelixChannelApiHelixChannelEditorHelixChannelEmoteHelixChannelPointsApiHelixChannelSearchResultHelixChatApiHelixChatBadgeSetHelixChatBadgeVersionHelixCheermoteListHelixClipHelixClipApiHelixCustomRewardHelixCustomRewardRedemptionHelixEmoteHelixEmoteFromSetHelixEventSubApiHelixEventSubSubscriptionHelixExtensionsApiHelixExtensionTransactionHelixFollowHelixGameHelixGameApiHelixHypeTrainApiHelixHypeTrainContributionHelixHypeTrainEventHelixInstalledExtensionHelixInstalledExtensionListHelixModerationApiHelixModeratorHelixModeratorEventHelixPaginatedRequestHelixPaginatedRequestWithTotalHelixPaginatedScheduleSegmentRequestHelixPollHelixPollApiHelixPollChoiceHelixPredictionHelixPredictionApiHelixPredictionOutcomeHelixPredictorHelixPrivilegedUserHelixScheduleHelixScheduleApiHelixScheduleSegmentHelixSearchApiHelixStreamHelixStreamApiHelixStreamMarkerHelixStreamMarkerWithVideoHelixSubscriptionHelixSubscriptionApiHelixSubscriptionEventHelixTagHelixTagApiHelixTeamHelixTeamApiHelixTeamWithUsersHelixUserHelixUserApiHelixUserBlockHelixUserExtensionHelixUserRelationHelixUserSubscriptionHelixVideoHelixVideoApiHelixWebHooksApiHelixWebHookSubscriptionKrakenApiGroupNoSubscriptionProgramErrorPrivilegedChannelPrivilegedUserSearchApiStreamStreamApiStreamNotLiveErrorSubscriptionTeamTeamApiTeamWithUsersUnsupportedApiUserUserApiUserBlockUserChatInfoUserFollowUserSubscriptionVideoVideoApi

HelixScheduleApi

The Helix API methods that deal with schedules.

Overview

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

Example

const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const { data: schedule } = await api.helix.schedule.getSchedule('61369223');

Methods

createScheduleSegment(broadcaster, data)

async

Creates a new segment in a given broadcaster's schedule.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to create a new schedule segment for.

dataHelixCreateScheduleSegmentDatanone
data.categoryIdstringnone

The ID of the category of the segment.

data.durationnumbernone

The planned duration of the segment, in minutes. Defaults to 240 (4 hours).

data.isRecurringbooleannone

Whether the segment is recurring every week.

data.startDatestringnone

The date when the segment starts. Must be in UTC.

data.timezonestringnone

The timezone the segment is created from.

This is used for managing DST shifts only. The startDate must always be given in UTC.

data.titlestringnone

The title of the segment.

deleteScheduleSegment(broadcaster, segmentId)

async

Deletes a segment in a given broadcaster's schedule.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to create a new schedule segment for.

segmentIdstringnone

The ID of the segment to update.

Return type: void

getSchedule(broadcaster, filter)

async

Retrieves the schedule for a given broadcaster.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to get the schedule of.

filterHelixPaginatedScheduleFilternone
filter.afterstringnone

A cursor to get the following page of.

filter.limitstringnone

The number of results per page.

filter.startDatestringnone

The earliest date to find schedule segments for.

filter.utcOffsetnumbernone

The offset from UTC you request for, to ensure everything goes to the correct day.

getScheduleAsIcal(broadcaster)

async

Retrieves the schedule for a given broadcaster in iCal format.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to get the schedule for.

Return type: string

getScheduleSegmentById(broadcaster, id)

async

Retrieves a single schedule segment by ID.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to get a schedule segment of.

idstringnone

The ID of the schedule segment.

Return type: HelixScheduleSegment | null

getScheduleSegmentsByIds(broadcaster, ids)

async

Retrieves a set of schedule segments by IDs.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to get schedule segments of.

idsArray<string>none

The IDs of the schedule segments.

Return type: Array<HelixScheduleSegment>

getScheduleSegmentsPaginated(broadcaster, filter)

Creates a paginator for schedule segments for a given broadcaster.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to get the schedule segments of.

filterHelixScheduleFilternone
filter.startDatestringnone

The earliest date to find schedule segments for.

filter.utcOffsetnumbernone

The offset from UTC you request for, to ensure everything goes to the correct day.

updateScheduleSegment(broadcaster, segmentId, data)

async

Updates a segment in a given broadcaster's schedule.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to create a new schedule segment for.

segmentIdstringnone

The ID of the segment to update.

dataHelixUpdateScheduleSegmentDatanone
data.categoryIdstringnone

The ID of the category of the segment.

data.durationnumbernone

The planned duration of the segment, in minutes. Defaults to 240 (4 hours).

data.isCanceledbooleannone

Whether the schedule broadcast is canceled.

data.startDatestringnone

The date when the segment starts. Must be in UTC.

data.timezonestringnone

The timezone the segment is created from.

This is used for managing DST shifts only. The startDate must always be given in UTC.

data.titlestringnone

The title of the segment.

updateScheduleSettings(broadcaster, settings)

async

Updates the schedule settings of a given broadcaster.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to update the schedule settings for.

settingsHelixScheduleSettingsUpdatenone
settings.vacationHelixScheduleSettingsUpdateVacation | nullnone

Vacation mode settings.

Note that not setting this (or setting it to undefined) does not change the vacation settings, but setting it to null disables vacation mode.

Return type: void