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)
asyncCreates a new segment in a given broadcaster's schedule.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to create a new schedule segment for. | |
data | HelixCreateScheduleSegmentData | none | ||
data.categoryId | string | none | The ID of the category of the segment. | |
data.duration | number | none | The planned duration of the segment, in minutes. Defaults to 240 (4 hours). | |
data.isRecurring | boolean | none | Whether the segment is recurring every week. | |
data.startDate | string | none | The date when the segment starts. Must be in UTC. | |
data.timezone | string | none | The timezone the segment is created from. This is used for managing DST shifts only. The | |
data.title | string | none | The title of the segment. |
deleteScheduleSegment(broadcaster, segmentId)
asyncDeletes a segment in a given broadcaster's schedule.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to create a new schedule segment for. | |
segmentId | string | none | The ID of the segment to update. |
getSchedule(broadcaster, filter)
asyncRetrieves the schedule for a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to get the schedule of. | |
filter | HelixPaginatedScheduleFilter | none | ||
filter.after | string | none | A cursor to get the following page of. | |
filter.limit | string | none | The number of results per page. | |
filter.startDate | string | none | The earliest date to find schedule segments for. | |
filter.utcOffset | number | none | The offset from UTC you request for, to ensure everything goes to the correct day. |
getScheduleAsIcal(broadcaster)
asyncRetrieves the schedule for a given broadcaster in iCal format.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to get the schedule for. |
getScheduleSegmentById(broadcaster, id)
asyncRetrieves a single schedule segment by ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to get a schedule segment of. | |
id | string | none | The ID of the schedule segment. |
getScheduleSegmentsByIds(broadcaster, ids)
asyncRetrieves a set of schedule segments by IDs.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to get schedule segments of. | |
ids | Array<string> | none | The IDs of the schedule segments. |
getScheduleSegmentsPaginated(broadcaster, filter)
Creates a paginator for schedule segments for a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to get the schedule segments of. | |
filter | HelixScheduleFilter | none | ||
filter.startDate | string | none | The earliest date to find schedule segments for. | |
filter.utcOffset | number | none | The offset from UTC you request for, to ensure everything goes to the correct day. |
updateScheduleSegment(broadcaster, segmentId, data)
asyncUpdates a segment in a given broadcaster's schedule.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to create a new schedule segment for. | |
segmentId | string | none | The ID of the segment to update. | |
data | HelixUpdateScheduleSegmentData | none | ||
data.categoryId | string | none | The ID of the category of the segment. | |
data.duration | number | none | The planned duration of the segment, in minutes. Defaults to 240 (4 hours). | |
data.isCanceled | boolean | none | Whether the schedule broadcast is canceled. | |
data.startDate | string | none | The date when the segment starts. Must be in UTC. | |
data.timezone | string | none | The timezone the segment is created from. This is used for managing DST shifts only. The | |
data.title | string | none | The title of the segment. |
updateScheduleSettings(broadcaster, settings)
asyncUpdates the schedule settings of a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to update the schedule settings for. | |
settings | HelixScheduleSettingsUpdate | none | ||
settings.vacation | HelixScheduleSettingsUpdateVacation | null | none | 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. |