createSegment

suspend fun createSegment(broadcasterId: String, startTime: String, timezone: String, duration: Int = 240, isRecurring: Boolean = false, categoryId: String? = null, title: String? = null)

Twitch API: Create Channel Stream Schedule Segment

Adds a single or recurring broadcast to the broadcaster's streaming schedule.

Parameters

broadcasterId

the ID of the broadcaster that owns the schedule to add the broadcast segment to. This ID must match the user ID in the user access token.

startTime

the date and time that the broadcast segment starts. Specify the date and time in RFC3339 format.

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).

isRecurring

a Boolean value that determines whether the broadcast recurs weekly. Only partners and affiliates may add non-recurring broadcasts.

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.