twitcheventsub

package module
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Update                                    EventType = "channel.update"
	Follow                                              = "channel.follow"
	Subscribe                                           = "channel.subscribe"
	SubscriptionEnd                                     = "channel.subscription.end"
	SubscriptionGift                                    = "channel.subscription.gift"
	SubscriptionMessage                                 = "channel.subscription.message"
	Cheer                                               = "channel.cheer"
	Raid                                                = "channel.raid"
	Ban                                                 = "channel.ban"
	Unban                                               = "channel.unban"
	ModeratorAdd                                        = "channel.moderator.add"
	ModeratorRemove                                     = "channel.moderator.remove"
	ChannelPointsCustomRewardAdd                        = "channel.channel_points_custom_reward.add"
	ChannelPointsCustomRewardUpdate                     = "channel.channel_points_custom_reward.update"
	ChannelPointsCustomRewardRemove                     = "channel.channel_points_custom_reward.remove"
	ChannelPointsCustomRewardRedemptionAdd              = "channel.channel_points_custom_reward_redemption.add"
	ChannelPointsCustomRewardRedemptionUpdate           = "channel.channel_points_custom_reward_redemption.update"
	PollBegin                                           = "channel.poll.begin"
	PollProgress                                        = "channel.poll.progress"
	PollEnd                                             = "channel.poll.end"
	PredictionBegin                                     = "channel.prediction.begin"
	PredictionProgress                                  = "channel.prediction.progress"
	PredictionLock                                      = "channel.prediction.lock"
	PredictionEnd                                       = "channel.prediction.end"
	CharityCampaignDonate                               = "channel.charity_campaign.donate"
	ExtensionBitsTransactionCreate                      = "extension.bits_transaction.create"
	GoalBegin                                           = "channel.goal.begin"
	GoalProgress                                        = "channel.goal.progress"
	GoalEnd                                             = "channel.goal.end"
	HypeTrainBegin                                      = "channel.hype_train.begin"
	HypeTrainProgress                                   = "channel.hype_train.progress"
	HypeTrainEnd                                        = "channel.hype_train.end"
	StreamOnline                                        = "stream.online"
	StreamOffline                                       = "stream.offline"
	UserAuthorizationGrant                              = "user.authorization.grant"
	UserAuthorizationRevoke                             = "user.authorization.revoke"
	UserUpdate                                          = "user.update"
	ChannelSuspiciousUserUpdate                         = "channel.suspicious_user.update"
	ChannelBitsUse                                      = "channel.bits.use"
	ChannelSuspiciousUserMessage                        = "channel.suspicious_user.message"
	ChannelWarningAcknowledge                           = "channel.warning.acknowledge"
	ChannelWarningSend                                  = "channel.warning.send"
	UserWhisperMessage                                  = "user.whisper.message"
	ChannelPointsAutomaticRewardRedemptionAdd           = "channel.channel_points_automatic_reward_redemption.add"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Amount added in v1.1.0

type Amount struct {
	Value         int    `json:"value"`
	DecimalPlaces int    `json:"decimal_places"`
	Currency      string `json:"currency"`
}

type AutoModTerms added in v1.2.0

type AutoModTerms struct {
	Action      string   `json:"action"`
	List        string   `json:"list"`
	Terms       []string `json:"terms"`
	FromAutomod bool     `json:"from_automod"`
}

type AutomodMessageHoldEvent added in v1.1.0

type AutomodMessageHoldEvent struct {
	BroadcasterUserID    string                    `json:"broadcaster_user_id"`
	BroadcasterUserName  string                    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string                    `json:"broadcaster_user_login"`
	UserID               string                    `json:"user_id"`
	UserName             string                    `json:"user_name"`
	UserLogin            string                    `json:"user_login"`
	MessageID            string                    `json:"message_id"`
	Message              AutomodMessageHoldMessage `json:"message"`
	Level                int                       `json:"level"`
	Category             string                    `json:"category"`
	HeldAt               time.Time                 `json:"held_at"`
}

type AutomodMessageHoldMessage added in v1.2.2

type AutomodMessageHoldMessage struct {
	Text      string     `json:"text"`
	Fragments []Fragment `json:"fragments"`
}

type AutomodMessageUpdateEvent added in v1.1.0

type AutomodMessageUpdateEvent struct {
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	UserID               string    `json:"user_id"`
	UserName             string    `json:"user_name"`
	UserLogin            string    `json:"user_login"`
	ModeratorUserID      string    `json:"moderator_user_id"`
	ModeratorUserLogin   string    `json:"moderator_user_login"`
	ModeratorUserName    string    `json:"moderator_user_name"`
	MessageID            string    `json:"message_id"`
	Message              string    `json:"message"`
	Level                int       `json:"level"`
	Category             string    `json:"category"`
	Status               string    `json:"status"`
	HeldAt               time.Time `json:"held_at"`
	Fragments            Fragment  `json:"fragments"`
}

type AutomodSettingsUpdateEvent added in v1.1.0

type AutomodSettingsUpdateEvent struct {
	Data []struct {
		BroadcasterID           string `json:"broadcaster_id"`
		ModeratorID             string `json:"moderator_id"`
		OverallLevel            *int   `json:"overall_level"`
		Disability              int    `json:"disability"`
		Aggression              int    `json:"aggression"`
		SexualitySexOrGender    int    `json:"sexuality_sex_or_gender"`
		Misogyny                int    `json:"misogyny"`
		Bullying                int    `json:"bullying"`
		Swearing                int    `json:"swearing"`
		RaceEthnicityOrReligion int    `json:"race_ethnicity_or_religion"`
		SexBasedTerms           int    `json:"sex_based_terms"`
	} `json:"data"`
}

type AutomodTermsUpdateEvent added in v1.1.0

type AutomodTermsUpdateEvent struct {
	BroadcasterUserID    string   `json:"broadcaster_user_id"`
	BroadcasterUserName  string   `json:"broadcaster_user_name"`
	BroadcasterUserLogin string   `json:"broadcaster_user_login"`
	ModeratorUserID      string   `json:"moderator_user_id"`
	ModeratorUserLogin   string   `json:"moderator_user_login"`
	ModeratorUserName    string   `json:"moderator_user_name"`
	Action               string   `json:"action"`
	FromAutomod          bool     `json:"from_automod"`
	Terms                []string `json:"terms"`
}

type Badges added in v1.2.0

type Badges struct {
	SetID string `json:"set_id"`
	ID    string `json:"id"`
	Info  string `json:"info"`
}

type ChannelAdBreakBeginEvent added in v1.1.0

type ChannelAdBreakBeginEvent struct {
	DurationSeconds      string    `json:"duration_seconds"`
	StartedAt            time.Time `json:"started_at"`
	IsAutomatic          string    `json:"is_automatic"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	RequesterUserID      string    `json:"requester_user_id"`
	RequesterUserLogin   string    `json:"requester_user_login"`
	RequesterUserName    string    `json:"requester_user_name"`
}

type ChannelBanEvent added in v1.1.0

type ChannelBanEvent struct {
	UserID               string     `json:"user_id"`
	UserLogin            string     `json:"user_login"`
	UserName             string     `json:"user_name"`
	BroadcasterUserID    string     `json:"broadcaster_user_id"`
	BroadcasterUserLogin string     `json:"broadcaster_user_login"`
	BroadcasterUserName  string     `json:"broadcaster_user_name"`
	ModeratorUserID      string     `json:"moderator_user_id"`
	ModeratorUserLogin   string     `json:"moderator_user_login"`
	ModeratorUserName    string     `json:"moderator_user_name"`
	Reason               string     `json:"reason"`
	BannedAt             time.Time  `json:"banned_at"`
	EndsAt               *time.Time `json:"ends_at"`
	IsPermanent          bool       `json:"is_permanent"`
}

type ChannelBitsUseEvent added in v1.5.0

type ChannelBitsUseEvent struct {
	BroadcasterUserID    string                     `json:"broadcaster_user_id"`
	BroadcasterUserLogin string                     `json:"broadcaster_user_login"`
	BroadcasterUserName  string                     `json:"broadcaster_user_name"`
	UserID               string                     `json:"user_id"`
	UserLogin            string                     `json:"user_login"`
	UserName             string                     `json:"user_name"`
	Bits                 int                        `json:"bits"`
	Type                 string                     `json:"type"`
	Message              ChannelBitsUseEventMessage `json:"message"`
	PowerUp              ChannelBitsUseEventPowerUp `json:"power_up"`
}

type ChannelBitsUseEventCheermote added in v1.5.0

type ChannelBitsUseEventCheermote struct {
	Prefix string `json:"prefix"`
	Bits   int    `json:"bits"`
	Tier   int    `json:"tier"`
}

type ChannelBitsUseEventEmote added in v1.5.0

type ChannelBitsUseEventEmote struct {
	ID         string   `json:"id"`
	EmoteSetID string   `json:"emote_set_id"`
	OwnerID    string   `json:"owner_id"`
	Format     []string `json:"format"`
}

type ChannelBitsUseEventFragment added in v1.5.0

type ChannelBitsUseEventFragment struct {
	Text       string      `json:"text"`
	Type       string      `json:"type"`
	Emotes     []Emote     `json:"emotes"`
	Cheermotes []Cheermote `json:"cheermotes"`
}

type ChannelBitsUseEventMessage added in v1.5.0

type ChannelBitsUseEventMessage struct {
	Text      string                        `json:"text"`
	Fragments []ChannelBitsUseEventFragment `json:"fragments"`
}

type ChannelBitsUseEventPowerUp added in v1.5.0

type ChannelBitsUseEventPowerUp struct {
	Type            string                          `json:"type"`
	Emote           ChannelBitsUseEventPowerUpEmote `json:"emote"`
	MessageEffectID string                          `json:"message_effect_id"`
}

type ChannelBitsUseEventPowerUpEmote added in v1.5.0

type ChannelBitsUseEventPowerUpEmote struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type ChannelChatClearEvent added in v1.1.0

type ChannelChatClearEvent struct {
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
}

type ChannelChatClearUserMessagesEvent added in v1.1.0

type ChannelChatClearUserMessagesEvent struct {
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	TargetUserID         string `json:"target_user_id"`
	TargetUserName       string `json:"target_user_name"`
	TargetUserLogin      string `json:"target_user_login"`
}

type ChannelChatMessageDeleteEvent added in v1.1.0

type ChannelChatMessageDeleteEvent struct {
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	TargetUserID         string `json:"target_user_id"`
	TargetUserName       string `json:"target_user_name"`
	TargetUserLogin      string `json:"target_user_login"`
	MessageID            string `json:"message_id"`
}

type ChannelChatMessageEvent added in v1.1.0

type ChannelChatMessageEvent struct {
	BroadcasterUserID           string        `json:"broadcaster_user_id"`
	BroadcasterUserLogin        string        `json:"broadcaster_user_login"`
	BroadcasterUserName         string        `json:"broadcaster_user_name"`
	ChatterUserID               string        `json:"chatter_user_id"`
	ChatterUserLogin            string        `json:"chatter_user_login"`
	ChatterUserName             string        `json:"chatter_user_name"`
	MessageID                   string        `json:"message_id"`
	Message                     Message       `json:"message"`
	Color                       string        `json:"color"`
	Badges                      []Badges      `json:"badges"`
	MessageType                 string        `json:"message_type"`
	Cheer                       *MessageCheer `json:"cheer"`
	Reply                       *Reply        `json:"reply"`
	ChannelPointsCustomRewardID *string       `json:"channel_points_custom_reward_id"`
	SourceBrboadcasterUserID    *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                *[]Badges     `json:"source_badges"`
	IsSourceOnly                *bool         `json:"is_source_only"`
}

type ChannelChatNotificationEvent added in v1.1.0

type ChannelChatNotificationEvent struct {
	BroadcasterUserID    string                        `json:"broadcaster_user_id"`
	BroadcasterUserName  string                        `json:"broadcaster_user_name"`
	BroadcasterUserLogin string                        `json:"broadcaster_user_login"`
	ChatterUserID        string                        `json:"chatter_user_id"`
	ChatterUserLogin     string                        `json:"chatter_user_login"`
	ChatterUserName      string                        `json:"chatter_user_name"`
	ChatterIsAnonymous   bool                          `json:"chatter_is_anonymous"`
	Color                string                        `json:"color"`
	Badges               []Badges                      `json:"badges"`
	SystemMessage        string                        `json:"system_message"`
	MessageID            string                        `json:"message_id"`
	Message              NotificationMessage           `json:"message"`
	NoticeType           string                        `json:"notice_type"`
	Sub                  *NotificationSub              `json:"sub"`
	Resub                *NotificationResub            `json:"resub"`
	SubGift              *NotificationSubGift          `json:"sub_gift"`
	CommunitySubGift     *NotificationCommunitySubGift `json:"community_sub_gift"`
	GiftPaidUpgrade      *NotificationGiftPaidUpgrade  `json:"gift_paid_upgrade"`
	PrimePaidUpgrade     *NotificationPrimePaidUpgrade `json:"prime_paid_upgrade"`
	PayItForward         *NotificationPayItForward     `json:"pay_it_forward"`
	Raid                 *NotificationRaid             `json:"raid"`
	Unraid               any                           `json:"unraid"`
	Announcement         *NotificationAnnouncement     `json:"announcement"`
	BitsBadgeTier        *NotificationBitsBadgeTier    `json:"bits_badge_tier"`
	CharityDonation      *NotificationCharityDonation  `json:"charity_donation"`
}

type ChannelChatSettingsUpdateEvent added in v1.1.0

type ChannelChatSettingsUpdateEvent struct {
	BroadcasterUserID           string `json:"broadcaster_user_id"`
	BroadcasterUserLogin        string `json:"broadcaster_user_login"`
	BroadcasterUserName         string `json:"broadcaster_user_name"`
	EmoteMode                   bool   `json:"emote_mode"`
	FollowerMode                bool   `json:"follower_mode"`
	FollowerModeDurationMinutes *int   `json:"follower_mode_duration_minutes"`
	SlowMode                    bool   `json:"slow_mode"`
	SlowModeWaitTimeSeconds     int    `json:"slow_mode_wait_time_seconds"`
	SubscriberMode              bool   `json:"subscriber_mode"`
	UniqueChatMode              bool   `json:"unique_chat_mode"`
}

type ChannelChatUserMessageHoldEvent added in v1.1.0

type ChannelChatUserMessageHoldEvent struct {
	BroadcasterUserID    string  `json:"broadcaster_user_id"`
	BroadcasterUserLogin string  `json:"broadcaster_user_login"`
	BroadcasterUserName  string  `json:"broadcaster_user_name"`
	UserID               string  `json:"user_id"`
	UserLogin            string  `json:"user_login"`
	UserName             string  `json:"user_name"`
	MessageID            string  `json:"message_id"`
	Message              Message `json:"message"`
}

type ChannelChatUserMessageUpdateEvent added in v1.1.0

type ChannelChatUserMessageUpdateEvent struct {
	BroadcasterUserID    string  `json:"broadcaster_user_id"`
	BroadcasterUserLogin string  `json:"broadcaster_user_login"`
	BroadcasterUserName  string  `json:"broadcaster_user_name"`
	UserID               string  `json:"user_id"`
	UserLogin            string  `json:"user_login"`
	UserName             string  `json:"user_name"`
	Status               string  `json:"status"`
	MessageID            string  `json:"message_id"`
	Message              Message `json:"message"`
}

type ChannelCheerEvent added in v1.1.0

type ChannelCheerEvent struct {
	IsAnonymous          bool    `json:"is_anonymous"`
	UserID               *string `json:"user_id"`
	UserLogin            *string `json:"user_login"`
	UserName             *string `json:"user_name"`
	BroadcasterUserID    string  `json:"broadcaster_user_id"`
	BroadcasterUserLogin string  `json:"broadcaster_user_login"`
	BroadcasterUserName  string  `json:"broadcaster_user_name"`
	Message              string  `json:"message"`
	Bits                 int     `json:"bits"`
}

type ChannelFollowEvent added in v1.1.0

type ChannelFollowEvent struct {
	UserID               string    `json:"user_id"`
	UserLogin            string    `json:"user_login"`
	UserName             string    `json:"user_name"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	FollowedAt           time.Time `json:"followed_at"`
}

type ChannelGoalBeginEvent added in v1.1.0

type ChannelGoalBeginEvent struct {
	ID                   string    `json:"id"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	Type                 string    `json:"type"`
	Description          string    `json:"description"`
	CurrentAmount        int       `json:"current_amount"`
	TargetAmount         int       `json:"target_amount"`
	StartedAt            time.Time `json:"started_at"`
}

type ChannelGoalEndEvent added in v1.1.0

type ChannelGoalEndEvent struct {
	ID                   string    `json:"id"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	Type                 string    `json:"type"`
	Description          string    `json:"description"`
	IsAchieved           bool      `json:"is_achieved"`
	CurrentAmount        int       `json:"current_amount"`
	TargetAmount         int       `json:"target_amount"`
	StartedAt            time.Time `json:"started_at"`
	EndedAt              time.Time `json:"ended_at"`
}

type ChannelGoalProgressEvent added in v1.1.0

type ChannelGoalProgressEvent struct {
	ID                   string    `json:"id"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	Type                 string    `json:"type"`
	Description          string    `json:"description"`
	CurrentAmount        int       `json:"current_amount"`
	TargetAmount         int       `json:"target_amount"`
	StartedAt            time.Time `json:"started_at"`
}

type ChannelGuestStarGuestUpdateEvent added in v1.1.0

type ChannelGuestStarGuestUpdateEvent struct {
	BroadcasterUserID    string  `json:"broadcaster_user_id"`
	BroadcasterUserName  string  `json:"broadcaster_user_name"`
	BroadcasterUserLogin string  `json:"broadcaster_user_login"`
	SessionID            string  `json:"session_id"`
	ModeratorUserID      *string `json:"moderator_user_id"`
	ModeratorUserName    *string `json:"moderator_user_name"`
	ModeratorUserLogin   *string `json:"moderator_user_login"`
	GuestUserID          *string `json:"guest_user_id"`
	GuestUserName        *string `json:"guest_user_name"`
	GuestUserLogin       *string `json:"guest_user_login"`
	SlotID               *string `json:"slot_id"`
	State                *string `json:"state"`
	HostVideoEnabled     *bool   `json:"host_video_enabled"`
	HostAudioEnabled     *bool   `json:"host_audio_enabled"`
	HostVolume           *int    `json:"host_volume"`
	HostUserID           string  `json:"host_user_id"`
	HostUserName         string  `json:"host_user_name"`
	HostUserLogin        string  `json:"host_user_login"`
}

type ChannelGuestStarSessionBeginEvent added in v1.1.0

type ChannelGuestStarSessionBeginEvent struct {
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	ModeratorUserID      string    `json:"moderator_user_id"`
	ModeratorUserName    string    `json:"moderator_user_name"`
	ModeratorUserLogin   string    `json:"moderator_user_login"`
	SessionID            string    `json:"session_id"`
	StartedAt            time.Time `json:"started_at"`
}

type ChannelGuestStarSessionEndEvent added in v1.1.0

type ChannelGuestStarSessionEndEvent struct {
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	ModeratorUserID      string    `json:"moderator_user_id"`
	ModeratorUserName    string    `json:"moderator_user_name"`
	ModeratorUserLogin   string    `json:"moderator_user_login"`
	SessionID            string    `json:"session_id"`
	StartedAt            time.Time `json:"started_at"`
	EndedAt              time.Time `json:"ended_at"`
}

type ChannelGuestStarSettingsUpdateEvent added in v1.1.0

type ChannelGuestStarSettingsUpdateEvent struct {
	BroadcasterUserID           string `json:"broadcaster_user_id"`
	BroadcasterUserName         string `json:"broadcaster_user_name"`
	BroadcasterUserLogin        string `json:"broadcaster_user_login"`
	IsModeratorSendLiveEnabled  bool   `json:"is_moderator_send_live_enabled"`
	SlotCount                   int    `json:"slot_count"`
	IsBrowserSourceAudioEnabled bool   `json:"is_browser_source_audio_enabled"`
	GroupLayout                 string `json:"group_layout"`
}

type ChannelHypeTrainBeginEventV2 added in v1.5.0

type ChannelHypeTrainBeginEventV2 struct {
	ID                      string                   `json:"id"`
	BroadcasterUserID       string                   `json:"broadcaster_user_id"`
	BroadcasterUserLogin    string                   `json:"broadcaster_user_login"`
	BroadcasterUserName     string                   `json:"broadcaster_user_name"`
	Total                   int                      `json:"total"`
	Progress                int                      `json:"progress"`
	Goal                    int                      `json:"goal"`
	TopContributions        []Contribution           `json:"top_contributions"`
	Level                   int                      `json:"level"`
	AllTimeHighLevel        int                      `json:"all_time_high_level"`
	AllTimeHighTotal        int                      `json:"all_time_high_total"`
	SharedTrainParticipants []SharedTrainParticipant `json:"shared_train_participants"`
	StartedAt               time.Time                `json:"started_at"`
	ExpiresAt               time.Time                `json:"expires_at"`
	Type                    string                   `json:"type"`
	IsSharedTrain           bool                     `json:"is_shared_train"`
}

type ChannelHypeTrainEndEventV2 added in v1.5.0

type ChannelHypeTrainEndEventV2 struct {
	ID                      string                   `json:"id"`
	BroadcasterUserID       string                   `json:"broadcaster_user_id"`
	BroadcasterUserLogin    string                   `json:"broadcaster_user_login"`
	BroadcasterUserName     string                   `json:"broadcaster_user_name"`
	Total                   int                      `json:"total"`
	TopContributions        []Contribution           `json:"top_contributions"`
	Level                   int                      `json:"level"`
	SharedTrainParticipants []SharedTrainParticipant `json:"shared_train_participants"`
	StartedAt               time.Time                `json:"started_at"`
	CooldownEndsAt          time.Time                `json:"cooldown_ends_at"`
	EndedAt                 time.Time                `json:"ended_at"`
	Type                    string                   `json:"type"`
	IsSharedTrain           bool                     `json:"is_shared_train"`
}

type ChannelHypeTrainProgressEventV2 added in v1.5.0

type ChannelHypeTrainProgressEventV2 struct {
	ID                      string                   `json:"id"`
	BroadcasterUserID       string                   `json:"broadcaster_user_id"`
	BroadcasterUserLogin    string                   `json:"broadcaster_user_login"`
	BroadcasterUserName     string                   `json:"broadcaster_user_name"`
	Total                   int                      `json:"total"`
	Progress                int                      `json:"progress"`
	Goal                    int                      `json:"goal"`
	TopContributions        []Contribution           `json:"top_contributions"`
	Level                   int                      `json:"level"`
	SharedTrainParticipants []SharedTrainParticipant `json:"shared_train_participants"`
	StartedAt               time.Time                `json:"started_at"`
	ExpiresAt               time.Time                `json:"expires_at"`
	Type                    string                   `json:"type"`
	IsSharedTrain           bool                     `json:"is_shared_train"`
}

type ChannelModerateEventV2 added in v1.5.0

type ChannelModerateEventV2 struct {
	BroadcasterUserID          string                 `json:"broadcaster_user_id"`
	BroadcasterUserLogin       string                 `json:"broadcaster_user_login"`
	BroadcasterUserName        string                 `json:"broadcaster_user_name"`
	SourceBroadcasterUserID    string                 `json:"source_broadcaster_user_id"`
	SourceBroadcasterUserLogin string                 `json:"source_broadcaster_user_login"`
	SourceBroadcasterUserName  string                 `json:"sourcebroadcaster_user_name"`
	ModeratorUserID            string                 `json:"moderator_user_id"`
	ModeratorUserLogin         string                 `json:"moderator_user_login"`
	ModeratorUserName          string                 `json:"moderator_user_name"`
	Action                     string                 `json:"action"`
	Followers                  *FollowDurationMinutes `json:"followers"`
	Slow                       *Slow                  `json:"slow"`
	Vip                        *UserData              `json:"vip"`
	Unvip                      *UserData              `json:"unvip"`
	Mod                        *UserData              `json:"mod"`
	Unmod                      *UserData              `json:"unmod"`
	Ban                        *EventBan              `json:"ban"`
	Unban                      *UserData              `json:"unban"`
	Timeout                    *Timeout               `json:"timeout"`
	Untimeout                  *UserData              `json:"untimeout"`
	Raid                       *EventRaid             `json:"raid"`
	Unraid                     *UserData              `json:"unraid"`
	Delete                     *Delete                `json:"delete"`
	AutomodTerms               *AutoModTerms          `json:"automod_terms"`
	UnbanRequest               *UnBanRequest          `json:"unban_request"`
	Warn                       *WarnEvent             `json:"warn"`
	SharedChatBan              *EventBan              `json:"shared_chat_ban"`
	SharedChatUnban            *UserData              `json:"shared_chat_unban"`
	SharedChatTimeout          *Timeout               `json:"shared_chat_timeout"`
	SharedChatUntimeout        *UserData              `json:"shared_chat_untimeout"`
	SharedChatDelete           *Delete                `json:"shared_chat_delete"`
}

type ChannelModeratorAddEvent added in v1.1.0

type ChannelModeratorAddEvent struct {
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
}

type ChannelModeratorRemoveEvent added in v1.1.0

type ChannelModeratorRemoveEvent struct {
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
}

type ChannelPointsAutomaticRewardRedemptionAddEvent added in v1.1.0

type ChannelPointsAutomaticRewardRedemptionAddEvent struct {
	BroadcasterUserID    string                     `json:"broadcaster_user_id"`
	BroadcasterUserName  string                     `json:"broadcaster_user_name"`
	BroadcasterUserLogin string                     `json:"broadcaster_user_login"`
	UserID               string                     `json:"user_id"`
	UserName             string                     `json:"user_name"`
	UserLogin            string                     `json:"user_login"`
	ID                   string                     `json:"id"`
	Reward               ChannelPointsReward        `json:"reward"`
	Message              ChannelPointsRewardMessage `json:"message"`
	UserInput            string                     `json:"user_input"`
	RedeemedAt           time.Time                  `json:"redeemed_at"`
}

type ChannelPointsCustomRewardAddEvent

type ChannelPointsCustomRewardAddEvent struct {
	ID                                string     `json:"id"`
	BroadcasterUserID                 string     `json:"broadcaster_user_id"`
	BroadcasterUserLogin              string     `json:"broadcaster_user_login"`
	BroadcasterUserName               string     `json:"broadcaster_user_name"`
	IsEnabled                         bool       `json:"is_enabled"`
	IsPaused                          bool       `json:"is_paused"`
	IsInStock                         bool       `json:"is_in_stock"`
	Title                             string     `json:"title"`
	Cost                              int        `json:"cost"`
	Prompt                            string     `json:"prompt"`
	IsUserInputRequired               bool       `json:"is_user_input_required"`
	ShouldRedemptionsSkipRequestQueue bool       `json:"should_redemptions_skip_request_queue"`
	CooldownExpiresAt                 *time.Time `json:"cooldown_expires_at"`
	RedemptionsRedeemedCurrentStream  *int       `json:"redemptions_redeemed_current_stream"`
	MaxPerStream                      MaxPer     `json:"max_per_stream"`
	MaxPerUserPerStream               MaxPer     `json:"max_per_user_per_stream"`
	GlobalCooldown                    Cooldown   `json:"global_cooldown"`
	BackgroundColor                   string     `json:"background_color"`
	Image                             *Image     `json:"image"`
	DefaultImage                      Image      `json:"default_image"`
}

type ChannelPointsCustomRewardRedemptionAddEvent

type ChannelPointsCustomRewardRedemptionAddEvent struct {
	ID                   string    `json:"id"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	UserID               string    `json:"user_id"`
	UserLogin            string    `json:"user_login"`
	UserName             string    `json:"user_name"`
	UserInput            string    `json:"user_input"`
	Status               string    `json:"status"`
	Reward               Reward    `json:"reward"`
	RedeemedAt           time.Time `json:"redeemed_at"`
}

type ChannelPointsCustomRewardRedemptionUpdateEvent

type ChannelPointsCustomRewardRedemptionUpdateEvent struct {
	ID                   string    `json:"id"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	UserID               string    `json:"user_id"`
	UserLogin            string    `json:"user_login"`
	UserName             string    `json:"user_name"`
	UserInput            string    `json:"user_input"`
	Status               string    `json:"status"`
	Reward               Reward    `json:"reward"`
	RedeemedAt           time.Time `json:"redeemed_at"`
}

type ChannelPointsCustomRewardRemoveEvent

type ChannelPointsCustomRewardRemoveEvent struct {
	ID                                string     `json:"id"`
	BroadcasterUserID                 string     `json:"broadcaster_user_id"`
	BroadcasterUserLogin              string     `json:"broadcaster_user_login"`
	BroadcasterUserName               string     `json:"broadcaster_user_name"`
	IsEnabled                         bool       `json:"is_enabled"`
	IsPaused                          bool       `json:"is_paused"`
	IsInStock                         bool       `json:"is_in_stock"`
	Title                             string     `json:"title"`
	Cost                              int        `json:"cost"`
	Prompt                            string     `json:"prompt"`
	IsUserInputRequired               bool       `json:"is_user_input_required"`
	ShouldRedemptionsSkipRequestQueue bool       `json:"should_redemptions_skip_request_queue"`
	CooldownExpiresAt                 *time.Time `json:"cooldown_expires_at"`
	RedemptionsRedeemedCurrentStream  *int       `json:"redemptions_redeemed_current_stream"`
	MaxPerStream                      MaxPer     `json:"max_per_stream"`
	MaxPerUserPerStream               MaxPer     `json:"max_per_user_per_stream"`
	GlobalCooldown                    Cooldown   `json:"global_cooldown"`
	BackgroundColor                   string     `json:"background_color"`
	Image                             *Image     `json:"image"`
	DefaultImage                      Image      `json:"default_image"`
}

type ChannelPointsCustomRewardUpdateEvent

type ChannelPointsCustomRewardUpdateEvent struct {
	ID                                string     `json:"id"`
	BroadcasterUserID                 string     `json:"broadcaster_user_id"`
	BroadcasterUserLogin              string     `json:"broadcaster_user_login"`
	BroadcasterUserName               string     `json:"broadcaster_user_name"`
	IsEnabled                         bool       `json:"is_enabled"`
	IsPaused                          bool       `json:"is_paused"`
	IsInStock                         bool       `json:"is_in_stock"`
	Title                             string     `json:"title"`
	Cost                              int        `json:"cost"`
	Prompt                            string     `json:"prompt"`
	IsUserInputRequired               bool       `json:"is_user_input_required"`
	ShouldRedemptionsSkipRequestQueue bool       `json:"should_redemptions_skip_request_queue"`
	CooldownExpiresAt                 *time.Time `json:"cooldown_expires_at"`
	RedemptionsRedeemedCurrentStream  *int       `json:"redemptions_redeemed_current_stream"`
	MaxPerStream                      MaxPer     `json:"max_per_stream"`
	MaxPerUserPerStream               MaxPer     `json:"max_per_user_per_stream"`
	GlobalCooldown                    Cooldown   `json:"global_cooldown"`
	BackgroundColor                   string     `json:"background_color"`
	Image                             *Image     `json:"image"`
	DefaultImage                      Image      `json:"default_image"`
}

type ChannelPointsReward added in v1.2.0

type ChannelPointsReward struct {
	Type          string               `json:"type"`
	ChannelPoints int                  `json:"channel_points"`
	Emote         *RewardUnlockedEmote `json:"emote"`
}

type ChannelPointsRewardEmote added in v1.2.0

type ChannelPointsRewardEmote struct {
	ID string `json:"id"`
}

type ChannelPointsRewardMessage added in v1.2.0

type ChannelPointsRewardMessage struct {
	Text      string                               `json:"text"`
	Fragments []ChannelPointsRewardMessageFragment `json:"fragments"`
}

type ChannelPointsRewardMessageFragment added in v1.6.0

type ChannelPointsRewardMessageFragment struct {
	Type  string                   `json:"type"`
	Text  string                   `json:"text"`
	Emote ChannelPointsRewardEmote `json:"emote"`
}

type ChannelPointsVoting added in v1.1.0

type ChannelPointsVoting struct {
	IsEnabled     bool `json:"is_enabled"`
	AmountPerVote int  `json:"amount_per_vote"`
}

type ChannelPollBeginEvent added in v1.1.0

type ChannelPollBeginEvent struct {
	ID                   string              `json:"id"`
	BroadcasterUserID    string              `json:"broadcaster_user_id"`
	BroadcasterUserLogin string              `json:"broadcaster_user_login"`
	BroadcasterUserName  string              `json:"broadcaster_user_name"`
	Title                string              `json:"title"`
	Choices              []Choices           `json:"choices"`
	ChannelPointsVoting  ChannelPointsVoting `json:"channel_points_voting"`
	StartedAt            time.Time           `json:"started_at"`
	EndsAt               time.Time           `json:"ends_at"`
}

type ChannelPollEndEvent added in v1.1.0

type ChannelPollEndEvent struct {
	ID                   string              `json:"id"`
	BroadcasterUserID    string              `json:"broadcaster_user_id"`
	BroadcasterUserLogin string              `json:"broadcaster_user_login"`
	BroadcasterUserName  string              `json:"broadcaster_user_name"`
	Title                string              `json:"title"`
	Choices              []Choices           `json:"choices"`
	ChannelPointsVoting  ChannelPointsVoting `json:"channel_points_voting"`
	Status               string              `json:"status"`
	StartedAt            time.Time           `json:"started_at"`
	EndedAt              time.Time           `json:"ended_at"`
}

type ChannelPollProgressEvent added in v1.1.0

type ChannelPollProgressEvent struct {
	ID                   string              `json:"id"`
	BroadcasterUserID    string              `json:"broadcaster_user_id"`
	BroadcasterUserLogin string              `json:"broadcaster_user_login"`
	BroadcasterUserName  string              `json:"broadcaster_user_name"`
	Title                string              `json:"title"`
	Choices              []Choices           `json:"choices"`
	ChannelPointsVoting  ChannelPointsVoting `json:"channel_points_voting"`
	StartedAt            time.Time           `json:"started_at"`
	EndsAt               time.Time           `json:"ends_at"`
}

type ChannelPredictionBeginEvent added in v1.1.0

type ChannelPredictionBeginEvent struct {
	ID                   string     `json:"id"`
	BroadcasterUserID    string     `json:"broadcaster_user_id"`
	BroadcasterUserLogin string     `json:"broadcaster_user_login"`
	BroadcasterUserName  string     `json:"broadcaster_user_name"`
	Title                string     `json:"title"`
	Outcomes             []Outcomes `json:"outcomes"`
	StartedAt            time.Time  `json:"started_at"`
	LocksAt              time.Time  `json:"locks_at"`
}

type ChannelPredictionEndEvent added in v1.1.0

type ChannelPredictionEndEvent struct {
	ID                   string     `json:"id"`
	BroadcasterUserID    string     `json:"broadcaster_user_id"`
	BroadcasterUserLogin string     `json:"broadcaster_user_login"`
	BroadcasterUserName  string     `json:"broadcaster_user_name"`
	Title                string     `json:"title"`
	WinningOutcomeID     string     `json:"winning_outcome_id"`
	Outcomes             []Outcomes `json:"outcomes"`
	Status               string     `json:"status"`
	StartedAt            time.Time  `json:"started_at"`
	EndedAt              time.Time  `json:"ended_at"`
}

type ChannelPredictionLockEvent added in v1.1.0

type ChannelPredictionLockEvent struct {
	ID                   string     `json:"id"`
	BroadcasterUserID    string     `json:"broadcaster_user_id"`
	BroadcasterUserLogin string     `json:"broadcaster_user_login"`
	BroadcasterUserName  string     `json:"broadcaster_user_name"`
	Title                string     `json:"title"`
	Outcomes             []Outcomes `json:"outcomes"`
	StartedAt            time.Time  `json:"started_at"`
	LockedAt             time.Time  `json:"locked_at"`
}

type ChannelPredictionProgressEvent added in v1.1.0

type ChannelPredictionProgressEvent struct {
	ID                   string     `json:"id"`
	BroadcasterUserID    string     `json:"broadcaster_user_id"`
	BroadcasterUserLogin string     `json:"broadcaster_user_login"`
	BroadcasterUserName  string     `json:"broadcaster_user_name"`
	Title                string     `json:"title"`
	Outcomes             []Outcomes `json:"outcomes"`
	StartedAt            time.Time  `json:"started_at"`
	LocksAt              time.Time  `json:"locks_at"`
}

type ChannelRaidEvent added in v1.1.0

type ChannelRaidEvent struct {
	FromBroadcasterUserID    string `json:"from_broadcaster_user_id"`
	FromBroadcasterUserLogin string `json:"from_broadcaster_user_login"`
	FromBroadcasterUserName  string `json:"from_broadcaster_user_name"`
	ToBroadcasterUserID      string `json:"to_broadcaster_user_id"`
	ToBroadcasterUserLogin   string `json:"to_broadcaster_user_login"`
	ToBroadcasterUserName    string `json:"to_broadcaster_user_name"`
	Viewers                  int    `json:"viewers"`
}

type ChannelShieldModeBeginEvent added in v1.1.0

type ChannelShieldModeBeginEvent struct {
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	ModeratorUserID      string    `json:"moderator_user_id"`
	ModeratorUserName    string    `json:"moderator_user_name"`
	ModeratorUserLogin   string    `json:"moderator_user_login"`
	StartedAt            time.Time `json:"started_at"`
}

type ChannelShieldModeEndEvent added in v1.1.0

type ChannelShieldModeEndEvent struct {
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	ModeratorUserID      string    `json:"moderator_user_id"`
	ModeratorUserName    string    `json:"moderator_user_name"`
	ModeratorUserLogin   string    `json:"moderator_user_login"`
	EndedAt              time.Time `json:"ended_at"`
}

type ChannelShoutOutCreateEvent added in v1.1.0

type ChannelShoutOutCreateEvent struct {
	BroadcasterUserID      string    `json:"broadcaster_user_id"`
	BroadcasterUserName    string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin   string    `json:"broadcaster_user_login"`
	ModeratorUserID        string    `json:"moderator_user_id"`
	ModeratorUserName      string    `json:"moderator_user_name"`
	ModeratorUserLogin     string    `json:"moderator_user_login"`
	ToBroadcasterUserID    string    `json:"to_broadcaster_user_id"`
	ToBroadcasterUserName  string    `json:"to_broadcaster_user_name"`
	ToBroadcasterUserLogin string    `json:"to_broadcaster_user_login"`
	StartedAt              time.Time `json:"started_at"`
	ViewerCount            int       `json:"viewer_count"`
	CooldownEndsAt         time.Time `json:"cooldown_ends_at"`
	TargetCooldownEndsAt   time.Time `json:"target_cooldown_ends_at"`
}

type ChannelShoutOutReceivedEvent added in v1.1.0

type ChannelShoutOutReceivedEvent struct {
	BroadcasterUserID        string    `json:"broadcaster_user_id"`
	BroadcasterUserName      string    `json:"broadcaster_user_name"`
	BroadcasterUserLogin     string    `json:"broadcaster_user_login"`
	FromBroadcasterUserID    string    `json:"from_broadcaster_user_id"`
	FromBroadcasterUserName  string    `json:"from_broadcaster_user_name"`
	FromBroadcasterUserLogin string    `json:"from_broadcaster_user_login"`
	ViewerCount              int       `json:"viewer_count"`
	StartedAt                time.Time `json:"started_at"`
}

type ChannelSubscribeEvent added in v1.1.0

type ChannelSubscribeEvent struct {
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	Tier                 string `json:"tier"`
	IsGift               bool   `json:"is_gift"`
}

type ChannelSubscriptionEndEvent added in v1.1.0

type ChannelSubscriptionEndEvent struct {
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	Tier                 string `json:"tier"`
	IsGift               bool   `json:"is_gift"`
}

type ChannelSubscriptionGiftEvent added in v1.1.0

type ChannelSubscriptionGiftEvent struct {
	UserID               *string `json:"user_id"`
	UserLogin            *string `json:"user_login"`
	UserName             *string `json:"user_name"`
	BroadcasterUserID    string  `json:"broadcaster_user_id"`
	BroadcasterUserLogin string  `json:"broadcaster_user_login"`
	BroadcasterUserName  string  `json:"broadcaster_user_name"`
	Total                int     `json:"total"`
	Tier                 string  `json:"tier"`
	CumulativeTotal      *int    `json:"cumulative_total"`
	IsAnonymous          bool    `json:"is_anonymous"`
}

type ChannelSubscriptionMessageEvent added in v1.1.0

type ChannelSubscriptionMessageEvent struct {
	UserID               string                    `json:"user_id"`
	UserLogin            string                    `json:"user_login"`
	UserName             string                    `json:"user_name"`
	BroadcasterUserID    string                    `json:"broadcaster_user_id"`
	BroadcasterUserLogin string                    `json:"broadcaster_user_login"`
	BroadcasterUserName  string                    `json:"broadcaster_user_name"`
	Tier                 string                    `json:"tier"`
	Message              SubscriptionMessageStruct `json:"message"`
	CumulativeMonths     int                       `json:"cumulative_months"`
	StreakMonths         *int                      `json:"streak_months"`
	DurationMonths       int                       `json:"duration_months"`
}

type ChannelSuspiciousUserMessageEvent added in v1.5.0

type ChannelSuspiciousUserMessageEvent struct {
	BroadcasterUserID    string            `json:"broadcaster_user_id"`
	BroadcasterUserLogin string            `json:"broadcaster_user_login"`
	BroadcasterUserName  string            `json:"broadcaster_user_name"`
	UserID               string            `json:"user_id"`
	UserLogin            string            `json:"user_login"`
	UserName             string            `json:"user_name"`
	LowTrustStatus       string            `json:"low_trust_status"`
	SharedBanChannelIDs  []string          `json:"shared_ban_channel_ids"`
	Types                []string          `json:"types"`
	BanEvasionEvaluation string            `json:"ban_evasion_evaluation"`
	Message              SuspiciousMessage `json:"message"`
}

type ChannelSuspiciousUserUpdateEvent added in v1.4.0

type ChannelSuspiciousUserUpdateEvent struct {
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	ModeratorUserID      string `json:"moderator_user_id"`
	ModeratorUserName    string `json:"moderator_user_name"`
	ModeratorUserLogin   string `json:"moderator_user_login"`
	UserID               string `json:"user_id"`
	UserName             string `json:"user_name"`
	UserLogin            string `json:"user_login"`
	LowTrustStatus       string `json:"low_trust_status"`
}

type ChannelUnbanEvent added in v1.1.0

type ChannelUnbanEvent struct {
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	ModeratorUserID      string `json:"moderator_user_id"`
	ModeratorUserLogin   string `json:"moderator_user_login"`
	ModeratorUserName    string `json:"moderator_user_name"`
}

type ChannelUnbanRequestCreateEvent added in v1.1.0

type ChannelUnbanRequestCreateEvent struct {
	ID                   string    `json:"id"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	UserID               string    `json:"user_id"`
	UserLogin            string    `json:"user_login"`
	UserName             string    `json:"user_name"`
	Text                 string    `json:"text"`
	CreatedAt            time.Time `json:"created_at"`
}

type ChannelUnbanRequestResolveEvent added in v1.1.0

type ChannelUnbanRequestResolveEvent struct {
	ID                   string `json:"id"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	ModeratorUserID      string `json:"moderator_user_id"`
	ModeratorUserLogin   string `json:"moderator_user_login"`
	ModeratorUserName    string `json:"moderator_user_name"`
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	ResolutionText       string `json:"resolution_text"`
	Status               string `json:"status"`
}

type ChannelUpdateEvent added in v1.0.0

type ChannelUpdateEvent struct {
	BroadcasterUserID           string   `json:"broadcaster_user_id"`
	BroadcasterUserLogin        string   `json:"broadcaster_user_login"`
	BroadcasterUserName         string   `json:"broadcaster_user_name"`
	Title                       string   `json:"title"`
	Language                    string   `json:"language"`
	CategoryID                  string   `json:"category_id"`
	CategoryName                string   `json:"category_name"`
	ContentClassificationLabels []string `json:"content_classification_labels"`
}

type ChannelVIPAddEvent added in v1.1.0

type ChannelVIPAddEvent struct {
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
}

type ChannelVIPRemoveEvent added in v1.1.0

type ChannelVIPRemoveEvent struct {
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
}

type ChannelWarningAcknowledgeEvent added in v1.5.0

type ChannelWarningAcknowledgeEvent struct {
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
}

type ChannelWarningSendEvent added in v1.5.0

type ChannelWarningSendEvent struct {
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	ModeratorUserID      string    `json:"moderator_user_id"`
	ModeratorUserLogin   string    `json:"moderator_user_login"`
	ModeratorUserName    string    `json:"moderator_user_name"`
	UserID               string    `json:"user_id"`
	UserLogin            string    `json:"user_login"`
	UserName             string    `json:"user_name"`
	Reason               *string   `json:"reason"`
	ChatRulesCited       *[]string `json:"chat_rules_cited"`
}

type CharityCampaignDonateEvent

type CharityCampaignDonateEvent struct {
	ID                   string `json:"id"`
	CampaignID           string `json:"campaign_id"`
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	UserID               string `json:"user_id"`
	UserLogin            string `json:"user_login"`
	UserName             string `json:"user_name"`
	CharityName          string `json:"charity_name"`
	CharityDescription   string `json:"charity_description"`
	CharityWebsite       string `json:"charity_website"`
	Amount               Amount `json:"amount"`
}

type CharityCampaignProgressEvent added in v1.1.0

type CharityCampaignProgressEvent struct {
	ID                 string `json:"id"`
	BroadcasterID      string `json:"broadcaster_id"`
	BroadcasterName    string `json:"broadcaster_name"`
	BroadcasterLogin   string `json:"broadcaster_login"`
	CharityName        string `json:"charity_name"`
	CharityDescription string `json:"charity_description"`
	CharityWebsite     string `json:"charity_website"`
	CurrentAmount      Amount `json:"current_amount"`
	TargetAmount       Amount `json:"target_amount"`
}

type CharityCampaignStartEvent added in v1.1.0

type CharityCampaignStartEvent struct {
	ID                 string    `json:"id"`
	BroadcasterID      string    `json:"broadcaster_id"`
	BroadcasterName    string    `json:"broadcaster_name"`
	BroadcasterLogin   string    `json:"broadcaster_login"`
	CharityName        string    `json:"charity_name"`
	CharityDescription string    `json:"charity_description"`
	CharityWebsite     string    `json:"charity_website"`
	CurrentAmount      Amount    `json:"current_amount"`
	TargetAmount       Amount    `json:"target_amount"`
	StartedAt          time.Time `json:"started_at"`
}

type CharityCampaignStopEvent added in v1.1.0

type CharityCampaignStopEvent struct {
	ID                 string    `json:"id"`
	BroadcasterID      string    `json:"broadcaster_id"`
	BroadcasterName    string    `json:"broadcaster_name"`
	BroadcasterLogin   string    `json:"broadcaster_login"`
	CharityName        string    `json:"charity_name"`
	CharityDescription string    `json:"charity_description"`
	CharityWebsite     string    `json:"charity_website"`
	CurrentAmount      Amount    `json:"current_amount"`
	TargetAmount       Amount    `json:"target_amount"`
	StoppedAt          time.Time `json:"stopped_at"`
}

type Cheermote added in v1.1.0

type Cheermote struct {
	Bits   int    `json:"bits"`
	Prefix string `json:"prefix"`
	Tier   int    `json:"tier"`
}

type Choices added in v1.1.0

type Choices struct {
	ID                 string `json:"id"`
	Title              string `json:"title"`
	ChannelPointsVotes int    `json:"channel_points_votes"`
	Votes              int    `json:"votes"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(crtPath, keyPath, secret, callback string) *Client

func (*Client) DeleteSubscription

func (c *Client) DeleteSubscription(id, token, clientId string) error

DeleteSubscription Requires an application OAuth access token.

func (*Client) GetSubscriptions

func (c *Client) GetSubscriptions(token, clientId, subType, userId, after string, status []string) (SubscriptionResponse, error)

GetSubscriptions Requires an application OAuth access token.

func (*Client) OnAutomodMessageHold added in v1.1.0

func (c *Client) OnAutomodMessageHold(f func(event AutomodMessageHoldEvent))

func (*Client) OnAutomodMessageUpdate added in v1.1.0

func (c *Client) OnAutomodMessageUpdate(f func(event AutomodMessageUpdateEvent))

func (*Client) OnAutomodSettingsUpdate added in v1.1.0

func (c *Client) OnAutomodSettingsUpdate(f func(event AutomodSettingsUpdateEvent))

func (*Client) OnAutomodTermsUpdate added in v1.1.0

func (c *Client) OnAutomodTermsUpdate(f func(event AutomodTermsUpdateEvent))

func (*Client) OnChannelAdBreakBegin added in v1.1.0

func (c *Client) OnChannelAdBreakBegin(f func(event ChannelAdBreakBeginEvent))

func (*Client) OnChannelBan added in v1.1.0

func (c *Client) OnChannelBan(f func(event ChannelBanEvent))

func (*Client) OnChannelBitsUse added in v1.5.0

func (c *Client) OnChannelBitsUse(f func(event ChannelBitsUseEvent))

func (*Client) OnChannelCharityCampaignProgress added in v1.1.0

func (c *Client) OnChannelCharityCampaignProgress(f func(event CharityCampaignProgressEvent))

func (*Client) OnChannelChatClear added in v1.1.0

func (c *Client) OnChannelChatClear(f func(event ChannelChatClearEvent))

func (*Client) OnChannelChatClearUserMessages added in v1.1.0

func (c *Client) OnChannelChatClearUserMessages(f func(event ChannelChatClearUserMessagesEvent))

func (*Client) OnChannelChatMessage added in v1.1.0

func (c *Client) OnChannelChatMessage(f func(event ChannelChatMessageEvent))

func (*Client) OnChannelChatMessageDelete added in v1.1.0

func (c *Client) OnChannelChatMessageDelete(f func(event ChannelChatMessageDeleteEvent))

func (*Client) OnChannelChatNotification added in v1.1.0

func (c *Client) OnChannelChatNotification(f func(event ChannelChatNotificationEvent))

func (*Client) OnChannelChatSettingsUpdate added in v1.1.0

func (c *Client) OnChannelChatSettingsUpdate(f func(event ChannelChatSettingsUpdateEvent))

func (*Client) OnChannelChatUserMessageHold added in v1.1.0

func (c *Client) OnChannelChatUserMessageHold(f func(event ChannelChatUserMessageHoldEvent))

func (*Client) OnChannelChatUserMessageUpdate added in v1.1.0

func (c *Client) OnChannelChatUserMessageUpdate(f func(event ChannelChatUserMessageUpdateEvent))

func (*Client) OnChannelCheer added in v1.1.0

func (c *Client) OnChannelCheer(f func(event ChannelCheerEvent))

func (*Client) OnChannelFollow added in v1.1.0

func (c *Client) OnChannelFollow(f func(event ChannelFollowEvent))

func (*Client) OnChannelGoalBegin added in v1.1.0

func (c *Client) OnChannelGoalBegin(f func(event ChannelGoalBeginEvent))

func (*Client) OnChannelGoalEnd added in v1.1.0

func (c *Client) OnChannelGoalEnd(f func(event ChannelGoalEndEvent))

func (*Client) OnChannelGoalProgress added in v1.1.0

func (c *Client) OnChannelGoalProgress(f func(event ChannelGoalProgressEvent))

func (*Client) OnChannelGuestStarGuestUpdate added in v1.1.0

func (c *Client) OnChannelGuestStarGuestUpdate(f func(event ChannelGuestStarGuestUpdateEvent))

func (*Client) OnChannelGuestStarSessionBegin added in v1.1.0

func (c *Client) OnChannelGuestStarSessionBegin(f func(event ChannelGuestStarSessionBeginEvent))

func (*Client) OnChannelGuestStarSessionEnd added in v1.1.0

func (c *Client) OnChannelGuestStarSessionEnd(f func(event ChannelGuestStarSessionEndEvent))

func (*Client) OnChannelGuestStarSettingsUpdate added in v1.1.0

func (c *Client) OnChannelGuestStarSettingsUpdate(f func(event ChannelGuestStarSettingsUpdateEvent))

func (*Client) OnChannelHypeTrainBegin added in v1.1.0

func (c *Client) OnChannelHypeTrainBegin(f func(event ChannelHypeTrainBeginEventV2))

func (*Client) OnChannelHypeTrainEnd added in v1.1.0

func (c *Client) OnChannelHypeTrainEnd(f func(event ChannelHypeTrainEndEventV2))

func (*Client) OnChannelHypeTrainProgress added in v1.1.0

func (c *Client) OnChannelHypeTrainProgress(f func(event ChannelHypeTrainProgressEventV2))

func (*Client) OnChannelModerate added in v1.1.0

func (c *Client) OnChannelModerate(f func(event ChannelModerateEventV2))

func (*Client) OnChannelModeratorAdd added in v1.1.0

func (c *Client) OnChannelModeratorAdd(f func(event ChannelModeratorAddEvent))

func (*Client) OnChannelModeratorRemove added in v1.1.0

func (c *Client) OnChannelModeratorRemove(f func(event ChannelModeratorRemoveEvent))

func (*Client) OnChannelPointsAutomaticRewardRedemptionAdd added in v1.1.0

func (c *Client) OnChannelPointsAutomaticRewardRedemptionAdd(f func(event ChannelPointsAutomaticRewardRedemptionAddEvent))

func (*Client) OnChannelPointsCustomRewardAdd

func (c *Client) OnChannelPointsCustomRewardAdd(f func(event ChannelPointsCustomRewardAddEvent))

func (*Client) OnChannelPointsCustomRewardRedemptionAdd

func (c *Client) OnChannelPointsCustomRewardRedemptionAdd(f func(event ChannelPointsCustomRewardRedemptionAddEvent))

func (*Client) OnChannelPointsCustomRewardRedemptionUpdate

func (c *Client) OnChannelPointsCustomRewardRedemptionUpdate(f func(event ChannelPointsCustomRewardRedemptionUpdateEvent))

func (*Client) OnChannelPointsCustomRewardRemove

func (c *Client) OnChannelPointsCustomRewardRemove(f func(event ChannelPointsCustomRewardRemoveEvent))

func (*Client) OnChannelPointsCustomRewardUpdate

func (c *Client) OnChannelPointsCustomRewardUpdate(f func(event ChannelPointsCustomRewardUpdateEvent))

func (*Client) OnChannelPollBegin added in v1.1.0

func (c *Client) OnChannelPollBegin(f func(event ChannelPollBeginEvent))

func (*Client) OnChannelPollEnd added in v1.1.0

func (c *Client) OnChannelPollEnd(f func(event ChannelPollEndEvent))

func (*Client) OnChannelPollProgress added in v1.1.0

func (c *Client) OnChannelPollProgress(f func(event ChannelPollProgressEvent))

func (*Client) OnChannelPredictionBegin added in v1.1.0

func (c *Client) OnChannelPredictionBegin(f func(event ChannelPredictionBeginEvent))

func (*Client) OnChannelPredictionEnd added in v1.1.0

func (c *Client) OnChannelPredictionEnd(f func(event ChannelPredictionEndEvent))

func (*Client) OnChannelPredictionLock added in v1.1.0

func (c *Client) OnChannelPredictionLock(f func(event ChannelPredictionLockEvent))

func (*Client) OnChannelPredictionProgress added in v1.1.0

func (c *Client) OnChannelPredictionProgress(f func(event ChannelPredictionProgressEvent))

func (*Client) OnChannelRaid added in v1.1.0

func (c *Client) OnChannelRaid(f func(event ChannelRaidEvent))

func (*Client) OnChannelShieldModeBegin added in v1.1.0

func (c *Client) OnChannelShieldModeBegin(f func(event ChannelShieldModeBeginEvent))

func (*Client) OnChannelShieldModeEnd added in v1.1.0

func (c *Client) OnChannelShieldModeEnd(f func(event ChannelShieldModeEndEvent))

func (*Client) OnChannelShoutOutCreate added in v1.1.0

func (c *Client) OnChannelShoutOutCreate(f func(event ChannelShoutOutCreateEvent))

func (*Client) OnChannelShoutOutReceived added in v1.1.0

func (c *Client) OnChannelShoutOutReceived(f func(event ChannelShoutOutReceivedEvent))

func (*Client) OnChannelSubscribe added in v1.1.0

func (c *Client) OnChannelSubscribe(f func(event ChannelSubscribeEvent))

func (*Client) OnChannelSubscriptionEnd added in v1.1.0

func (c *Client) OnChannelSubscriptionEnd(f func(event ChannelSubscriptionEndEvent))

func (*Client) OnChannelSubscriptionGift added in v1.1.0

func (c *Client) OnChannelSubscriptionGift(f func(event ChannelSubscriptionGiftEvent))

func (*Client) OnChannelSubscriptionMessage added in v1.1.0

func (c *Client) OnChannelSubscriptionMessage(f func(event ChannelSubscriptionMessageEvent))

func (*Client) OnChannelSuspiciousUserMessage added in v1.5.0

func (c *Client) OnChannelSuspiciousUserMessage(f func(event ChannelSuspiciousUserMessageEvent))

func (*Client) OnChannelSuspiciousUserUpdate added in v1.4.0

func (c *Client) OnChannelSuspiciousUserUpdate(f func(event ChannelSuspiciousUserUpdateEvent))

func (*Client) OnChannelUnban added in v1.1.0

func (c *Client) OnChannelUnban(f func(event ChannelUnbanEvent))

func (*Client) OnChannelUnbanRequestCreate added in v1.1.0

func (c *Client) OnChannelUnbanRequestCreate(f func(event ChannelUnbanRequestCreateEvent))

func (*Client) OnChannelUnbanRequestResolve added in v1.1.0

func (c *Client) OnChannelUnbanRequestResolve(f func(event ChannelUnbanRequestResolveEvent))

func (*Client) OnChannelUpdate added in v1.0.0

func (c *Client) OnChannelUpdate(f func(event ChannelUpdateEvent))

func (*Client) OnChannelVipAdd added in v1.1.0

func (c *Client) OnChannelVipAdd(f func(event ChannelVIPAddEvent))

func (*Client) OnChannelVipRemove added in v1.1.0

func (c *Client) OnChannelVipRemove(f func(event ChannelVIPRemoveEvent))

func (*Client) OnChannelWarningAcknowledge added in v1.5.0

func (c *Client) OnChannelWarningAcknowledge(f func(event ChannelWarningAcknowledgeEvent))

func (*Client) OnChannelWarningSend added in v1.5.0

func (c *Client) OnChannelWarningSend(f func(event ChannelWarningSendEvent))

func (*Client) OnCharityCampaignDonate added in v1.1.0

func (c *Client) OnCharityCampaignDonate(f func(event CharityCampaignDonateEvent))

func (*Client) OnCharityCampaignStart added in v1.1.0

func (c *Client) OnCharityCampaignStart(f func(event CharityCampaignStartEvent))

func (*Client) OnCharityCampaignStop added in v1.1.0

func (c *Client) OnCharityCampaignStop(f func(event CharityCampaignStopEvent))

func (*Client) OnConduitShardDisabled added in v1.1.0

func (c *Client) OnConduitShardDisabled(f func(event ConduitShardDisabledEvent))

func (*Client) OnDebug added in v1.3.0

func (c *Client) OnDebug(f func(msg string))

func (*Client) OnDropEntitlementGrant added in v1.1.0

func (c *Client) OnDropEntitlementGrant(f func(event DropEntitlementGrantEvent))

func (*Client) OnError

func (c *Client) OnError(f func(err error))

func (*Client) OnExtensionBitsTransactionCreate

func (c *Client) OnExtensionBitsTransactionCreate(f func(event ExtensionBitsTransactionCreateEvent))

func (*Client) OnRevoked

func (c *Client) OnRevoked(f func(sub Subscription))

func (*Client) OnStreamOffline

func (c *Client) OnStreamOffline(f func(event StreamOfflineEvent))

func (*Client) OnStreamOnline

func (c *Client) OnStreamOnline(f func(event StreamOnlineEvent))

func (*Client) OnUserAuthorizationGrant

func (c *Client) OnUserAuthorizationGrant(f func(event UserAuthorizationGrantEvent))

func (*Client) OnUserAuthorizationRevoke

func (c *Client) OnUserAuthorizationRevoke(f func(event UserAuthorizationRevokeEvent))

func (*Client) OnUserUpdate

func (c *Client) OnUserUpdate(f func(event UserUpdateEvent))

func (*Client) OnUserWhisperMessage added in v1.5.0

func (c *Client) OnUserWhisperMessage(f func(event UserWhisperMessageEvent))

func (*Client) SetDebug added in v1.3.0

func (c *Client) SetDebug(b bool)

func (*Client) StartServer

func (c *Client) StartServer()

func (*Client) StopServer

func (c *Client) StopServer() error

func (*Client) SubscribeToEvent

func (c *Client) SubscribeToEvent(event EventType, broadcasterId, token, clientId string) (SubscriptionResponse, error)

type Condition added in v1.1.0

type Condition struct {
	BroadcasterUserId     string `json:"broadcaster_user_id"`
	ModeratorUserId       string `json:"moderator_user_id"`
	UserID                string `json:"user_id"`
	FromBroadcasterUserId string `json:"from_broadcaster_user_id"`
	ToBroadcasterUserId   string `json:"to_broadcaster_user_id"`
}

type ConduitShardDisabledEvent added in v1.1.0

type ConduitShardDisabledEvent struct {
	ConduitID string           `json:"conduit_id"`
	ShardID   string           `json:"shard_id"`
	Status    string           `json:"status"`
	Transport ConduitTransport `json:"transport"`
}

type ConduitTransport added in v1.2.0

type ConduitTransport struct {
	Method         string     `json:"method"`
	SessionID      *string    `json:"session_id"`
	Callback       *string    `json:"callback"`
	ConnectedAt    *time.Time `json:"connected_at"`
	DisconnectedAt *time.Time `json:"disconnected_at"`
}

type Contribution added in v1.1.0

type Contribution struct {
	UserID    string `json:"user_id"`
	UserLogin string `json:"user_login"`
	UserName  string `json:"user_name"`
	Type      string `json:"type"`
	Total     int    `json:"total"`
}

type Cooldown added in v1.2.0

type Cooldown struct {
	IsEnabled bool `json:"is_enabled"`
	Seconds   int  `json:"seconds"`
}

type Delete added in v1.2.0

type Delete struct {
	UserID      string `json:"user_id"`
	UserLogin   string `json:"user_login"`
	UserName    string `json:"user_name"`
	MessageID   string `json:"message_id"`
	MessageBody string `json:"message_body"`
}

type DropData added in v1.2.0

type DropData struct {
	OrganizationID string    `json:"organization_id"`
	CategoryID     string    `json:"category_id"`
	CategoryName   string    `json:"category_name"`
	CampaignID     string    `json:"campaign_id"`
	UserID         string    `json:"user_id"`
	UserName       string    `json:"user_name"`
	UserLogin      string    `json:"user_login"`
	EntitlementID  string    `json:"entitlement_id"`
	BenefitID      string    `json:"benefit_id"`
	CreatedAt      time.Time `json:"created_at"`
}

type DropEntitlementGrantEvent added in v1.1.0

type DropEntitlementGrantEvent struct {
	Events []DropEvent `json:"events"`
}

type DropEvent added in v1.2.0

type DropEvent struct {
	ID   string   `json:"id"`
	Data DropData `json:"data"`
}

type Emote added in v1.1.0

type Emote struct {
	Text  string `json:"text"`
	ID    string `json:"id"`
	SetID string `json:"set-id"`
}

type Emotes added in v1.2.0

type Emotes struct {
	Begin int    `json:"begin"`
	End   int    `json:"end"`
	ID    string `json:"id"`
}

type EventBan added in v1.2.0

type EventBan struct {
	UserID    string  `json:"user_id"`
	UserLogin string  `json:"user_login"`
	UserName  string  `json:"user_name"`
	Reason    *string `json:"reason"`
}

type EventRaid added in v1.2.0

type EventRaid struct {
	UserID      string `json:"user_id"`
	UserLogin   string `json:"user_login"`
	UserName    string `json:"user_name"`
	ViewerCount int    `json:"viewer_count"`
}

type EventType

type EventType string

type ExtensionBitsTransactionCreateEvent

type ExtensionBitsTransactionCreateEvent struct {
	ID                   string  `json:"id"`
	ExtensionClientID    string  `json:"extension_client_id"`
	BroadcasterUserID    string  `json:"broadcaster_user_id"`
	BroadcasterUserLogin string  `json:"broadcaster_user_login"`
	BroadcasterUserName  string  `json:"broadcaster_user_name"`
	UserName             string  `json:"user_name"`
	UserLogin            string  `json:"user_login"`
	UserID               string  `json:"user_id"`
	Product              Product `json:"product"`
}

type FollowDurationMinutes added in v1.2.0

type FollowDurationMinutes struct {
	FollowDurationMinutes int `json:"follow_duration_minutes"`
}

type Fragment added in v1.2.0

type Fragment struct {
	Text       string      `json:"text"`
	TextType   string      `json:"type"`
	Emotes     []Emote     `json:"emotes"`
	Cheermotes []Cheermote `json:"cheermotes"`
}

type Image added in v1.1.0

type Image struct {
	URL1X string `json:"url_1x"`
	URL2X string `json:"url_2x"`
	URL4X string `json:"url_4x"`
}

type MaxPer added in v1.2.0

type MaxPer struct {
	IsEnabled bool `json:"is_enabled"`
	Value     int  `json:"value"`
}

type Message added in v1.2.0

type Message struct {
	Text      string            `json:"text"`
	Fragments []MessageFragment `json:"fragments"`
}

type MessageCheer added in v1.2.0

type MessageCheer struct {
	Bits int `json:"bits"`
}

type MessageEmote added in v1.2.0

type MessageEmote struct {
	ID         string   `json:"id"`
	EmoteSetID string   `json:"emote_set_id"`
	Format     []string `json:"format"`
	OwnerID    string   `json:"owner_id"`
}

type MessageFragment added in v1.2.0

type MessageFragment struct {
	Type      string          `json:"type"`
	Text      string          `json:"text"`
	Cheermote *Cheermote      `json:"cheermote"`
	Emote     *MessageEmote   `json:"emote"`
	Mention   *MessageMention `json:"mention"`
}

type MessageMention added in v1.2.0

type MessageMention struct {
	UserID    string `json:"user_id"`
	UserName  string `json:"user_name"`
	UserLogin string `json:"user_login"`
}

type NotificationAnnouncement added in v1.2.0

type NotificationAnnouncement struct {
	Color string `json:"color"`
}

type NotificationBitsBadgeTier added in v1.2.0

type NotificationBitsBadgeTier struct {
	Tier int `json:"tier"`
}

type NotificationCharityDonation added in v1.2.0

type NotificationCharityDonation struct {
	CharityName string `json:"charity_name"`
	Amount      Amount `json:"amount"`
}

type NotificationCheermote added in v1.2.0

type NotificationCheermote struct {
	Prefix string `json:"prefix"`
	Bits   int    `json:"bits"`
	Tier   int    `json:"tier"`
}

type NotificationCommunitySubGift added in v1.2.0

type NotificationCommunitySubGift struct {
	ID              string `json:"id"`
	Total           int    `json:"total"`
	SubTier         string `json:"sub_tier"`
	CumulativeTotal *int   `json:"cumulative_total"`
}

type NotificationEmote added in v1.2.0

type NotificationEmote struct {
	ID         string   `json:"id"`
	EmoteSetID string   `json:"emote_set_id"`
	OwnerID    string   `json:"owner_id"`
	Format     []string `json:"format"`
}

type NotificationFragment added in v1.2.0

type NotificationFragment struct {
	Type      string                 `json:"type"`
	Text      string                 `json:"text"`
	Cheermote *NotificationCheermote `json:"cheermote"`
	Emote     *NotificationEmote     `json:"emote"`
	Mention   *NotificationMention   `json:"mention"`
}

type NotificationGiftPaidUpgrade added in v1.2.0

type NotificationGiftPaidUpgrade struct {
	GifterIsAnonymous bool    `json:"gifter_is_anonymous"`
	GifterUserID      *string `json:"gifter_user_id"`
	GifterUserName    *string `json:"gifter_user_name"`
	GifterUserLogin   *string `json:"gifter_user_login"`
}

type NotificationMention added in v1.2.0

type NotificationMention struct {
	UserID    string `json:"user_id"`
	UserName  string `json:"user_name"`
	UserLogin string `json:"user_login"`
}

type NotificationMessage added in v1.2.0

type NotificationMessage struct {
	Text      string                 `json:"text"`
	Fragments []NotificationFragment `json:"fragments"`
}

type NotificationPayItForward added in v1.2.0

type NotificationPayItForward struct {
	GifterIsAnonymous bool    `json:"gifter_is_anonymous"`
	GifterUserID      *string `json:"gifter_user_id"`
	GifterUserName    *string `json:"gifter_user_name"`
	GifterUserLogin   *string `json:"gifter_user_login"`
}

type NotificationPrimePaidUpgrade added in v1.2.0

type NotificationPrimePaidUpgrade struct {
	SubTier string `json:"sub_tier"`
}

type NotificationRaid added in v1.2.0

type NotificationRaid struct {
	UserID          string `json:"user_id"`
	UserName        string `json:"user_name"`
	UserLogin       string `json:"user_login"`
	ViewerCount     int    `json:"viewer_count"`
	ProfileImageURL string `json:"profile_image_url"`
}

type NotificationResub added in v1.2.0

type NotificationResub struct {
	CumulativeMonths  int     `json:"cumulative_months"`
	DurationMonths    int     `json:"duration_months"`
	StreakMonths      int     `json:"streak_months"`
	SubTier           string  `json:"sub_tier"`
	IsPrime           *bool   `json:"is_prime"`
	IsGift            bool    `json:"is_gift"`
	GifterIsAnonymous *bool   `json:"gifter_is_anonymous"`
	GifterUserID      *string `json:"gifter_user_id"`
	GifterUserName    *string `json:"gifter_user_name"`
	GifterUserLogin   *string `json:"gifter_user_login"`
}

type NotificationSub added in v1.2.0

type NotificationSub struct {
	SubTier        string `json:"sub_tier"`
	IsPrime        bool   `json:"is_prime"`
	DurationMonths int    `json:"duration_months"`
}

type NotificationSubGift added in v1.2.0

type NotificationSubGift struct {
	DurationMonths     int     `json:"duration_months"`
	CumulativeTotal    *int    `json:"cumulative_months"`
	RecipientUserID    string  `json:"recipient_user_id"`
	RecipientUserName  string  `json:"recipient_user_name"`
	RecipientUserLogin string  `json:"recipient_user_login"`
	SubTier            string  `json:"sub_tier"`
	CommunityGiftID    *string `json:"community_gift_id"`
}

type Outcomes added in v1.1.0

type Outcomes struct {
	ID            string        `json:"id"`
	Title         string        `json:"title"`
	Color         string        `json:"color"`
	Users         int           `json:"users"`
	ChannelPoints int           `json:"channel_points"`
	TopPredictors TopPredictors `json:"top_predictors"`
}

type Pagination added in v1.1.0

type Pagination struct {
	Cursor string `json:"cursor"`
}

type Product added in v1.1.0

type Product struct {
	Name          string `json:"name"`
	Sku           string `json:"sku"`
	Bits          int    `json:"bits"`
	InDevelopment bool   `json:"in_development"`
}

type Reply added in v1.2.0

type Reply struct {
	ParentMessageID   string `json:"parent_message_id"`
	ParentMessageBody string `json:"parent_message_body"`
	ParentUserID      string `json:"parent_user_id"`
	ParentUserName    string `json:"parent_user_name"`
	ParentUserLogin   string `json:"parent_user_login"`
	ThreadMessageID   string `json:"thread_message_id"`
	ThreadUserID      string `json:"thread_user_id"`
	ThreadUserName    string `json:"thread_user_name"`
	ThreadUserLogin   string `json:"thread_user_login"`
}

type Response added in v1.1.0

type Response struct {
	Challenge    string          `json:"challenge"`
	Subscription Subscription    `json:"subscription"`
	Event        json.RawMessage `json:"event"`
	Events       json.RawMessage `json:"events"`
}

type Reward added in v1.1.0

type Reward struct {
	ID     string `json:"id"`
	Title  string `json:"title"`
	Cost   int    `json:"cost"`
	Prompt string `json:"prompt"`
}

type RewardUnlockedEmote added in v1.2.0

type RewardUnlockedEmote struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type SharedTrainParticipant added in v1.5.0

type SharedTrainParticipant struct {
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
}

type Slow added in v1.2.0

type Slow struct {
	WaitTimeSeconds int `json:"wait_time_seconds"`
}

type StreamOfflineEvent

type StreamOfflineEvent struct {
	BroadcasterUserID    string `json:"broadcaster_user_id"`
	BroadcasterUserLogin string `json:"broadcaster_user_login"`
	BroadcasterUserName  string `json:"broadcaster_user_name"`
}

type StreamOnlineEvent

type StreamOnlineEvent struct {
	ID                   string    `json:"id"`
	BroadcasterUserID    string    `json:"broadcaster_user_id"`
	BroadcasterUserLogin string    `json:"broadcaster_user_login"`
	BroadcasterUserName  string    `json:"broadcaster_user_name"`
	Type                 string    `json:"type"`
	StartedAt            time.Time `json:"started_at"`
}

type Subscription added in v1.1.0

type Subscription struct {
	Id        string    `json:"id"`
	Status    string    `json:"status"`
	Type      string    `json:"type"`
	Version   string    `json:"version"`
	Cost      int       `json:"cost"`
	Condition Condition `json:"condition"`
	Transport Transport `json:"transport"`
	CreatedAt time.Time `json:"created_at"`
}

type SubscriptionMessageStruct added in v1.2.0

type SubscriptionMessageStruct struct {
	Text   string   `json:"text"`
	Emotes []Emotes `json:"emotes"`
}

type SubscriptionRequest

type SubscriptionRequest struct {
	Type      string    `json:"type"`
	Version   string    `json:"version"`
	Condition Condition `json:"condition"`
	Transport Transport `json:"transport"`
}

type SubscriptionResponse

type SubscriptionResponse struct {
	Data         []Subscription `json:"data"`
	Total        int            `json:"total"`
	TotalCost    int            `json:"total_cost"`
	MaxTotalCost int            `json:"max_total_cost"`
	Pagination   Pagination     `json:"pagination"`
}

type SuspiciousMessage added in v1.5.0

type SuspiciousMessage struct {
	MessageID string                      `json:"message_id"`
	Text      string                      `json:"text"`
	Fragments []SuspiciousMessageFragment `json:"fragments"`
}

type SuspiciousMessageFragment added in v1.5.0

type SuspiciousMessageFragment struct {
	Type      string        `json:"type"`
	Text      string        `json:"text"`
	Cheermote *Cheermote    `json:"cheermote"`
	Emote     *MessageEmote `json:"emote"`
}

type Timeout added in v1.2.0

type Timeout struct {
	UserID    string    `json:"user_id"`
	UserLogin string    `json:"user_login"`
	UserName  string    `json:"user_name"`
	Reason    *string   `json:"reason"`
	ExpiresAt time.Time `json:"expires_at"`
}

type TopPredictors added in v1.1.0

type TopPredictors struct {
	UserName          string `json:"user_name"`
	UserLogin         string `json:"user_login"`
	UserID            string `json:"user_id"`
	ChannelPointsWon  *int   `json:"channel_points_won"`
	ChannelPointsUsed int    `json:"channel_points_used"`
}

type Transport added in v1.1.0

type Transport struct {
	Method   string `json:"method"`
	Callback string `json:"callback"`
	Secret   string `json:"secret"`
}

type UnBanRequest added in v1.2.0

type UnBanRequest struct {
	IsApproved       bool   `json:"is_approved"`
	UserID           string `json:"user_id"`
	UserLogin        string `json:"user_login"`
	UserName         string `json:"user_name"`
	ModeratorMessage string `json:"moderator_message"`
}

type UserAuthorizationGrantEvent

type UserAuthorizationGrantEvent struct {
	ClientID  string `json:"client_id"`
	UserID    string `json:"user_id"`
	UserLogin string `json:"user_login"`
	UserName  string `json:"user_name"`
}

type UserAuthorizationRevokeEvent

type UserAuthorizationRevokeEvent struct {
	ClientID  string  `json:"client_id"`
	UserID    string  `json:"user_id"`
	UserLogin *string `json:"user_login"`
	UserName  *string `json:"user_name"`
}

type UserData added in v1.2.0

type UserData struct {
	UserID    string `json:"user_id"`
	UserLogin string `json:"user_login"`
	UserName  string `json:"user_name"`
}

type UserUpdateEvent

type UserUpdateEvent struct {
	UserID        string `json:"user_id"`
	UserLogin     string `json:"user_login"`
	UserName      string `json:"user_name"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	Description   string `json:"description"`
}

type UserWhisperMessageEvent added in v1.5.0

type UserWhisperMessageEvent struct {
	FromUserID    string  `json:"from_user_id"`
	FromUserLogin string  `json:"from_user_login"`
	FromUserName  string  `json:"from_user_name"`
	ToUserID      string  `json:"to_user_id"`
	ToUserLogin   string  `json:"to_user_login"`
	ToUserName    string  `json:"to_user_name"`
	WhisperID     string  `json:"whisper_id"`
	Whisper       Whisper `json:"whisper"`
}

type WarnEvent added in v1.5.0

type WarnEvent struct {
	UserID         string    `json:"user_id"`
	UserLogin      string    `json:"user_login"`
	UserName       string    `json:"user_name"`
	Reason         *string   `json:"reason"`
	ChatRulesCited *[]string `json:"chat_rules_cited"`
}

type Whisper added in v1.2.0

type Whisper struct {
	Text string `json:"text"`
}

Directories

Path Synopsis
examples
subscriptions command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL