go-twitch/api/schedule/models.go

62 lines
2.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package schedule
import "time"
type ChannelStreamSchedule struct {
// The list of broadcasts in the broadcasters streaming schedule.
Segments []Segment `json:"segments"`
// The ID of the broadcaster that owns the broadcast schedule.
BroadcasterId string `json:"broadcaster_id"`
// The broadcasters display name.
BroadcasterName string `json:"broadcaster_name"`
// The broadcasters login name.
BroadcasterLogin string `json:"broadcaster_login"`
// The dates when the broadcaster is on vacation and not streaming.
Vacation *Vacation `json:"vacation"`
}
type Segment struct {
// An ID that identifies this broadcast segment.
Id string `json:"id"`
// The UTC date and time (in RFC3339 format) of when the broadcast starts.
StartTime time.Time `json:"start_time"`
// The UTC date and time (in RFC3339 format) of when the broadcast ends.
EndTime time.Time `json:"end_time"`
// The broadcast segments title.
Title string `json:"title"`
// Indicates whether the broadcaster canceled this segment of a recurring broadcast.
// If the broadcaster canceled this segment, this field is set to the same value thats in the end_time field; otherwise, its set to null.
CanceledUntil *time.Time `json:"canceled_until"`
// The type of content that the broadcaster plans to stream or null if not specified.
Category *Category `json:"category"`
// A Boolean value that determines whether the broadcast is part of a recurring series that streams at the same time each week or is a one-time broadcast.
// Is true if the broadcast is part of a recurring series.
IsRecurring bool `json:"is_recurring"`
}
type Category struct {
// An ID that identifies the category that best represents the content that the broadcaster plans to stream.
Id string `json:"id"`
// The name of the category.
Name string `json:"name"`
}
type Vacation struct {
// The UTC date and time (in RFC3339 format) of when the broadcasters vacation starts.
StartTime time.Time `json:"start_time"`
// The UTC date and time (in RFC3339 format) of when the broadcasters vacation ends.
EndTime time.Time `json:"end_time"`
}