177 lines
5 KiB
Go
177 lines
5 KiB
Go
package api
|
|
|
|
type (
|
|
ChannelEvent struct {
|
|
UserID string `json:"user_id"`
|
|
UserLogin string `json:"user_login"`
|
|
UserName string `json:"user_name"`
|
|
|
|
BroadcasterID string `json:"broadcaster_user_id"`
|
|
BroadcasterLogin string `json:"broadcaster_user_login"`
|
|
BroadcasterName string `json:"broadcaster_user_name"`
|
|
}
|
|
|
|
FollowEvent struct {
|
|
ChannelEvent
|
|
FollowedAt string `json:"followed_at"`
|
|
}
|
|
|
|
SubscribeEvent struct {
|
|
ChannelEvent
|
|
Tier string `json:"tier"`
|
|
IsGift bool `json:"is_gift"`
|
|
}
|
|
|
|
CheerEvent struct {
|
|
ChannelEvent
|
|
Message string `json:"message"`
|
|
Bits int `json:"bits"`
|
|
IsAnonymous bool `json:"is_anonymous"`
|
|
}
|
|
|
|
RaidEvent struct {
|
|
FromUserID string `json:"from_broadcaster_user_id"`
|
|
FromUserLogin string `json:"from_broadcaster_user_login"`
|
|
FromUserName string `json:"from_broadcaster_user_name"`
|
|
|
|
ToUserID string `json:"to_broadcaster_user_id"`
|
|
ToUserLogin string `json:"to_broadcaster_user_login"`
|
|
ToUserName string `json:"to_broadcaster_user_name"`
|
|
|
|
Viewers int `json:"viewers"`
|
|
}
|
|
|
|
Reward struct {
|
|
ID string `json:"id"`
|
|
Title string `json:"title"`
|
|
Cost int `json:"cost"`
|
|
Prompt string `json:"prompt"`
|
|
}
|
|
ChannelPointCustomRewardRedeemEvent struct {
|
|
ChannelEvent
|
|
ID string `json:"id"`
|
|
UserInput string `json:"user_input"`
|
|
Status string `json:"status"`
|
|
RedeemedAt string `json:"redeemed_at"`
|
|
Reward Reward `json:"reward"`
|
|
}
|
|
|
|
ShoutoutCreate struct {
|
|
FromUserID string `json:"broadcaster_user_id"`
|
|
FromUserLogin string `json:"broadcaster_user_login"`
|
|
FromUserName string `json:"broadcaster_user_name"`
|
|
|
|
ToUserID string `json:"to_broadcaster_user_id"`
|
|
ToUserLogin string `json:"to_broadcaster_user_login"`
|
|
ToUserName string `json:"to_broadcaster_user_name"`
|
|
|
|
ModeratorID string `json:"moderator_broadcaster_user_id"`
|
|
ModeratorLogin string `json:"moderator_broadcaster_user_login"`
|
|
ModeratorName string `json:"moderator_broadcaster_user_name"`
|
|
|
|
ViewerCount int `json:"viewer_count"`
|
|
StartedAt string `json:"started_at"`
|
|
CooldownEndsAt string `json:"cooldown_ends_at"`
|
|
TargetCooldownEndsAt string `json:"target_cooldown_ends_at"`
|
|
}
|
|
|
|
ChatMessageCheermote struct {
|
|
Prefix string `json:"prefix"`
|
|
Bits int `json:"bits"`
|
|
Tier int `json:"tier"`
|
|
}
|
|
ChatMessageEmote struct {
|
|
ID string `json:"id"`
|
|
EmoteSetID string `json:"emote_set_id"`
|
|
OwnerID string `json:"owner_id"`
|
|
Format []string `json:"format"`
|
|
}
|
|
ChatMessageMention struct {
|
|
UserID string `json:"user_id"`
|
|
UserLogin string `json:"user_login"`
|
|
UserName string `json:"user_name"`
|
|
}
|
|
ChatMessageGif struct {
|
|
GifID string `json:"gif_id"`
|
|
Url string `json:"url"`
|
|
}
|
|
ChatMessageFragment struct {
|
|
Type string `json:"type"`
|
|
Text string `json:"text"`
|
|
Cheermote *ChatMessageCheermote `json:"cheermote"`
|
|
Emote *ChatMessageEmote `json:"emote"`
|
|
Mention *ChatMessageMention `json:"mention"`
|
|
Gif *ChatMessageGif `json:"gif"`
|
|
}
|
|
ChatMessage struct {
|
|
Text string `json:"text"`
|
|
Fragments []ChatMessageFragment `json:"fragments"`
|
|
}
|
|
ChatBadge struct {
|
|
SetID string `json:"set_id"`
|
|
ID string `json:"id"`
|
|
Info string `json:"info"`
|
|
}
|
|
ChatCheer struct {
|
|
Bits int `json:"bits"`
|
|
}
|
|
ChatReply struct {
|
|
ParentMessageID string `json:"parent_message_id"`
|
|
ParentMessageBody string `json:"parent_message_body"`
|
|
ParentUserID string `json:"parent_user_id"`
|
|
ParentUserLogin string `json:"parent_user_login"`
|
|
ParentUserName string `json:"parent_user_name"`
|
|
|
|
ThreadMessageID string `json:"thread_message_id"`
|
|
ThreadUserID string `json:"thread_user_id"`
|
|
ThreadUserLogin string `json:"thread_user_login"`
|
|
ThreadUserName string `json:"thread_user_name"`
|
|
}
|
|
SourceBadges struct {
|
|
SetID string `json:"set_id"`
|
|
ID string `json:"id"`
|
|
Info string `json:"info"`
|
|
}
|
|
ChatEvent struct {
|
|
BroadcasterID string `json:"broadcaster_user_id"`
|
|
BroadcasterLogin string `json:"broadcaster_user_login"`
|
|
BroadcasterName string `json:"broadcaster_user_name"`
|
|
|
|
ChatterID string `json:"chatter_user_id"`
|
|
ChatterLogin string `json:"chatter_user_login"`
|
|
ChatterName string `json:"chatter_user_name"`
|
|
|
|
MessageID string `json:"message_id"`
|
|
Message ChatMessage `json:"message"`
|
|
MessageType string `json:"message_type"`
|
|
|
|
Badges []ChatBadge `json:"badges"`
|
|
Cheer *ChatCheer `json:"cheer"`
|
|
Color string `json:"color"`
|
|
Reply *ChatReply `json:"reply"`
|
|
|
|
ChannelPointsCustomRewardID string `json:"channel_points_custom_reward_id"`
|
|
|
|
SourceBroadcasterUserID string `json:"source_broadcaster_user_id"`
|
|
SourceBroadcasterUserName string `json:"source_broadcaster_user_name"`
|
|
SourceBroadcasterUserLogin string `json:"source_broadcaster_user_login"`
|
|
|
|
SourceMessageID string `json:"source_message_id"`
|
|
|
|
SourceBadges *SourceBadges `json:"source_badges"`
|
|
|
|
IsSourceOnly bool `json:"is_source_only"`
|
|
}
|
|
|
|
ChatDeleteEvent struct {
|
|
BroadcasterID string `json:"broadcaster_user_id"`
|
|
BroadcasterLogin string `json:"broadcaster_user_login"`
|
|
BroadcasterName string `json:"broadcaster_user_name"`
|
|
|
|
TargetID string `json:"target_user_id"`
|
|
TargetLogin string `json:"target_user_login"`
|
|
TargetName string `json:"target_user_name"`
|
|
|
|
MessageID string `json:"message_id"`
|
|
}
|
|
)
|