Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChannelID ¶
GetChannelID retrieves the channel ID for the OAuth token provided, and returns it as a string
func GetOAuthToken ¶
GetOAuthToken gets a User OAuth Token from the Twitch API and returns it as a string. This function needs further work: it is not fully automated, requiring user involvement (which also has an ugly UX)
func ListenChannelPoints ¶
func ListenChannelPoints(chanID, clientID, oauthToken string, callback func(Redemption))
ListenChannelPoints starts a WebSocket listening to the Twitch PubSub API for Channel Point redemptions, which calls callback with the provided file handle and the reward title as a string
Types ¶
type Redemption ¶
type Redemption struct {
ID string `json:"id"`
User user `json:"user"`
ChannelID string `json:"channel_id"`
RedeemedAt time.Time `json:"redeemed_at"`
Reward reward `json:"reward"`
UserInput string `json:"user_input"`
Status string `json:"status"`
}
Redemption represents a Channel Point reward redemption on Twitch.
Click to show internal directories.
Click to hide internal directories.