Overview
Can be accessed using client.schedule
on an ApiClient instance.
Example
const api = new ApiClient({ authProvider });
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 A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to create a new schedule segment for. | |
data | HelixCreateScheduleSegmentData | none | see below | |
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 A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to create a new schedule segment for. | |
segmentId | string | none | The ID of the segment to update. |
getSchedule(broadcaster, filter)
asyncGets the schedule for a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to get the schedule of. | |
filter | HelixPaginatedScheduleFilter | none | see below | |
filter.after | string | none | A cursor to get the following page of. | |
filter.limit | number | 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)
asyncGets the schedule for a given broadcaster in iCal format.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to get the schedule for. |
getScheduleSegmentById(broadcaster, id)
asyncGets a single schedule segment by ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to get a schedule segment of. | |
id | string | none | The ID of the schedule segment. |
getScheduleSegmentsByIds(broadcaster, ids)
asyncGets a set of schedule segments by IDs.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to get schedule segments of. | |
ids | 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 A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to get the schedule segments of. | |
filter | HelixScheduleFilter | none | see below | |
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 A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to create a new schedule segment for. | |
segmentId | string | none | The ID of the segment to update. | |
data | HelixUpdateScheduleSegmentData | none | see below | |
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 A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to update the schedule settings for. | |
settings | HelixScheduleSettingsUpdate | none | see below | |
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. |