Documentation ¶
Index ¶
- Variables
- type BaseCharity
- type Broadcaster
- type ChannelPointReward
- type Client
- func (c *Client) Close() error
- func (c *Client) Connect() error
- func (c *Client) ConnectWithContext(ctx context.Context) error
- func (c *Client) OnError(callback func(err error))
- func (c *Client) OnEventChannelBan(callback func(event EventChannelBan))
- func (c *Client) OnEventChannelChannelPointsCustomRewardAdd(callback func(event EventChannelChannelPointsCustomRewardAdd))
- func (c *Client) OnEventChannelChannelPointsCustomRewardRedemptionAdd(callback func(event EventChannelChannelPointsCustomRewardRedemptionAdd))
- func (c *Client) OnEventChannelChannelPointsCustomRewardRedemptionUpdate(callback func(event EventChannelChannelPointsCustomRewardRedemptionUpdate))
- func (c *Client) OnEventChannelChannelPointsCustomRewardRemove(callback func(event EventChannelChannelPointsCustomRewardRemove))
- func (c *Client) OnEventChannelChannelPointsCustomRewardUpdate(callback func(event EventChannelChannelPointsCustomRewardUpdate))
- func (c *Client) OnEventChannelCharityCampaignDonate(callback func(event EventChannelCharityCampaignDonate))
- func (c *Client) OnEventChannelCharityCampaignProgress(callback func(event EventChannelCharityCampaignProgress))
- func (c *Client) OnEventChannelCharityCampaignStart(callback func(event EventChannelCharityCampaignStart))
- func (c *Client) OnEventChannelCharityCampaignStop(callback func(event EventChannelCharityCampaignStop))
- func (c *Client) OnEventChannelCheer(callback func(event EventChannelCheer))
- func (c *Client) OnEventChannelFollow(callback func(event EventChannelFollow))
- func (c *Client) OnEventChannelGoalBegin(callback func(event EventChannelGoalBegin))
- func (c *Client) OnEventChannelGoalEnd(callback func(event EventChannelGoalEnd))
- func (c *Client) OnEventChannelGoalProgress(callback func(event EventChannelGoalProgress))
- func (c *Client) OnEventChannelHypeTrainBegin(callback func(event EventChannelHypeTrainBegin))
- func (c *Client) OnEventChannelHypeTrainEnd(callback func(event EventChannelHypeTrainEnd))
- func (c *Client) OnEventChannelHypeTrainProgress(callback func(event EventChannelHypeTrainProgress))
- func (c *Client) OnEventChannelModeratorAdd(callback func(event EventChannelModeratorAdd))
- func (c *Client) OnEventChannelModeratorRemove(callback func(event EventChannelModeratorRemove))
- func (c *Client) OnEventChannelPollBegin(callback func(event EventChannelPollBegin))
- func (c *Client) OnEventChannelPollEnd(callback func(event EventChannelPollEnd))
- func (c *Client) OnEventChannelPollProgress(callback func(event EventChannelPollProgress))
- func (c *Client) OnEventChannelPredictionBegin(callback func(event EventChannelPredictionBegin))
- func (c *Client) OnEventChannelPredictionEnd(callback func(event EventChannelPredictionEnd))
- func (c *Client) OnEventChannelPredictionLock(callback func(event EventChannelPredictionLock))
- func (c *Client) OnEventChannelPredictionProgress(callback func(event EventChannelPredictionProgress))
- func (c *Client) OnEventChannelRaid(callback func(event EventChannelRaid))
- func (c *Client) OnEventChannelShieldModeBegin(callback func(event EventChannelShieldModeBegin))
- func (c *Client) OnEventChannelShieldModeEnd(callback func(event EventChannelShieldModeEnd))
- func (c *Client) OnEventChannelSubscribe(callback func(event EventChannelSubscribe))
- func (c *Client) OnEventChannelSubscriptionEnd(callback func(event EventChannelSubscriptionEnd))
- func (c *Client) OnEventChannelSubscriptionGift(callback func(event EventChannelSubscriptionGift))
- func (c *Client) OnEventChannelSubscriptionMessage(callback func(event EventChannelSubscriptionMessage))
- func (c *Client) OnEventChannelUnban(callback func(event EventChannelUnban))
- func (c *Client) OnEventChannelUpdate(callback func(event EventChannelUpdate))
- func (c *Client) OnEventDropEntitlementGrant(callback func(event []EventDropEntitlementGrant))
- func (c *Client) OnEventExtensionBitsTransactionCreate(callback func(event EventExtensionBitsTransactionCreate))
- func (c *Client) OnEventStreamOffline(callback func(event EventStreamOffline))
- func (c *Client) OnEventStreamOnline(callback func(event EventStreamOnline))
- func (c *Client) OnEventUserAuthorizationGrant(callback func(event EventUserAuthorizationGrant))
- func (c *Client) OnEventUserAuthorizationRevoke(callback func(event EventUserAuthorizationRevoke))
- func (c *Client) OnEventUserUpdate(callback func(event EventUserUpdate))
- func (c *Client) OnKeepAlive(callback func(message KeepAliveMessage))
- func (c *Client) OnNotification(callback func(message NotificationMessage))
- func (c *Client) OnRawEvent(...)
- func (c *Client) OnReconnect(callback func(message ReconnectMessage))
- func (c *Client) OnRevoke(callback func(message RevokeMessage))
- func (c *Client) OnWelcome(callback func(message WelcomeMessage))
- type DropEntitlement
- type Emote
- type EventChannelBan
- type EventChannelChannelPointsCustomRewardAdd
- type EventChannelChannelPointsCustomRewardRedemptionAdd
- type EventChannelChannelPointsCustomRewardRedemptionUpdate
- type EventChannelChannelPointsCustomRewardRemove
- type EventChannelChannelPointsCustomRewardUpdate
- type EventChannelCharityCampaignDonate
- type EventChannelCharityCampaignProgress
- type EventChannelCharityCampaignStart
- type EventChannelCharityCampaignStop
- type EventChannelCheer
- type EventChannelFollow
- type EventChannelGoalBegin
- type EventChannelGoalEnd
- type EventChannelGoalProgress
- type EventChannelHypeTrainBegin
- type EventChannelHypeTrainEnd
- type EventChannelHypeTrainProgress
- type EventChannelModeratorAdd
- type EventChannelModeratorRemove
- type EventChannelPollBegin
- type EventChannelPollEnd
- type EventChannelPollProgress
- type EventChannelPredictionBegin
- type EventChannelPredictionEnd
- type EventChannelPredictionLock
- type EventChannelPredictionProgress
- type EventChannelRaid
- type EventChannelShieldModeBegin
- type EventChannelShieldModeEnd
- type EventChannelSubscribe
- type EventChannelSubscriptionEnd
- type EventChannelSubscriptionGift
- type EventChannelSubscriptionMessage
- type EventChannelUnban
- type EventChannelUpdate
- type EventDropEntitlementGrant
- type EventExtensionBitsTransactionCreate
- type EventStreamOffline
- type EventStreamOnline
- type EventSubscription
- type EventUserAuthorizationGrant
- type EventUserAuthorizationRevoke
- type EventUserUpdate
- type ExtensionProduct
- type GlobalCooldown
- type GoalAmount
- type HypeTrainContribution
- type Image
- type KeepAliveMessage
- type MaxChannelPointsPerStream
- type Message
- type MessageMetadata
- type Moderator
- type NotificationMessage
- type PayloadSession
- type PayloadSubscription
- type PollChoice
- type PollVoting
- type PredictionOutcome
- type ReconnectMessage
- type RevokeMessage
- type SubscribeRequest
- type SubscribeResponse
- func SubscribeEvent(request SubscribeRequest) (SubscribeResponse, error)
- func SubscribeEventUrl(request SubscribeRequest, url string) (SubscribeResponse, error)
- func SubscribeEventUrlWithContext(ctx context.Context, request SubscribeRequest, url string) (SubscribeResponse, error)
- func SubscribeEventWithContext(ctx context.Context, request SubscribeRequest) (SubscribeResponse, error)
- type SubscriptionRequest
- type SubscriptionTransport
- type TopPredictor
- type User
- type WelcomeMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConnClosed = fmt.Errorf("connection closed") ErrNilOnWelcome = fmt.Errorf("OnWelcome function was not set") )
Functions ¶
This section is empty.
Types ¶
type BaseCharity ¶
type Broadcaster ¶
type ChannelPointReward ¶
type Client ¶
type Client struct { Address string // contains filtered or unexported fields }
func NewClientWithUrl ¶
func (*Client) OnEventChannelBan ¶
func (c *Client) OnEventChannelBan(callback func(event EventChannelBan))
func (*Client) OnEventChannelChannelPointsCustomRewardAdd ¶
func (c *Client) OnEventChannelChannelPointsCustomRewardAdd(callback func(event EventChannelChannelPointsCustomRewardAdd))
func (*Client) OnEventChannelChannelPointsCustomRewardRedemptionAdd ¶
func (c *Client) OnEventChannelChannelPointsCustomRewardRedemptionAdd(callback func(event EventChannelChannelPointsCustomRewardRedemptionAdd))
func (*Client) OnEventChannelChannelPointsCustomRewardRedemptionUpdate ¶
func (c *Client) OnEventChannelChannelPointsCustomRewardRedemptionUpdate(callback func(event EventChannelChannelPointsCustomRewardRedemptionUpdate))
func (*Client) OnEventChannelChannelPointsCustomRewardRemove ¶
func (c *Client) OnEventChannelChannelPointsCustomRewardRemove(callback func(event EventChannelChannelPointsCustomRewardRemove))
func (*Client) OnEventChannelChannelPointsCustomRewardUpdate ¶
func (c *Client) OnEventChannelChannelPointsCustomRewardUpdate(callback func(event EventChannelChannelPointsCustomRewardUpdate))
func (*Client) OnEventChannelCharityCampaignDonate ¶
func (c *Client) OnEventChannelCharityCampaignDonate(callback func(event EventChannelCharityCampaignDonate))
func (*Client) OnEventChannelCharityCampaignProgress ¶
func (c *Client) OnEventChannelCharityCampaignProgress(callback func(event EventChannelCharityCampaignProgress))
func (*Client) OnEventChannelCharityCampaignStart ¶
func (c *Client) OnEventChannelCharityCampaignStart(callback func(event EventChannelCharityCampaignStart))
func (*Client) OnEventChannelCharityCampaignStop ¶
func (c *Client) OnEventChannelCharityCampaignStop(callback func(event EventChannelCharityCampaignStop))
func (*Client) OnEventChannelCheer ¶
func (c *Client) OnEventChannelCheer(callback func(event EventChannelCheer))
func (*Client) OnEventChannelFollow ¶
func (c *Client) OnEventChannelFollow(callback func(event EventChannelFollow))
func (*Client) OnEventChannelGoalBegin ¶
func (c *Client) OnEventChannelGoalBegin(callback func(event EventChannelGoalBegin))
func (*Client) OnEventChannelGoalEnd ¶
func (c *Client) OnEventChannelGoalEnd(callback func(event EventChannelGoalEnd))
func (*Client) OnEventChannelGoalProgress ¶
func (c *Client) OnEventChannelGoalProgress(callback func(event EventChannelGoalProgress))
func (*Client) OnEventChannelHypeTrainBegin ¶
func (c *Client) OnEventChannelHypeTrainBegin(callback func(event EventChannelHypeTrainBegin))
func (*Client) OnEventChannelHypeTrainEnd ¶
func (c *Client) OnEventChannelHypeTrainEnd(callback func(event EventChannelHypeTrainEnd))
func (*Client) OnEventChannelHypeTrainProgress ¶
func (c *Client) OnEventChannelHypeTrainProgress(callback func(event EventChannelHypeTrainProgress))
func (*Client) OnEventChannelModeratorAdd ¶
func (c *Client) OnEventChannelModeratorAdd(callback func(event EventChannelModeratorAdd))
func (*Client) OnEventChannelModeratorRemove ¶
func (c *Client) OnEventChannelModeratorRemove(callback func(event EventChannelModeratorRemove))
func (*Client) OnEventChannelPollBegin ¶
func (c *Client) OnEventChannelPollBegin(callback func(event EventChannelPollBegin))
func (*Client) OnEventChannelPollEnd ¶
func (c *Client) OnEventChannelPollEnd(callback func(event EventChannelPollEnd))
func (*Client) OnEventChannelPollProgress ¶
func (c *Client) OnEventChannelPollProgress(callback func(event EventChannelPollProgress))
func (*Client) OnEventChannelPredictionBegin ¶
func (c *Client) OnEventChannelPredictionBegin(callback func(event EventChannelPredictionBegin))
func (*Client) OnEventChannelPredictionEnd ¶
func (c *Client) OnEventChannelPredictionEnd(callback func(event EventChannelPredictionEnd))
func (*Client) OnEventChannelPredictionLock ¶
func (c *Client) OnEventChannelPredictionLock(callback func(event EventChannelPredictionLock))
func (*Client) OnEventChannelPredictionProgress ¶
func (c *Client) OnEventChannelPredictionProgress(callback func(event EventChannelPredictionProgress))
func (*Client) OnEventChannelRaid ¶
func (c *Client) OnEventChannelRaid(callback func(event EventChannelRaid))
func (*Client) OnEventChannelShieldModeBegin ¶
func (c *Client) OnEventChannelShieldModeBegin(callback func(event EventChannelShieldModeBegin))
func (*Client) OnEventChannelShieldModeEnd ¶
func (c *Client) OnEventChannelShieldModeEnd(callback func(event EventChannelShieldModeEnd))
func (*Client) OnEventChannelSubscribe ¶
func (c *Client) OnEventChannelSubscribe(callback func(event EventChannelSubscribe))
func (*Client) OnEventChannelSubscriptionEnd ¶
func (c *Client) OnEventChannelSubscriptionEnd(callback func(event EventChannelSubscriptionEnd))
func (*Client) OnEventChannelSubscriptionGift ¶
func (c *Client) OnEventChannelSubscriptionGift(callback func(event EventChannelSubscriptionGift))
func (*Client) OnEventChannelSubscriptionMessage ¶
func (c *Client) OnEventChannelSubscriptionMessage(callback func(event EventChannelSubscriptionMessage))
func (*Client) OnEventChannelUnban ¶
func (c *Client) OnEventChannelUnban(callback func(event EventChannelUnban))
func (*Client) OnEventChannelUpdate ¶
func (c *Client) OnEventChannelUpdate(callback func(event EventChannelUpdate))
func (*Client) OnEventDropEntitlementGrant ¶
func (c *Client) OnEventDropEntitlementGrant(callback func(event []EventDropEntitlementGrant))
func (*Client) OnEventExtensionBitsTransactionCreate ¶
func (c *Client) OnEventExtensionBitsTransactionCreate(callback func(event EventExtensionBitsTransactionCreate))
func (*Client) OnEventStreamOffline ¶
func (c *Client) OnEventStreamOffline(callback func(event EventStreamOffline))
func (*Client) OnEventStreamOnline ¶
func (c *Client) OnEventStreamOnline(callback func(event EventStreamOnline))
func (*Client) OnEventUserAuthorizationGrant ¶
func (c *Client) OnEventUserAuthorizationGrant(callback func(event EventUserAuthorizationGrant))
func (*Client) OnEventUserAuthorizationRevoke ¶
func (c *Client) OnEventUserAuthorizationRevoke(callback func(event EventUserAuthorizationRevoke))
func (*Client) OnEventUserUpdate ¶
func (c *Client) OnEventUserUpdate(callback func(event EventUserUpdate))
func (*Client) OnKeepAlive ¶
func (c *Client) OnKeepAlive(callback func(message KeepAliveMessage))
func (*Client) OnNotification ¶
func (c *Client) OnNotification(callback func(message NotificationMessage))
func (*Client) OnRawEvent ¶
func (c *Client) OnRawEvent(callback func(event string, metadata MessageMetadata, subscription PayloadSubscription))
func (*Client) OnReconnect ¶
func (c *Client) OnReconnect(callback func(message ReconnectMessage))
func (*Client) OnRevoke ¶
func (c *Client) OnRevoke(callback func(message RevokeMessage))
func (*Client) OnWelcome ¶
func (c *Client) OnWelcome(callback func(message WelcomeMessage))
type DropEntitlement ¶
type DropEntitlement struct { User OrganizationId string `json:"organization_id"` CategoryId string `json:"category_id"` CategoryName string `json:"category_name"` CampaignId string `json:"campaign_id"` EntitlementId string `json:"entitlement_id"` BenefitId string `json:"benefit_id"` CreatedAt time.Time `json:"created_at"` }
type EventChannelBan ¶
type EventChannelChannelPointsCustomRewardAdd ¶
type EventChannelChannelPointsCustomRewardAdd struct { Broadcaster ID string `json:"id"` 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"` MaxPerStream MaxChannelPointsPerStream `json:"max_per_stream"` MaxPerUserPerStream MaxChannelPointsPerStream `json:"max_per_user_per_stream"` BackgroundColor string `json:"background_color"` Image Image `json:"image"` DefaultImage Image `json:"default_image"` GlobalCooldown GlobalCooldown `json:"global_cooldown"` CooldownExpiresAt time.Time `json:"cooldown_expires_at"` RedemptionsRedeemedCurrentStream int `json:"redemptions_redeemed_current_stream"` }
type EventChannelChannelPointsCustomRewardRedemptionAdd ¶
type EventChannelChannelPointsCustomRewardRedemptionAdd struct { Broadcaster User ID string `json:"id"` UserInput string `json:"user_input"` Status string `json:"status"` Reward ChannelPointReward `json:"reward"` RedeemedAt time.Time `json:"redeemed_at"` }
type EventChannelChannelPointsCustomRewardRedemptionUpdate ¶
type EventChannelChannelPointsCustomRewardRedemptionUpdate EventChannelChannelPointsCustomRewardRedemptionAdd
type EventChannelChannelPointsCustomRewardRemove ¶
type EventChannelChannelPointsCustomRewardRemove EventChannelChannelPointsCustomRewardAdd
type EventChannelChannelPointsCustomRewardUpdate ¶
type EventChannelChannelPointsCustomRewardUpdate EventChannelChannelPointsCustomRewardAdd
type EventChannelCharityCampaignDonate ¶
type EventChannelCharityCampaignDonate struct { BaseCharity Amount GoalAmount `json:"amount"` }
type EventChannelCharityCampaignProgress ¶
type EventChannelCharityCampaignProgress struct { BaseCharity CurrentAmount GoalAmount `json:"current_amount"` TargetAmount GoalAmount `json:"target_amount"` }
type EventChannelCharityCampaignStart ¶
type EventChannelCharityCampaignStart struct { EventChannelCharityCampaignProgress StartedAt time.Time `json:"started_at"` }
type EventChannelCharityCampaignStop ¶
type EventChannelCharityCampaignStop struct { EventChannelCharityCampaignProgress StoppedAt time.Time `json:"stopped_at"` }
type EventChannelCheer ¶
type EventChannelCheer struct { User Broadcaster Message string `json:"message"` Bits int `json:"bits"` IsAnonymous bool `json:"is_anonymous"` }
type EventChannelFollow ¶
type EventChannelFollow struct { User Broadcaster FollowedAt time.Time `json:"followed_at"` }
type EventChannelGoalBegin ¶
type EventChannelGoalBegin struct { Broadcaster ID string `json:"id"` CharityName string `json:"charity_name"` CharityDescription string `json:"charity_description"` CharityLogo string `json:"charity_logo"` CharityWebsite string `json:"charity_website"` CurrentAmount int `json:"current_amount"` TargetAmount int `json:"target_amount"` StoppedAt time.Time `json:"stopped_at"` }
type EventChannelGoalEnd ¶
type EventChannelGoalEnd EventChannelGoalBegin
type EventChannelGoalProgress ¶
type EventChannelGoalProgress EventChannelGoalBegin
type EventChannelHypeTrainBegin ¶
type EventChannelHypeTrainBegin struct { Broadcaster Id string `json:"id"` Total int `json:"total"` Progress int `json:"progress"` Goal int `json:"goal"` TopContributions []HypeTrainContribution `json:"top_contributions"` LastContribution HypeTrainContribution `json:"last_contribution"` Level int `json:"level"` StartedAt time.Time `json:"started_at"` ExpiresAt time.Time `json:"expires_at"` }
type EventChannelHypeTrainEnd ¶
type EventChannelHypeTrainEnd struct { Broadcaster Id string `json:"id"` Level int `json:"level"` Total int `json:"total"` TopContributions []HypeTrainContribution `json:"top_contributions"` StartedAt time.Time `json:"started_at"` ExpiresAt time.Time `json:"expires_at"` CooldownEndsAt time.Time `json:"cooldown_ends_at"` }
type EventChannelHypeTrainProgress ¶
type EventChannelHypeTrainProgress struct { EventChannelHypeTrainBegin Level int `json:"level"` }
type EventChannelModeratorAdd ¶
type EventChannelModeratorAdd struct { Broadcaster User }
type EventChannelModeratorRemove ¶
type EventChannelModeratorRemove struct { Broadcaster User }
type EventChannelPollBegin ¶
type EventChannelPollBegin struct { Broadcaster ID string `json:"id"` Title string `json:"title"` Choices []PollChoice `json:"choices"` BitsVoting PollVoting `json:"bits_voting"` ChannelPointsVoting PollVoting `json:"channel_points_voting"` StartedAt time.Time `json:"started_at"` EndsAt time.Time `json:"ends_at"` }
type EventChannelPollEnd ¶
type EventChannelPollEnd struct { EventChannelPollBegin Status string `json:"status"` }
type EventChannelPollProgress ¶
type EventChannelPollProgress EventChannelPollBegin
type EventChannelPredictionBegin ¶
type EventChannelPredictionBegin struct { Broadcaster ID string `json:"id"` Title string `json:"title"` Outcomes []PredictionOutcome `json:"outcomes"` StartedAt time.Time `json:"started_at"` LocksAt time.Time `json:"locks_at"` }
type EventChannelPredictionEnd ¶
type EventChannelPredictionEnd struct { Broadcaster ID string `json:"id"` Title string `json:"title"` WinningOutcomeID string `json:"winning_outcome_id"` Outcomes []PredictionOutcome `json:"outcomes"` Status string `json:"status"` StartedAt time.Time `json:"started_at"` EndedAt time.Time `json:"ended_at"` }
type EventChannelPredictionLock ¶
type EventChannelPredictionLock EventChannelPredictionBegin
type EventChannelPredictionProgress ¶
type EventChannelPredictionProgress EventChannelPredictionBegin
type EventChannelRaid ¶
type EventChannelRaid 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 EventChannelShieldModeEnd ¶
type EventChannelShieldModeEnd EventChannelShieldModeBegin
type EventChannelSubscribe ¶
type EventChannelSubscribe struct { User Broadcaster Tier string `json:"tier"` IsGift bool `json:"is_gift"` }
type EventChannelSubscriptionEnd ¶
type EventChannelSubscriptionEnd struct { User Broadcaster Tier string `json:"tier"` IsGift bool `json:"is_gift"` }
type EventChannelUnban ¶
type EventChannelUnban struct { User Broadcaster Moderator }
type EventChannelUpdate ¶
type EventDropEntitlementGrant ¶
type EventDropEntitlementGrant struct { ID string `json:"id"` Data DropEntitlement `json:"data"` }
type EventExtensionBitsTransactionCreate ¶
type EventExtensionBitsTransactionCreate struct { Broadcaster User ID string `json:"id"` ExtensionClientID string `json:"extension_client_id"` Product ExtensionProduct `json:"product"` }
type EventStreamOffline ¶
type EventStreamOffline Broadcaster
type EventStreamOnline ¶
type EventStreamOnline struct { Broadcaster Id string `json:"id"` Type string `json:"type"` StartedAt time.Time `json:"started_at"` }
type EventSubscription ¶
type EventSubscription string
var ( SubChannelUpdate EventSubscription = "channel.update" SubChannelFollow EventSubscription = "channel.follow" SubChannelSubscribe EventSubscription = "channel.subscribe" SubChannelSubscriptionEnd EventSubscription = "channel.subscription.end" SubChannelSubscriptionGift EventSubscription = "channel.subscription.gift" SubChannelSubscriptionMessage EventSubscription = "channel.subscription.message" SubChannelCheer EventSubscription = "channel.cheer" SubChannelRaid EventSubscription = "channel.raid" SubChannelBan EventSubscription = "channel.ban" SubChannelUnban EventSubscription = "channel.unban" SubChannelModeratorAdd EventSubscription = "channel.moderator.add" SubChannelModeratorRemove EventSubscription = "channel.moderator.remove" SubChannelChannelPointsCustomRewardAdd EventSubscription = "channel.channel_points_custom_reward.add" SubChannelChannelPointsCustomRewardUpdate EventSubscription = "channel.channel_points_custom_reward.update" SubChannelChannelPointsCustomRewardRemove EventSubscription = "channel.channel_points_custom_reward.remove" SubChannelChannelPointsCustomRewardRedemptionAdd EventSubscription = "channel.channel_points_custom_reward_redemption.add" SubChannelChannelPointsCustomRewardRedemptionUpdate EventSubscription = "channel.channel_points_custom_reward_redemption.update" SubChannelPollBegin EventSubscription = "channel.poll.begin" SubChannelPollProgress EventSubscription = "channel.poll.progress" SubChannelPollEnd EventSubscription = "channel.poll.end" SubChannelPredictionBegin EventSubscription = "channel.prediction.begin" SubChannelPredictionProgress EventSubscription = "channel.prediction.progress" SubChannelPredictionLock EventSubscription = "channel.prediction.lock" SubChannelPredictionEnd EventSubscription = "channel.prediction.end" SubDropEntitlementGrant EventSubscription = "drop.entitlement.grant" SubExtensionBitsTransactionCreate EventSubscription = "extension.bits_transaction.create" SubChannelGoalBegin EventSubscription = "channel.goal.begin" SubChannelGoalProgress EventSubscription = "channel.goal.progress" SubChannelGoalEnd EventSubscription = "channel.goal.end" SubChannelHypeTrainBegin EventSubscription = "channel.hype_train.begin" SubChannelHypeTrainProgress EventSubscription = "channel.hype_train.progress" SubChannelHypeTrainEnd EventSubscription = "channel.hype_train.end" SubStreamOnline EventSubscription = "stream.online" SubStreamOffline EventSubscription = "stream.offline" SubUserAuthorizationGrant EventSubscription = "user.authorization.grant" SubUserAuthorizationRevoke EventSubscription = "user.authorization.revoke" SubUserUpdate EventSubscription = "user.update" SubChannelCharityCampaignDonate EventSubscription = "channel.charity_campaign.donate" SubChannelCharityCampaignStart EventSubscription = "channel.charity_campaign.start" SubChannelCharityCampaignProgress EventSubscription = "channel.charity_campaign.progress" SubChannelCharityCampaignStop EventSubscription = "channel.charity_campaign.stop" SubChannelShieldModeBegin EventSubscription = "channel.shield_mode.begin" SubChannelShieldModeEnd EventSubscription = "channel.shield_mode.end" )
type EventUserAuthorizationRevoke ¶
type EventUserAuthorizationRevoke EventUserAuthorizationGrant
type EventUserUpdate ¶
type ExtensionProduct ¶
type GlobalCooldown ¶
type GoalAmount ¶
type GoalAmount struct { Value int `json:"value"` DecimalPlaces int `json:"decimal_places"` Currency string `json:"currency"` }
func (GoalAmount) Amount ¶
func (a GoalAmount) Amount() float64
type HypeTrainContribution ¶
type KeepAliveMessage ¶
type KeepAliveMessage struct { Metadata MessageMetadata `json:"metadata"` Payload struct{} `json:"payload"` }
type MessageMetadata ¶
type NotificationMessage ¶
type NotificationMessage struct { Metadata MessageMetadata `json:"metadata"` Payload struct { Subscription PayloadSubscription `json:"subscription"` Event *json.RawMessage `json:"event"` } `json:"payload"` }
type PayloadSession ¶
type PayloadSubscription ¶
type PollChoice ¶
type PollVoting ¶
type PredictionOutcome ¶
type ReconnectMessage ¶
type ReconnectMessage struct { Metadata MessageMetadata `json:"metadata"` Payload struct { Session PayloadSession `json:"session"` } `json:"payload"` }
type RevokeMessage ¶
type RevokeMessage struct { Metadata MessageMetadata `json:"metadata"` Payload struct { Subscription PayloadSubscription `json:"subscription"` } `json:"payload"` }
type SubscribeRequest ¶
type SubscribeResponse ¶
type SubscribeResponse struct { Data []PayloadSubscription `json:"data"` Total int `json:"total"` TotalCost int `json:"total_cost"` MaxTotalCost int `json:"max_total_cost"` }
func SubscribeEvent ¶
func SubscribeEvent(request SubscribeRequest) (SubscribeResponse, error)
func SubscribeEventUrl ¶
func SubscribeEventUrl(request SubscribeRequest, url string) (SubscribeResponse, error)
func SubscribeEventUrlWithContext ¶
func SubscribeEventUrlWithContext(ctx context.Context, request SubscribeRequest, url string) (SubscribeResponse, error)
func SubscribeEventWithContext ¶
func SubscribeEventWithContext(ctx context.Context, request SubscribeRequest) (SubscribeResponse, error)
type SubscriptionRequest ¶
type SubscriptionRequest struct { Type EventSubscription `json:"type"` Version string `json:"version"` Condition map[string]string `json:"condition"` Transport SubscriptionTransport `json:"transport"` }
type SubscriptionTransport ¶
type TopPredictor ¶
type WelcomeMessage ¶
type WelcomeMessage struct { Metadata MessageMetadata `json:"metadata"` Payload struct { Session PayloadSession `json:"session"` } `json:"payload"` }
Click to show internal directories.
Click to hide internal directories.