chat

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorID

type ActorID string

type BTTVChannelEmotes

type BTTVChannelEmotes struct {
	ID            string        `json:"id"`
	Bots          []interface{} `json:"bots"`
	Avatar        string        `json:"avatar"`
	ChannelEmotes []BTTVEmote   `json:"channelEmotes"`
	SharedEmotes  []BTTVEmote   `json:"sharedEmotes"`
}

type BTTVEmote

type BTTVEmote struct {
	ID        string    `json:"id"`
	Code      string    `json:"code"`
	ImageType ImageType `json:"imageType"`
	UserID    UserID    `json:"userId"`
}

type Chat

type Chat struct {
	Streamer Streamer   `json:"streamer"`
	Comments []Comment  `json:"comments"`
	Video    VideoClass `json:"video"`
	Emotes   Emotes     `json:"emotes"`
}

func UnmarshalChat

func UnmarshalChat(data []byte) (Chat, error)

func (*Chat) Marshal

func (r *Chat) Marshal() ([]byte, error)

type ChatNoEmotes

type ChatNoEmotes struct {
	Streamer Streamer   `json:"streamer"`
	Comments []Comment  `json:"comments"`
	Video    VideoClass `json:"video"`
}

type ChatOnlyBadges added in v1.1.6

type ChatOnlyBadges struct {
	Streamer     Streamer           `json:"streamer"`
	EmbeddedData EmbeddedDataBadges `json:"embeddedData"`
}

new structs for badge update in v1.52.3

type ChatOnlyBadgesOld added in v1.2.10

type ChatOnlyBadgesOld struct {
	Streamer     Streamer              `json:"streamer"`
	EmbeddedData EmbeddedDataBadgesOld `json:"embeddedData"`
}

type ChatOnlyEmotes

type ChatOnlyEmotes struct {
	Streamer     Streamer   `json:"streamer"`
	Video        VideoClass `json:"video"`
	Emotes       Emotes     `json:"emotes"`
	EmbeddedData Emotes     `json:"embeddedData"`
}

type ChatTwitchBadge added in v1.1.6

type ChatTwitchBadge struct {
	Name     string                            `json:"name"`
	Versions map[string]ChatTwitchBadgeVersion `json:"versions"`
}

type ChatTwitchBadgeOld added in v1.2.10

type ChatTwitchBadgeOld struct {
	Name     string            `json:"name"`
	Versions map[string]string `json:"versions"`
}

type ChatTwitchBadgeVersion added in v1.2.10

type ChatTwitchBadgeVersion struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Bytes       string `json:"bytes"`
}

type ChatTwitchBit added in v1.1.6

type ChatTwitchBit struct {
	Prefix   string                `json:"prefix"`
	TierList map[string]FirstParty `json:"tierList"`
}

type Comment

type Comment struct {
	ID                   string      `json:"_id"`
	CreatedAt            string      `json:"created_at"`
	UpdatedAt            string      `json:"updated_at"`
	ChannelID            string      `json:"channel_id"`
	ContentType          ContentType `json:"content_type"`
	ContentID            string      `json:"content_id"`
	ContentOffsetSeconds float64     `json:"content_offset_seconds"`
	Commenter            Commenter   `json:"commenter"`
	Source               Source      `json:"source"`
	State                State       `json:"state"`
	Message              Message     `json:"message"`
	MoreReplies          bool        `json:"more_replies"`
}

type Commenter

type Commenter struct {
	DisplayName string  `json:"display_name"`
	ID          string  `json:"_id"`
	Name        string  `json:"name"`
	Type        Type    `json:"type"`
	Bio         *string `json:"bio"`
	CreatedAt   string  `json:"created_at"`
	UpdatedAt   string  `json:"updated_at"`
}

type Connection

type Connection struct {
	ID            string   `json:"id"`
	Platform      string   `json:"platform"`
	Username      string   `json:"username"`
	DisplayName   string   `json:"display_name"`
	LinkedAt      int64    `json:"linked_at"`
	EmoteCapacity int64    `json:"emote_capacity"`
	EmoteSet      EmoteSet `json:"emote_set"`
}

type ContentType

type ContentType string

type Data

type Data struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Flags     int64  `json:"flags"`
	Lifecycle int64  `json:"lifecycle"`
	Listed    bool   `json:"listed"`
	Animated  bool   `json:"animated"`
	Owner     *Owner `json:"owner,omitempty"`
	Host      Host   `json:"host"`
}

type DisplayName

type DisplayName string

type EmbeddedDataBadges added in v1.1.6

type EmbeddedDataBadges struct {
	TwitchBadges []ChatTwitchBadge `json:"twitchBadges"`
	TwitchBits   []ChatTwitchBit   `json:"twitchBits"`
}

type EmbeddedDataBadgesOld added in v1.2.10

type EmbeddedDataBadgesOld struct {
	TwitchBadges []ChatTwitchBadgeOld `json:"twitchBadges"`
	TwitchBits   []ChatTwitchBit      `json:"twitchBits"`
}

type Emote

type Emote struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Flags     int64     `json:"flags"`
	Timestamp int64     `json:"timestamp"`
	ActorID   *ID       `json:"actor_id"`
	Data      EmoteData `json:"data"`
}

type EmoteData

type EmoteData struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Flags     int64  `json:"flags"`
	Lifecycle int64  `json:"lifecycle"`
	Listed    bool   `json:"listed"`
	Animated  bool   `json:"animated"`
	Owner     User   `json:"owner"`
	Host      Host   `json:"host"`
}

type EmoteSet

type EmoteSet struct {
	ID         ID            `json:"id"`
	Name       string        `json:"name"`
	Tags       []interface{} `json:"tags"`
	Immutable  bool          `json:"immutable"`
	Privileged bool          `json:"privileged"`
	Emotes     []Emote       `json:"emotes,omitempty"`
	Capacity   int64         `json:"capacity"`
	Owner      *User         `json:"owner"`
}

type Emotes

type Emotes struct {
	ThirdParty []Party `json:"thirdParty"`
	FirstParty []Party `json:"firstParty"`
}

type EmoticonElement

type EmoticonElement struct {
	ID    string `json:"_id"`
	Begin int64  `json:"begin"`
	End   int64  `json:"end"`
}

type FFZEmote

type FFZEmote struct {
	ID        int64     `json:"id"`
	User      FFZUser   `json:"user"`
	Code      string    `json:"code"`
	Images    FFZImages `json:"images"`
	ImageType ImageType `json:"imageType"`
}

type FFZImageType

type FFZImageType string

type FFZImages

type FFZImages struct {
	The1X string  `json:"1x"`
	The2X *string `json:"2x"`
	The4X *string `json:"4x"`
}

type FFZUser

type FFZUser struct {
	ID          int64       `json:"id"`
	Name        Name        `json:"name"`
	DisplayName DisplayName `json:"displayName"`
}

type File

type File struct {
	Name       Name          `json:"name"`
	StaticName StaticName    `json:"static_name"`
	Width      int64         `json:"width"`
	Height     int64         `json:"height"`
	Size       int64         `json:"size"`
	Format     SevenTVFormat `json:"format"`
}

type FirstParty added in v1.1.6

type FirstParty struct {
	ID         string      `json:"id"`
	ImageScale int64       `json:"imageScale"`
	Data       string      `json:"data"`
	Name       *string     `json:"name"`
	URL        interface{} `json:"url"`
	Width      int64       `json:"width"`
	Height     int64       `json:"height"`
}

type Format

type Format string
const (
	Static Format = "static"
)

type Fragment

type Fragment struct {
	Text     string            `json:"text"`
	Emoticon *FragmentEmoticon `json:"emoticon"`
}

type FragmentEmoticon

type FragmentEmoticon struct {
	EmoticonID    string `json:"emoticon_id"`
	EmoticonSetID string `json:"emoticon_set_id"`
}

type GanymedeBadge

type GanymedeBadge struct {
	Version     string `json:"version"`
	Name        string `json:"name"`
	ImageUrl1X  string `json:"image_url_1x"`
	ImageUrl2X  string `json:"image_url_2x"`
	ImageUrl4X  string `json:"image_url_4x"`
	Description string `json:"description"`
	Title       string `json:"title"`
	ClickAction string `json:"click_action"`
	ClickUrl    string `json:"click_url"`
}

type GanymedeBadges added in v1.2.3

type GanymedeBadges struct {
	Badges []GanymedeBadge `json:"badges"`
}

func GetTwitchChannelBadges

func GetTwitchChannelBadges(channelId int64) (*GanymedeBadges, error)

func GetTwitchGlobalBadges

func GetTwitchGlobalBadges() (*GanymedeBadges, error)

type GanymedeEmote

type GanymedeEmote struct {
	ID     string            `json:"id"`
	Name   string            `json:"name"`
	URL    string            `json:"url"`
	Type   GanymedeEmoteType `json:"type"`
	Source string            `json:"source"`
	Width  int64             `json:"width"`
	Height int64             `json:"height"`
}

func Get7TVChannelEmotes

func Get7TVChannelEmotes(channelId int64) ([]*GanymedeEmote, error)

func Get7TVGlobalEmotes

func Get7TVGlobalEmotes() ([]*GanymedeEmote, error)

func GetBTTVChannelEmotes

func GetBTTVChannelEmotes(channelId int64) ([]*GanymedeEmote, error)

func GetBTTVGlobalEmotes

func GetBTTVGlobalEmotes() ([]*GanymedeEmote, error)

func GetFFZChannelEmotes

func GetFFZChannelEmotes(channelId int64) ([]*GanymedeEmote, error)

func GetFFZGlobalEmotes

func GetFFZGlobalEmotes() ([]*GanymedeEmote, error)

func GetTwitchChannelEmotes

func GetTwitchChannelEmotes(channelId int64) ([]*GanymedeEmote, error)

func GetTwitchGlobalEmotes

func GetTwitchGlobalEmotes() ([]*GanymedeEmote, error)

type GanymedeEmoteType

type GanymedeEmoteType string

type GanymedeEmotes

type GanymedeEmotes struct {
	Emotes []GanymedeEmote `json:"emotes"`
}

type Host

type Host struct {
	URL   string `json:"url"`
	Files []File `json:"files"`
}

type ID

type ID string

type ImageType

type ImageType string

type Images

type Images struct {
	URL1X string `json:"url_1x"`
	URL2X string `json:"url_2x"`
	URL4X string `json:"url_4x"`
}

type Message

type Message struct {
	Body             string            `json:"body"`
	BitsSpent        int64             `json:"bits_spent"`
	Fragments        []Fragment        `json:"fragments"`
	IsAction         bool              `json:"is_action"`
	UserBadges       []UserBadge       `json:"user_badges"`
	UserColor        *string           `json:"user_color"`
	UserNoticeParams UserNoticeParams  `json:"user_notice_params"`
	Emoticons        []EmoticonElement `json:"emoticons"`
}

type Name

type Name string

type Owner

type Owner struct {
	ID          string      `json:"id"`
	Username    string      `json:"username"`
	DisplayName string      `json:"display_name"`
	AvatarURL   string      `json:"avatar_url"`
	Style       Style       `json:"style"`
	Roles       []Role      `json:"roles"`
	Connections interface{} `json:"connections"`
}

type Party

type Party struct {
	ID         string      `json:"id"`
	ImageScale int64       `json:"imageScale"`
	Data       string      `json:"data"`
	Name       string      `json:"name"`
	URL        interface{} `json:"url"`
	Width      int64       `json:"width"`
	Height     int64       `json:"height"`
}

type Role

type Role string

type SevenTVChannelEmotes

type SevenTVChannelEmotes struct {
	ID            string   `json:"id"`
	Platform      string   `json:"platform"`
	Username      string   `json:"username"`
	DisplayName   string   `json:"display_name"`
	LinkedAt      int64    `json:"linked_at"`
	EmoteCapacity int64    `json:"emote_capacity"`
	EmoteSet      EmoteSet `json:"emote_set"`
	User          User     `json:"user"`
}

type SevenTVEmote

type SevenTVEmote struct {
	ID        string   `json:"id"`
	Name      string   `json:"name"`
	Flags     int64    `json:"flags"`
	Timestamp int64    `json:"timestamp"`
	ActorID   *ActorID `json:"actor_id"`
	Data      Data     `json:"data"`
}

type SevenTVFormat

type SevenTVFormat string

type SevenTVGlobalEmotes

type SevenTVGlobalEmotes struct {
	ID         string         `json:"id"`
	Name       string         `json:"name"`
	Tags       []interface{}  `json:"tags"`
	Immutable  bool           `json:"immutable"`
	Privileged bool           `json:"privileged"`
	Emotes     []SevenTVEmote `json:"emotes"`
	Capacity   int64          `json:"capacity"`
	Owner      Owner          `json:"owner"`
}

type Source

type Source string

type State

type State string

type StaticName

type StaticName string

type Streamer

type Streamer struct {
	Name string      `json:"name"`
	ID   interface{} `json:"id"`
}

type Style

type Style struct {
	Color int64       `json:"color"`
	Paint interface{} `json:"paint"`
}

type ThemeMode

type ThemeMode string
const (
	Dark  ThemeMode = "dark"
	Light ThemeMode = "light"
)

type TwitchBadeResp

type TwitchBadeResp struct {
	BadgeSets map[string]TwitchBadge `json:"badge_sets"`
}

type TwitchBadge

type TwitchBadge map[string]TwitchVersion

type TwitchGlobalEmote

type TwitchGlobalEmote struct {
	ID        string      `json:"id"`
	Name      string      `json:"name"`
	Images    Images      `json:"images"`
	Format    []Format    `json:"format"`
	Scale     []string    `json:"scale"`
	ThemeMode []ThemeMode `json:"theme_mode"`
}

type TwitchGlobalEmotes

type TwitchGlobalEmotes struct {
	Data     []TwitchGlobalEmote `json:"data"`
	Template string              `json:"template"`
}

type TwitchItem

type TwitchItem struct {
	ImageUrl1X  string `json:"image_url_1x"`
	ImageUrl2X  string `json:"image_url_2x"`
	ImageUrl4X  string `json:"image_url_4x"`
	Description string `json:"description"`
	Title       string `json:"title"`
	ClickAction string `json:"click_action"`
	ClickUrl    string `json:"click_url"`
}

type TwitchVersion

type TwitchVersion map[string]TwitchItem

type Type

type Type string

type User

type User struct {
	ID          string       `json:"id"`
	Username    string       `json:"username"`
	DisplayName string       `json:"display_name"`
	AvatarURL   string       `json:"avatar_url"`
	Style       Style        `json:"style"`
	Roles       []Role       `json:"roles"`
	Connections []Connection `json:"connections"`
	CreatedAt   *int64       `json:"createdAt,omitempty"`
	Biography   *string      `json:"biography,omitempty"`
}

type UserBadge

type UserBadge struct {
	ID      ID          `json:"_id"`
	Version interface{} `json:"version"`
}

type UserID

type UserID string

type UserNoticeParams

type UserNoticeParams struct {
	MsgID interface{} `json:"msg_id"`
}

type VideoClass

type VideoClass struct {
	Start float64 `json:"start"`
	End   float64 `json:"end"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL