Documentation ¶
Index ¶
- Constants
- type ApiClient
- type ChangeEmoteResponse
- type ConnectionResponse
- type Emote
- type MockApiClient
- type SevenTvClient
- func (c *SevenTvClient) AddEmote(channelUserID, emoteID string) error
- func (c *SevenTvClient) GetEmote(emoteID string) (Emote, error)
- func (c *SevenTvClient) GetTwitchConnection(twitchUserID string) (ConnectionResponse, error)
- func (c *SevenTvClient) GetUser(channelID string) (User, error)
- func (c *SevenTvClient) GetUserV3(userID string) (UserV3, error)
- func (c *SevenTvClient) QuerySevenTvGQL(query string, variables map[string]interface{}, response interface{}) error
- func (c *SevenTvClient) RemoveEmote(channelUserID, emoteID string) error
- type SevenTvUserResponse
- type User
- type UserResponse
- type UserV3
Constants ¶
View Source
const ( EmoteVisibilityPrivate int32 = 1 << iota EmoteVisibilityGlobal EmoteVisibilityUnlisted EmoteVisibilityOverrideBTTV EmoteVisibilityOverrideFFZ EmoteVisibilityOverrideTwitchGlobal EmoteVisibilityOverrideTwitchSubscriber EmoteVisibilityZeroWidth EmoteVisibilityPermanentlyUnlisted EmoteVisibilityAll int32 = (1 << iota) - 1 )
View Source
const DefaultSevenTvApiBaseUrl = "https://7tv.io/v3"
View Source
const DefaultSevenTvGqlV3BaseUrl = "https://7tv.io/v3/gql"
View Source
const SEVEN_TV_ADD_EMOTE_QUERY = `` /* 141-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeEmoteResponse ¶
type ChangeEmoteResponse struct { Errors []struct { Message string `json:"message"` Path []string `json:"path"` Extensions struct { Code int `json:"code"` Fields struct { } `json:"fields"` Message string `json:"message"` } `json:"extensions"` } `json:"errors"` Data struct { EmoteSet interface{} `json:"emoteSet"` } `json:"data"` }
type ConnectionResponse ¶
type ConnectionResponse struct { ID string `json:"id"` Platform string `json:"platform"` Username string `json:"username"` DisplayName string `json:"display_name"` LinkedAt int64 `json:"linked_at"` EmoteCapacity int `json:"emote_capacity"` EmoteSet struct { ID string `json:"id"` Name string `json:"name"` Tags []interface{} `json:"tags"` Immutable bool `json:"immutable"` Privileged bool `json:"privileged"` Emotes []struct { ID string `json:"id"` Name string `json:"name"` Flags int `json:"flags"` Timestamp int64 `json:"timestamp"` ActorID string `json:"actor_id"` Data struct { ID string `json:"id"` Name string `json:"name"` Flags int `json:"flags"` Lifecycle int `json:"lifecycle"` Listed bool `json:"listed"` Animated bool `json:"animated"` Owner struct { ID string `json:"id"` Username string `json:"username"` DisplayName string `json:"display_name"` Style struct { Color int `json:"color"` Paint interface{} `json:"paint"` } `json:"style"` Roles []string `json:"roles"` } `json:"owner"` Host struct { URL string `json:"url"` Files []struct { Name string `json:"name"` StaticName string `json:"static_name"` Width int `json:"width"` Height int `json:"height"` Size int `json:"size"` Format string `json:"format"` } `json:"files"` } `json:"host"` } `json:"data"` } `json:"emotes"` Capacity int `json:"capacity"` Owner struct { ID string `json:"id"` Username string `json:"username"` DisplayName string `json:"display_name"` Style struct { Color int `json:"color"` Paint interface{} `json:"paint"` } `json:"style"` Roles []string `json:"roles"` } `json:"owner"` } `json:"emote_set"` User struct { ID string `json:"id"` Username string `json:"username"` ProfilePictureURL string `json:"profile_picture_url"` DisplayName string `json:"display_name"` Style struct { Color int `json:"color"` Paint interface{} `json:"paint"` } `json:"style"` Biography string `json:"biography"` Editors []struct { ID string `json:"id"` Permissions int `json:"permissions"` Visible bool `json:"visible"` AddedAt int64 `json:"added_at"` } `json:"editors"` Roles []string `json:"roles"` Connections []struct { ID string `json:"id"` Platform string `json:"platform"` Username string `json:"username"` DisplayName string `json:"display_name"` LinkedAt int64 `json:"linked_at"` EmoteCapacity int `json:"emote_capacity"` } `json:"connections"` } `json:"user"` }
type MockApiClient ¶
type MockApiClient struct { }
func NewMockApiClient ¶
func NewMockApiClient() *MockApiClient
func (*MockApiClient) AddEmote ¶
func (c *MockApiClient) AddEmote(channelID, emoteID string) error
func (*MockApiClient) RemoveEmote ¶
func (c *MockApiClient) RemoveEmote(channelID string, emoteID string) error
type SevenTvClient ¶
type SevenTvClient struct {
// contains filtered or unexported fields
}
func NewSevenTvClient ¶
func NewSevenTvClient(store store.Store) *SevenTvClient
func (*SevenTvClient) AddEmote ¶
func (c *SevenTvClient) AddEmote(channelUserID, emoteID string) error
func (*SevenTvClient) GetTwitchConnection ¶
func (c *SevenTvClient) GetTwitchConnection(twitchUserID string) (ConnectionResponse, error)
func (*SevenTvClient) QuerySevenTvGQL ¶
func (c *SevenTvClient) QuerySevenTvGQL(query string, variables map[string]interface{}, response interface{}) error
func (*SevenTvClient) RemoveEmote ¶
func (c *SevenTvClient) RemoveEmote(channelUserID, emoteID string) error
type SevenTvUserResponse ¶
type SevenTvUserResponse struct { Data struct { User struct { ID string `json:"id"` Emotes []struct { ID string `json:"id"` Name string `json:"name"` Status int `json:"status"` Visibility int `json:"visibility"` Width []int `json:"width"` Height []int `json:"height"` } `json:"emotes"` EmoteSlots int `json:"emote_slots"` } `json:"user"` } `json:"data"` }
type UserResponse ¶
type UserResponse struct { ID string `json:"id"` Platform string `json:"platform"` Username string `json:"username"` DisplayName string `json:"display_name"` LinkedAt int64 `json:"linked_at"` EmoteCapacity int `json:"emote_capacity"` EmoteSetID interface{} `json:"emote_set_id"` EmoteSet struct { ID string `json:"id"` Name string `json:"name"` Flags int `json:"flags"` Tags []interface{} `json:"tags"` Immutable bool `json:"immutable"` Privileged bool `json:"privileged"` Emotes []struct { ID string `json:"id"` Name string `json:"name"` Flags int `json:"flags"` Timestamp int64 `json:"timestamp"` ActorID string `json:"actor_id"` Data struct { ID string `json:"id"` Name string `json:"name"` Flags int `json:"flags"` Lifecycle int `json:"lifecycle"` State []string `json:"state"` Listed bool `json:"listed"` Animated bool `json:"animated"` Owner struct { ID string `json:"id"` Username string `json:"username"` DisplayName string `json:"display_name"` AvatarURL string `json:"avatar_url"` Style struct { } `json:"style"` Roles []string `json:"roles"` } `json:"owner"` Host struct { URL string `json:"url"` Files []struct { Name string `json:"name"` StaticName string `json:"static_name"` Width int `json:"width"` Height int `json:"height"` FrameCount int `json:"frame_count"` Size int `json:"size"` Format string `json:"format"` } `json:"files"` } `json:"host"` } `json:"data"` } `json:"emotes"` EmoteCount int `json:"emote_count"` Capacity int `json:"capacity"` Owner struct { ID string `json:"id"` Username string `json:"username"` DisplayName string `json:"display_name"` AvatarURL string `json:"avatar_url"` Style struct { Color int `json:"color"` } `json:"style"` Roles []string `json:"roles"` } `json:"owner"` } `json:"emote_set"` User struct { ID string `json:"id"` Username string `json:"username"` DisplayName string `json:"display_name"` CreatedAt int64 `json:"created_at"` AvatarURL string `json:"avatar_url"` Biography string `json:"biography"` Style struct { Color int `json:"color"` } `json:"style"` EmoteSets []struct { ID string `json:"id"` Name string `json:"name"` Flags int `json:"flags"` Tags []interface{} `json:"tags"` Capacity int `json:"capacity"` } `json:"emote_sets"` Editors []struct { ID string `json:"id"` Permissions int `json:"permissions"` Visible bool `json:"visible"` AddedAt int64 `json:"added_at"` } `json:"editors"` Roles []string `json:"roles"` Connections []struct { ID string `json:"id"` Platform string `json:"platform"` Username string `json:"username"` DisplayName string `json:"display_name"` LinkedAt int64 `json:"linked_at"` EmoteCapacity int `json:"emote_capacity"` EmoteSetID interface{} `json:"emote_set_id"` EmoteSet struct { ID string `json:"id"` Name string `json:"name"` Flags int `json:"flags"` Tags []interface{} `json:"tags"` Immutable bool `json:"immutable"` Privileged bool `json:"privileged"` Capacity int `json:"capacity"` Owner interface{} `json:"owner"` } `json:"emote_set"` } `json:"connections"` } `json:"user"` }
type UserV3 ¶
type UserV3 struct { ID string `json:"id"` Username string `json:"username"` ProfilePictureURL string `json:"profile_picture_url"` DisplayName string `json:"display_name"` Style struct { Color int `json:"color"` Paint interface{} `json:"paint"` } `json:"style"` Biography string `json:"biography"` Editors []struct { ID string `json:"id"` Permissions int `json:"permissions"` Visible bool `json:"visible"` AddedAt int64 `json:"added_at"` } `json:"editors"` Roles []string `json:"roles"` Connections []struct { ID string `json:"id"` Platform string `json:"platform"` Username string `json:"username"` DisplayName string `json:"display_name"` LinkedAt int64 `json:"linked_at"` EmoteCapacity int `json:"emote_capacity"` } `json:"connections"` }
Click to show internal directories.
Click to hide internal directories.