updateSegment

suspend fun updateSegment(broadcasterId: String, segmentId: String, startTime: String? = null, timezone: String? = null, duration: Int? = null, isCanceled: Boolean? = null, categoryId: String? = null, title: String? = null)

Twitch API: Update Channel Stream Schedule Segment

Updates a scheduled broadcast segment. For recurring segments, updating a segment's title, category, duration, and timezone, changes all segments in the recurring schedule, not just the specified segment.

Parameters

broadcasterId

the ID of the broadcaster who owns the broadcast segment to update. This ID must match the user ID in the user access token.

segmentId

the ID of the broadcast segment to update.

startTime

the date and time that the broadcast segment starts. Specify the date and time in RFC3339 format. Only partners and affiliates may update a broadcast's start time and only for non-recurring segments.

timezone

the time zone where the broadcast takes place. Specify the time zone using IANA time zone database format.

duration

the length of time, in minutes, that the broadcast is scheduled to run. The duration must be in the range 30 through 1380 (23 hours).

isCanceled

a Boolean value that indicates whether the broadcast is canceled. Set to true to cancel the segment.

categoryId

the ID of the category that best represents the broadcast's content.

title

the broadcast's title. The title may contain a maximum of 140 characters.