go-twitch/eventsub/events/shoutouts.go

73 lines
2.8 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 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 broadcasters login name.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// The broadcasters 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 broadcasters login name.
ToBroadcasterUserLogin string `json:"to_broadcaster_user_login"`
// The broadcasters 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 moderators login name.
ModeratorUserLogin string `json:"moderator_user_login"`
// The moderators display name.
ModeratorUserName string `json:"moderator_user_name"`
// The number of users that were watching the broadcasters 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 broadcasters login name.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// The broadcasters 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 broadcasters login name.
FromBroadcasterUserLogin string `json:"from_broadcaster_user_login"`
// The broadcasters display name.
FromBroadcasterUserName string `json:"from_broadcaster_user_name"`
// The number of users that were watching the broadcasters 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"`
}