go-twitch/eventsub/events/streams.go

35 lines
938 B
Go
Raw Permalink Normal View History

2024-03-05 12:14:18 -05:00
package events
import "time"
type StreamOnlineEvent struct {
// The id of the stream.
Id string `json:"id"`
// The broadcasters user id.
BroadcasterUserId string `json:"broadcaster_user_id"`
// The broadcasters user login.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// The broadcasters user display name.
BroadcasterUserName string `json:"broadcaster_user_name"`
// The stream type. Valid values are: live, playlist, watch_party, premiere, rerun.
Type string `json:"type"`
// The timestamp at which the stream went online at.
StartedAt time.Time `json:"started_at"`
}
type StreamOfflineEvent struct {
// The broadcasters user id.
BroadcasterUserId string `json:"broadcaster_user_id"`
// The broadcasters user login.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// The broadcasters user display name.
BroadcasterUserName string `json:"broadcaster_user_name"`
}