Versions in this module Expand all Collapse all v0 v0.2.3 Oct 19, 2023 Changes in this version + type Clip struct + BroadcasterID string + BroadcasterName string + CreatedAt time.Time + CreatorID string + CreatorName string + Duration ClipDuration + EmbedURL string + Featured bool + GameID string + ID string + Language string + ThumbnailURL string + Title string + URL string + VODOffset int + VideoID string + ViewCount int + type ClipDuration time.Duration + func (d *ClipDuration) UnmarshalJSON(data []byte) error + func (d ClipDuration) AsDuration() time.Duration + type ClipsListCall struct + func (c *ClipsListCall) After(cursor string) *ClipsListCall + func (c *ClipsListCall) Before(cursor string) *ClipsListCall + func (c *ClipsListCall) BroadcasterID(id string) *ClipsListCall + func (c *ClipsListCall) Do(ctx context.Context, opts ...RequestOption) (*ClipsListResponse, error) + func (c *ClipsListCall) EndedAt(t time.Time) *ClipsListCall + func (c *ClipsListCall) Featured() *ClipsListCall + func (c *ClipsListCall) First(n int) *ClipsListCall + func (c *ClipsListCall) GameID(id string) *ClipsListCall + func (c *ClipsListCall) ID(ids []string) *ClipsListCall + func (c *ClipsListCall) StartedAt(t time.Time) *ClipsListCall + type ClipsListResponse struct + Cursor string + Data []Clip + Header http.Header type ClipsResource + func (r *ClipsResource) List() *ClipsListCall v0.2.2 Sep 24, 2023 Changes in this version + type VideoDuration time.Duration + func (d *VideoDuration) UnmarshalJSON(data []byte) error + func (d VideoDuration) AsDuration() time.Duration v0.2.1 Sep 17, 2023 Changes in this version + type BitsLeaderboardEntry struct + DisplayName string + ID string + Login string + Rank int + Score int + type BitsLeaderboardListCall struct + func (c *BitsLeaderboardListCall) Count(n int) *BitsLeaderboardListCall + func (c *BitsLeaderboardListCall) Do(ctx context.Context, opts ...RequestOption) (*BitsLeaderboardListResponse, error) + func (c *BitsLeaderboardListCall) Period(period string) *BitsLeaderboardListCall + func (c *BitsLeaderboardListCall) StartedAt(t time.Time) *BitsLeaderboardListCall + func (c *BitsLeaderboardListCall) UserID(userId string) *BitsLeaderboardListCall + type BitsLeaderboardListResponse struct + Data []BitsLeaderboardEntry + Header http.Header + Total int + type BitsLeaderboardResource struct + func NewBitsLeaderboardResource(client *Client) *BitsLeaderboardResource + func (r *BitsLeaderboardResource) List() *BitsLeaderboardListCall type BitsResource + Leaderboard *BitsLeaderboardResource type ChannelPointsResource + CustomRewards *CustomRewardsResource + type CustomReward struct + BackgroundColor string + BroadcasterDisplayName string + BroadcasterID string + BroadcasterLogin string + CooldownExpiresAt time.Time + Cost int64 + Enabled bool + ID string + InStock bool + IsUserInputRequired bool + Paused bool + Prompt string + RedemptionsSkipRequestQueue bool + Title string + type CustomRewardRedemption struct + BroadcasterDisplayName string + BroadcasterID string + BroadcasterLogin string + ID string + RedeemedAt time.Time + Reward struct{ ... } + Status string + UserDisplayName string + UserID string + UserInput string + UserLogin string + type CustomRewardsDeleteCall struct + func (c *CustomRewardsDeleteCall) Do(ctx context.Context, opts ...RequestOption) error + type CustomRewardsInsertCall struct + func (c *CustomRewardsInsertCall) BackgroundColor(hexCode string) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) Cost(cost int64) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) Do(ctx context.Context, opts ...RequestOption) (*CustomRewardsInsertResponse, error) + func (c *CustomRewardsInsertCall) GlobalCooldown(d time.Duration) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) IsEnabled(enabled bool) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) IsGlobalCooldownEnabled(enabled bool) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) IsMaxPerStreamEnabled(enabled bool) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) IsMaxPerUserPerStreamEnabled(enabled bool) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) IsPaused(paused bool) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) IsUserInputRequired(required bool) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) MaxPerStream(max int64) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) MaxPerUserPerStream(max int64) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) Prompt(prompt string) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) ShouldRedemptionsSkipRequestQueue(b bool) *CustomRewardsInsertCall + func (c *CustomRewardsInsertCall) Title(title string) *CustomRewardsInsertCall + type CustomRewardsInsertResponse struct + Data []CustomReward + Header http.Header + type CustomRewardsListCall struct + func (c *CustomRewardsListCall) Do(ctx context.Context, opts ...RequestOption) (*CustomRewardsListResponse, error) + func (c *CustomRewardsListCall) ID(ids []string) *CustomRewardsListCall + func (c *CustomRewardsListCall) OnlyManageable() *CustomRewardsListCall + type CustomRewardsListResponse struct + Data []CustomReward + Header http.Header + type CustomRewardsRedemptionListCall struct + func (c *CustomRewardsRedemptionListCall) After(cursor string) *CustomRewardsRedemptionListCall + func (c *CustomRewardsRedemptionListCall) Before(cursor string) *CustomRewardsRedemptionListCall + func (c *CustomRewardsRedemptionListCall) Do(ctx context.Context, opts ...RequestOption) (*CustomRewardsRedemptionListResponse, error) + func (c *CustomRewardsRedemptionListCall) ID(ids []string) *CustomRewardsRedemptionListCall + func (c *CustomRewardsRedemptionListCall) Sort(sort string) *CustomRewardsRedemptionListCall + func (c *CustomRewardsRedemptionListCall) Status(status string) *CustomRewardsRedemptionListCall + type CustomRewardsRedemptionListResponse struct + Cursor string + Data []CustomRewardRedemption + Header http.Header + type CustomRewardsRedemptionResource struct + func NewCustomRewardsRedemptionResource(client *Client) *CustomRewardsRedemptionResource + func (r *CustomRewardsRedemptionResource) List(broadcasterId, rewardId string) *CustomRewardsRedemptionListCall + func (r *CustomRewardsRedemptionResource) Update(broadcasterId, rewardId string, id []string) *CustomRewardsRedemptionUpdateCall + type CustomRewardsRedemptionUpdateCall struct + func (c *CustomRewardsRedemptionUpdateCall) Cancel() *CustomRewardsRedemptionUpdateCall + func (c *CustomRewardsRedemptionUpdateCall) Do(ctx context.Context, opts ...RequestOption) (*CustomRewardsRedemptionUpdateResponse, error) + func (c *CustomRewardsRedemptionUpdateCall) Fulfill() *CustomRewardsRedemptionUpdateCall + type CustomRewardsRedemptionUpdateResponse struct + Data []CustomRewardRedemption + Header http.Header + type CustomRewardsResource struct + Redemption *CustomRewardsRedemptionResource + func NewCustomRewardsResource(client *Client) *CustomRewardsResource + func (r *CustomRewardsResource) Delete(broadcasterId, id string) *CustomRewardsDeleteCall + func (r *CustomRewardsResource) Insert(broadcasterId string) *CustomRewardsInsertCall + func (r *CustomRewardsResource) List(broadcasterId string) *CustomRewardsListCall + func (r *CustomRewardsResource) Update(broadcasterId, id string) *CustomRewardsUpdateCall + type CustomRewardsUpdateCall struct + func (c *CustomRewardsUpdateCall) BackgroundColor(hexCode string) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) Cost(cost int64) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) Do(ctx context.Context, opts ...RequestOption) (*CustomRewardsUpdateResponse, error) + func (c *CustomRewardsUpdateCall) GlobalCooldown(d time.Duration) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) IsEnabled(enabled bool) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) IsGlobalCooldownEnabled(enabled bool) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) IsMaxPerStreamEnabled(enabled bool) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) IsMaxPerUserPerStreamEnabled(enabled bool) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) IsPaused(paused bool) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) IsUserInputRequired(required bool) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) MaxPerStream(max int64) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) MaxPerUserPerStream(max int64) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) Prompt(prompt string) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) ShouldRedemptionsSkipRequestQueue(b bool) *CustomRewardsUpdateCall + func (c *CustomRewardsUpdateCall) Title(title string) *CustomRewardsUpdateCall + type CustomRewardsUpdateResponse struct + Data []CustomReward + Header http.Header + type Video struct + CreatedAt time.Time + Description string + Duration time.Duration + ID string + Language string + PublishedAt time.Time + StreamID string + ThumbnailURL string + Title string + Type string + URL string + UserDisplayName string + UserID string + UserLogin string + ViewCount int + Viewable string + type VideosDeleteCall struct + func (c *VideosDeleteCall) Do(ctx context.Context, opts ...RequestOption) (*VideosDeleteResponse, error) + type VideosDeleteResponse struct + Data []string + Header http.Header + type VideosListCall struct + func (c *VideosListCall) After(cursor string) *VideosListCall + func (c *VideosListCall) Before(cursor string) *VideosListCall + func (c *VideosListCall) Do(ctx context.Context, opts ...RequestOption) (*VideosListResponse, error) + func (c *VideosListCall) First(n int) *VideosListCall + func (c *VideosListCall) GameID(id string) *VideosListCall + func (c *VideosListCall) ID(ids []string) *VideosListCall + func (c *VideosListCall) Language(language string) *VideosListCall + func (c *VideosListCall) Period(p string) *VideosListCall + func (c *VideosListCall) Sort(s string) *VideosListCall + func (c *VideosListCall) Type(t string) *VideosListCall + func (c *VideosListCall) UserID(id string) *VideosListCall + type VideosListResponse struct + Cursor string + Data []Video + Header http.Header type VideosResource + func (r *VideosResource) Delete(ids []string) *VideosDeleteCall + func (r *VideosResource) List() *VideosListCall v0.2.0 Sep 16, 2023 Changes in this version + func CodeOf(err error) int + type APIError struct + Code string + Message string + Status int + func (err APIError) Error() string + type AdsInsertRequest struct + func (c *AdsInsertRequest) Do(ctx context.Context, opts ...RequestOption) (*AdsInsertResponse, error) + func (c *AdsInsertRequest) Duration(seconds int) *AdsInsertRequest + type AdsInsertResponse struct + Data []Commercial + Header http.Header + type AdsResource struct + func NewAdsResource(client *Client) *AdsResource + func (r *AdsResource) Insert(broadcasterId string) *AdsInsertRequest + type AnalyticsResource struct + func NewAnalyticsResource(client *Client) *AnalyticsResource + type BitsResource struct + Cheermotes *CheermotesResource + func NewBitsResource(client *Client) *BitsResource + type Channel struct + ContentClassificationLabels []string + Delay int + DisplayName string + GameID string + GameName string + ID string + IsBrandedContent bool + Login string + Tags []string + Title string + type ChannelPointsResource struct + func NewChannelPointsResource(client *Client) *ChannelPointsResource + type ChannelsListCall struct + func (c *ChannelsListCall) BroadcasterID(ids ...string) *ChannelsListCall + func (c *ChannelsListCall) Do(ctx context.Context, opts ...RequestOption) (*ChannelsListResponse, error) + type ChannelsListResponse struct + Data []Channel + Header http.Header + type ChannelsResource struct + func NewChannelsResource(client *Client) *ChannelsResource + func (r *ChannelsResource) List() *ChannelsListCall + type CharityResource struct + func NewCharityResource(client *Client) *CharityResource + type ChatResource struct + func NewChatResource(client *Client) *ChatResource + type ChatterBan struct + BroadcasterID string + CreatedAt time.Time + EndsAt *time.Time + ModeratorID string + UserID string + type Cheermote struct + IsCharitable bool + LastUpdated time.Time + Order int + Prefix string + Tiers []CheermoteTier + Type string + type CheermoteTier struct + CanCheer bool + Color string + ID string + Images map[string]string + MinBits int + ShowInBitsCard bool + type CheermotesListCall struct + func (c *CheermotesListCall) BroadcasterID(id string) *CheermotesListCall + func (c *CheermotesListCall) Do(ctx context.Context, opts ...RequestOption) (*CheermotesListResponse, error) + type CheermotesListResponse struct + Data []Cheermote + Header http.Header + type CheermotesResource struct + func NewCheermotesResource(client *Client) *CheermotesResource + func (r *CheermotesResource) List() *CheermotesListCall + type ClearChatRequest struct + func (c *ClearChatRequest) Do(ctx context.Context, opts ...RequestOption) error + func (c *ClearChatRequest) MessageID(messageId string) *ClearChatRequest type Client + Ads *AdsResource + Analytics *AnalyticsResource + Bits *BitsResource + ChannelPoints *ChannelPointsResource + Channels *ChannelsResource + Charity *CharityResource + Chat *ChatResource + Clips *ClipsResource + Entitlements *EntitlementsResource + EventSub *EventSubResource + Extensions *ExtensionsResource + Games *GamesResource + Goals *GoalsResource + GuestStar *GuestStarResource + HypeTrain *HypeTrainResource + Moderation *ModerationResource + Music *MusicResource + Polls *PollsResource + Predictions *PredictionsResource + Raids *RaidsResource + Schedule *ScheduleResource + Search *SearchResource + Streams *StreamsResource + Subscriptions *SubscriptionsResource + Tags *TagsResource + Teams *TeamsResource + Users *UsersResource + Videos *VideosResource + Whispers *WhispersResource + type ClientOption func(*Client) + func WithClientSecret(secret string) ClientOption + func WithHTTPClient(client HTTPClient) ClientOption + type ClipsResource struct + func NewClipsResource(client *Client) *ClipsResource + type Commercial struct + Length int + Message string + RetryAfter int + type CreateBanRequest struct + func (c *CreateBanRequest) Do(ctx context.Context, opts ...RequestOption) ([]ChatterBan, error) + func (c *CreateBanRequest) Duration(duration time.Duration) *CreateBanRequest + func (c *CreateBanRequest) Reason(reason string) *CreateBanRequest + func (c *CreateBanRequest) TargetID(userId string) *CreateBanRequest + type EntitlementsResource struct + func NewEntitlementsResource(client *Client) *EntitlementsResource + type EventSubResource struct + func NewEventSubResource(client *Client) *EventSubResource + type ExtensionsResource struct + func NewExtensionsResource(client *Client) *ExtensionsResource + type Game struct + BoxArtURL string + ID string + IGDB string + Name string + type GamesResource struct + Top *TopGamesResource + func NewGamesResource(client *Client) *GamesResource + type GoalsResource struct + func NewGoalsResource(client *Client) *GoalsResource + type GuestStarResource struct + func NewGuestStarResource(client *Client) *GuestStarResource + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + type HypeTrainResource struct + func NewHypeTrainResource(client *Client) *HypeTrainResource + type ModerationResource struct + func NewModerationResource(client *Client) *ModerationResource + func (r *ModerationResource) ClearChat(broadcasterId, moderatorId string) *ClearChatRequest + func (r *ModerationResource) CreateBan(broadcasterId, moderatorId, userId string) *CreateBanRequest + func (r *ModerationResource) RemoveBan(broadcasterId, moderatorId, userId string) *RemoveBanRequest + type MusicResource struct + func NewMusicResource(client *Client) *MusicResource + type Pagination struct + Cursor string + type PollsResource struct + func NewPollsResource(client *Client) *PollsResource + type PredictionsResource struct + func NewPredictionsResource(client *Client) *PredictionsResource + type RaidsResource struct + func NewRaidsResource(client *Client) *RaidsResource + type RemoveBanRequest struct + func (c *RemoveBanRequest) Do(ctx context.Context, opts ...RequestOption) error + func (c *RemoveBanRequest) TargetID(userId string) *RemoveBanRequest + type RequestOption func(*http.Request) + func AddQueryParameter(key, value string) RequestOption + func SetQueryParameter(key, value string) RequestOption + func WithBearerToken(token string) RequestOption + type ResponseData struct + Code string + Data []T + Message string + Pagination Pagination + Points *int + Status int + Total *int + type ScheduleResource struct + func NewScheduleResource(client *Client) *ScheduleResource + type SearchResource struct + func NewSearchResource(client *Client) *SearchResource + type Stream struct + GameID string + GameName string + ID string + IsMature bool + Language string + StartedAt time.Time + Tags []string + ThumbnailURL string + Title string + Type string + UserDisplayName string + UserID string + UserLogin string + ViewerCount int + type StreamsListCall struct + func (c *StreamsListCall) After(cursor string) *StreamsListCall + func (c *StreamsListCall) Before(cursor string) *StreamsListCall + func (c *StreamsListCall) Do(ctx context.Context, opts ...RequestOption) (*StreamsListResponse, error) + func (c *StreamsListCall) First(n int) *StreamsListCall + func (c *StreamsListCall) GameID(ids ...string) *StreamsListCall + func (c *StreamsListCall) Languages(languages ...string) *StreamsListCall + func (c *StreamsListCall) Type(t string) *StreamsListCall + func (c *StreamsListCall) UserID(ids ...string) *StreamsListCall + func (c *StreamsListCall) Username(usernames ...string) *StreamsListCall + type StreamsListResponse struct + Cursor string + Data []Stream + Header http.Header + type StreamsResource struct + func NewStreamsResource(client *Client) *StreamsResource + func (r *StreamsResource) List() *StreamsListCall + type SubscriptionsResource struct + func NewSubscriptionsResource(client *Client) *SubscriptionsResource + type TagsResource struct + func NewTagsResource(client *Client) *TagsResource + type TeamsResource struct + func NewTeamsResource(client *Client) *TeamsResource + type TopGamesListCall struct + func (c *TopGamesListCall) After(cursor string) *TopGamesListCall + func (c *TopGamesListCall) Before(cursor string) *TopGamesListCall + func (c *TopGamesListCall) Do(ctx context.Context, opts ...RequestOption) (*TopGamesListResponse, error) + func (c *TopGamesListCall) First(n int) *TopGamesListCall + type TopGamesListResponse struct + Cursor string + Data []Game + Header http.Header + type TopGamesResource struct + func NewTopGamesResource(client *Client) *TopGamesResource + func (r *TopGamesResource) List() *TopGamesListCall + type User struct + BroadcasterType string + CreatedAt time.Time + Description string + DisplayName string + Email string + ID string + Login string + OfflineImageURL string + ProfileImageURL string + Type string + type UsersListCall struct + func (c *UsersListCall) Do(ctx context.Context, opts ...RequestOption) (*UsersListResponse, error) + func (c *UsersListCall) ID(ids ...string) *UsersListCall + func (c *UsersListCall) Login(logins ...string) *UsersListCall + type UsersListResponse struct + Data []User + Header http.Header + type UsersResource struct + func NewUsersResource(client *Client) *UsersResource + func (r *UsersResource) List() *UsersListCall + type VideosResource struct + func NewVideosResource(client *Client) *VideosResource + type WhispersInsertCall struct + func (c *WhispersInsertCall) Do(ctx context.Context, opts ...RequestOption) error + func (c *WhispersInsertCall) Message(message string) *WhispersInsertCall + type WhispersResource struct + func NewWhispersResource(client *Client) *WhispersResource + func (r *WhispersResource) Insert(senderId, recipientId string) *WhispersInsertCall v0.1.3 Nov 5, 2022 v0.1.2 Nov 4, 2022 v0.1.1 May 28, 2021 v0.1.0 Feb 13, 2021 Changes in this version + const BaseURL + type Client struct + ID string + var Official *Client = &Client{ ... } + func New(clientID string) *Client + func (client Client) Helix() *helix.Client + func (client Client) Kraken() *kraken.Client + func (client Client) Login(username string, password string) (*TwitchLogin, error) + func (client Client) NewBearer(token string) *Client + type IClient interface + Helix func() *helix.Client + Kraken func() *kraken.Client + Login func(string, string) (*TwitchLogin, error) + NewBearer func(string) *Client + type ITwitchLogin interface + GetAccessToken func() string + GetError func() string + GetErrorCode func() int + ToBearer func() (*Client, error) + Verify func(string) error + type TwitchLogin struct + AccessToken string + CaptchaProof string + Error string + ErrorCode int + ErrorShort string + ObscuredEmail string + RedirectPath string + Username string + func (login *TwitchLogin) Verify(code string) error + func (login TwitchLogin) GetAccessToken() string + func (login TwitchLogin) GetError() string + func (login TwitchLogin) GetErrorCode() int + func (login TwitchLogin) ToBearer() (*Client, error)