0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2024-12-22 21:23:01 -05:00
safetwitch-backend/extractor/structs/parsed.go

84 lines
2.6 KiB
Go
Raw Normal View History

package structs
import "time"
type Social struct {
2023-05-29 15:02:10 -05:00
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"`
About string `json:"about"`
Pfp string `json:"pfp"`
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"`
}
2023-05-26 09:17:55 -05:00
type CategoryPreview struct {
Name string `json:"name"`
2023-05-26 09:17:55 -05:00
DisplayName string `json:"displayName"`
Viewers int `json:"viewers"`
2023-05-26 09:17:55 -05:00
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"`
}
2023-05-31 18:39:07 -05:00
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"`
}
2023-06-06 07:31:12 -05:00
type SearchResult struct {
Channels []Streamer `json:"channels"`
Categories []CategoryPreview `json:"categories"`
RelatedLiveChannels []Streamer `json:"relatedChannels"`
ChannelsWithTag []Streamer `json:"channelsWithTag"`
}