73 lines
2.8 KiB
Go
73 lines
2.8 KiB
Go
package events
|
||
|
||
import "time"
|
||
|
||
// Defines the Shoutout data that you receive when the channel.shoutout.create event occurs.
|
||
type ShoutoutCreateEvent struct {
|
||
// The ID that identifies the broadcaster that sent the Shoutout.
|
||
BroadcasterUserID string `json:"broadcaster_user_id"`
|
||
|
||
// The broadcaster’s login name.
|
||
BroadcasterUserLogin string `json:"broadcaster_user_login"`
|
||
|
||
// The broadcaster’s display name.
|
||
BroadcasterUserName string `json:"broadcaster_user_name"`
|
||
|
||
// The ID that identifies the broadcaster that received the Shoutout.
|
||
ToBroadcasterUserID string `json:"to_broadcaster_user_id"`
|
||
|
||
// The broadcaster’s login name.
|
||
ToBroadcasterUserLogin string `json:"to_broadcaster_user_login"`
|
||
|
||
// The broadcaster’s display name.
|
||
ToBroadcasterUserName string `json:"to_broadcaster_user_name"`
|
||
|
||
// An ID that identifies the moderator that sent the Shoutout. If the broadcaster sent the Shoutout, this ID is the same as the ID in broadcaster_user_id.
|
||
ModeratorUserID string `json:"moderator_user_id"`
|
||
|
||
// The moderator’s login name.
|
||
ModeratorUserLogin string `json:"moderator_user_login"`
|
||
|
||
// The moderator’s display name.
|
||
ModeratorUserName string `json:"moderator_user_name"`
|
||
|
||
// The number of users that were watching the broadcaster’s stream at the time of the Shoutout.
|
||
ViewerCount int `json:"viewer_count"`
|
||
|
||
// The UTC timestamp (in RFC3339 format) of when the moderator sent the Shoutout.
|
||
StartedAt time.Time `json:"started_at"`
|
||
|
||
// The UTC timestamp (in RFC3339 format) of when the broadcaster may send a Shoutout to a different broadcaster.
|
||
CooldownEndsAt time.Time `json:"cooldown_ends_at"`
|
||
|
||
// The UTC timestamp (in RFC3339 format) of when the broadcaster may send another Shoutout to the broadcaster in to_broadcaster_user_id.
|
||
TargetCooldownEndsAt time.Time `json:"target_cooldown_ends_at"`
|
||
}
|
||
|
||
// Defines the Shoutout data that you receive when the channel.shoutout.receive event occurs.
|
||
type ShoutoutReceivedEvent struct {
|
||
// An ID that identifies the broadcaster that received the Shoutout.
|
||
BroadcasterUserID string `json:"broadcaster_user_id"`
|
||
|
||
// The broadcaster’s login name.
|
||
BroadcasterUserLogin string `json:"broadcaster_user_login"`
|
||
|
||
// The broadcaster’s display name.
|
||
BroadcasterUserName string `json:"broadcaster_user_name"`
|
||
|
||
// An ID that identifies the broadcaster that sent the Shoutout.
|
||
FromBroadcasterUserID string `json:"from_broadcaster_user_id"`
|
||
|
||
// The broadcaster’s login name.
|
||
FromBroadcasterUserLogin string `json:"from_broadcaster_user_login"`
|
||
|
||
// The broadcaster’s display name.
|
||
FromBroadcasterUserName string `json:"from_broadcaster_user_name"`
|
||
|
||
// The number of users that were watching the broadcaster’s stream at the time of the Shoutout.
|
||
ViewerCount int `json:"viewer_count"`
|
||
|
||
// The UTC timestamp (in RFC3339 format) of when the moderator sent the Shoutout.
|
||
StartedAt time.Time `json:"started_at"`
|
||
}
|