mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2024-12-22 13:13:00 -05:00
153 lines
4.4 KiB
Go
153 lines
4.4 KiB
Go
package structs
|
|
|
|
import "time"
|
|
|
|
type Social struct {
|
|
Type string `json:"type"`
|
|
Name string `json:"name"`
|
|
Url string `json:"url"`
|
|
}
|
|
|
|
type Stream struct {
|
|
Tags []string `json:"tags"`
|
|
Title string `json:"title"`
|
|
Topic string `json:"topic"`
|
|
StartedAt time.Time `json:"startedAt"`
|
|
Viewers int `json:"viewers"`
|
|
Preview string `json:"preview"`
|
|
Cursor string `json:"cursor,omitempty"`
|
|
}
|
|
|
|
type Streamer struct {
|
|
Username string `json:"username"`
|
|
Login string `json:"login"`
|
|
About string `json:"about"`
|
|
Pfp string `json:"pfp"`
|
|
Banner *string `json:"banner"`
|
|
Followers int `json:"followers"`
|
|
Socials []Social `json:"socials"`
|
|
IsLive bool `json:"isLive"`
|
|
IsPartner bool `json:"isPartner"`
|
|
ColorHex *string `json:"colorHex"`
|
|
Id string `json:"id"`
|
|
Stream *Stream `json:"stream,omitempty"`
|
|
}
|
|
|
|
type CategoryPreview struct {
|
|
Name string `json:"name"`
|
|
DisplayName string `json:"displayName"`
|
|
Viewers int `json:"viewers"`
|
|
Tags []string `json:"tags"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Image string `json:"image"`
|
|
Cursor string `json:"cursor,omitempty"`
|
|
}
|
|
|
|
type CategoryMinifiedStreamer struct {
|
|
Name string `json:"name"`
|
|
Pfp string `json:"pfp"`
|
|
ColorHex *string `json:"colorHex"`
|
|
}
|
|
|
|
type CategoryMinifiedStream struct {
|
|
Title string `json:"title"`
|
|
Viewers int `json:"viewers"`
|
|
Preview string `json:"preview"`
|
|
Tags []string `json:"tags"`
|
|
Cursor string `json:"cursor,omitempty"`
|
|
Streamer CategoryMinifiedStreamer `json:"streamer"`
|
|
}
|
|
|
|
type CategoryData struct {
|
|
Name string `json:"name"`
|
|
DisplayName string `json:"displayName"`
|
|
Description string `json:"description"`
|
|
Viewers int `json:"viewers"`
|
|
Followers int `json:"followers"`
|
|
Tags []string `json:"tags"`
|
|
Streams []CategoryMinifiedStream `json:"streams"`
|
|
Cover string `json:"cover"`
|
|
}
|
|
|
|
type Badge struct {
|
|
Id string `json:"id"`
|
|
Title string `json:"title"`
|
|
SetId string `json:"setId"`
|
|
Version string `json:"version"`
|
|
Images map[string]string `json:"images"`
|
|
}
|
|
|
|
type SearchResult struct {
|
|
Channels []Streamer `json:"channels"`
|
|
Categories []CategoryPreview `json:"categories"`
|
|
RelatedLiveChannels []Streamer `json:"relatedChannels"`
|
|
ChannelsWithTag []Streamer `json:"channelsWithTag"`
|
|
}
|
|
|
|
type MinifiedCategory struct {
|
|
Image string `json:"image"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
DisplayName string `json:"displayName"`
|
|
}
|
|
|
|
type MinifiedStreamer struct {
|
|
Name string `json:"name"`
|
|
Login string `json:"login"`
|
|
Pfp string `json:"pfp"`
|
|
ColorHex string `json:"colorHex"`
|
|
}
|
|
|
|
type Video struct {
|
|
Type string `json:"type"`
|
|
Preview string `json:"preview"`
|
|
Game MinifiedCategory `json:"game"`
|
|
Duration int `json:"duration"`
|
|
Title string `json:"title"`
|
|
PublishedAt time.Time `json:"publishedAt"`
|
|
Views int `json:"views"`
|
|
Streamer Streamer `json:"streamer"`
|
|
Id string `json:"id"`
|
|
}
|
|
|
|
type Shelve struct {
|
|
Title string `json:"title"`
|
|
Videos []Video `json:"videos"`
|
|
}
|
|
|
|
type VodMessager struct {
|
|
Name string `json:"name"`
|
|
Login string `json:"login"`
|
|
}
|
|
|
|
type VodCommentBadge struct {
|
|
Version string `json:"version"`
|
|
SetID string `json:"setId"`
|
|
}
|
|
|
|
type VodComment struct {
|
|
Message string `json:"message"`
|
|
Messager MinifiedStreamer `json:"messager"`
|
|
Offset int `json:"offset"`
|
|
Cursor string `json:"cursor"`
|
|
Badges []VodCommentBadge `json:"badges"`
|
|
}
|
|
|
|
type StreamMessageBadge struct {
|
|
Version string `json:"version"`
|
|
SetID string `json:"setId"`
|
|
}
|
|
|
|
type StreamMessage struct {
|
|
Message string `json:"message"`
|
|
Username string `json:"username"`
|
|
Color string `json:"color"`
|
|
Badges []StreamMessageBadge `json:"badges"`
|
|
}
|
|
|
|
type FollowingStreamer struct {
|
|
Username string `json:"username"`
|
|
Login string `json:"login"`
|
|
Pfp string `json:"pfp"`
|
|
Followers int `json:"followers"`
|
|
}
|