Documentation ¶
Index ¶
- Constants
- Variables
- type APICache
- type BadgeCollection
- type Category
- type Client
- func (c Client) APICache() *APICache
- func (c Client) GetAuthorizedUsername() (string, error)
- func (c Client) GetCurrentStreamInfo(username string) (*StreamInfo, error)
- func (c Client) GetDisplayNameForUser(username string) (string, error)
- func (c Client) GetFollowDate(from, to string) (time.Time, error)
- func (c Client) GetIDForUsername(username string) (string, error)
- func (c Client) GetRecentStreamInfo(username string) (string, string, error)
- func (c Client) GetUserInformation(user string) (*User, error)
- func (c Client) HasLiveStream(username string) (bool, error)
- func (c Client) ModifyChannelInformation(ctx context.Context, broadcasterName string, game, title *string) error
- func (c Client) SearchCategories(ctx context.Context, name string) ([]Category, error)
- type EventSubClient
- type EventSubCondition
- type EventSubEventChannelUpdate
- type EventSubEventFollow
- type EventSubEventStreamOffline
- type EventSubEventStreamOnline
- type StreamInfo
- type User
Constants ¶
View Source
const ( BadgeBroadcaster = "broadcaster" BadgeFounder = "founder" BadgeModerator = "moderator" BadgeSubscriber = "subscriber" BadgeVIP = "vip" )
View Source
const ( EventSubEventTypeChannelUpdate = "channel.update" EventSubEventTypeStreamOffline = "stream.offline" EventSubEventTypeStreamOnline = "stream.online" )
Variables ¶
View Source
var KnownBadges = []string{ BadgeBroadcaster, BadgeFounder, BadgeModerator, BadgeSubscriber, BadgeVIP, }
Functions ¶
This section is empty.
Types ¶
type BadgeCollection ¶
func ParseBadgeLevels ¶
func ParseBadgeLevels(m *irc.Message) BadgeCollection
func (BadgeCollection) Add ¶
func (b BadgeCollection) Add(badge string, level int)
func (BadgeCollection) Get ¶
func (b BadgeCollection) Get(badge string) int
func (BadgeCollection) Has ¶
func (b BadgeCollection) Has(badge string) bool
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) GetAuthorizedUsername ¶
func (Client) GetCurrentStreamInfo ¶ added in v1.3.0
func (c Client) GetCurrentStreamInfo(username string) (*StreamInfo, error)
func (Client) GetDisplayNameForUser ¶
func (Client) GetIDForUsername ¶ added in v0.18.0
func (Client) GetRecentStreamInfo ¶
func (Client) GetUserInformation ¶ added in v1.0.0
func (Client) ModifyChannelInformation ¶ added in v0.18.0
type EventSubClient ¶ added in v1.6.0
type EventSubClient struct {
// contains filtered or unexported fields
}
func NewEventSubClient ¶ added in v1.6.0
func NewEventSubClient(apiURL, secret, secretHandle string) *EventSubClient
func (*EventSubClient) Authorize ¶ added in v1.6.0
func (e *EventSubClient) Authorize(clientID, clientSecret string) error
func (*EventSubClient) HandleEventsubPush ¶ added in v1.6.0
func (e *EventSubClient) HandleEventsubPush(w http.ResponseWriter, r *http.Request)
func (*EventSubClient) RegisterEventSubHooks ¶ added in v1.6.0
func (e *EventSubClient) RegisterEventSubHooks(event string, condition EventSubCondition, callback func(json.RawMessage) error) (func(), error)
type EventSubCondition ¶ added in v1.6.0
type EventSubCondition struct { BroadcasterUserID string `json:"broadcaster_user_id,omitempty"` CampaignID string `json:"campaign_id,omitempty"` CategoryID string `json:"category_id,omitempty"` ClientID string `json:"client_id,omitempty"` ExtensionClientID string `json:"extension_client_id,omitempty"` FromBroadcasterUserID string `json:"from_broadcaster_user_id,omitempty"` OrganizationID string `json:"organization_id,omitempty"` RewardID string `json:"reward_id,omitempty"` ToBroadcasterUserID string `json:"to_broadcaster_user_id,omitempty"` UserID string `json:"user_id,omitempty"` }
func (EventSubCondition) Hash ¶ added in v1.6.0
func (e EventSubCondition) Hash() (string, error)
type EventSubEventChannelUpdate ¶ added in v1.6.0
type EventSubEventChannelUpdate 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"` IsMature bool `json:"is_mature"` }
type EventSubEventFollow ¶ added in v1.6.0
type EventSubEventFollow 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 EventSubEventStreamOffline ¶ added in v1.6.0
type EventSubEventStreamOnline ¶ added in v1.6.0
type EventSubEventStreamOnline 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 StreamInfo ¶ added in v1.3.0
type StreamInfo struct { ID string `json:"id"` UserID string `json:"user_id"` UserLogin string `json:"user_login"` UserName string `json:"user_name"` GameID string `json:"game_id"` GameName string `json:"game_name"` Type string `json:"type"` Title string `json:"title"` ViewerCount int64 `json:"viewer_count"` StartedAt time.Time `json:"started_at"` Language string `json:"language"` ThumbnailURL string `json:"thumbnail_url"` TagIds []string `json:"tag_ids"` IsMature bool `json:"is_mature"` }
Click to show internal directories.
Click to hide internal directories.