-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtwitch_structs.go
More file actions
79 lines (63 loc) · 2.25 KB
/
twitch_structs.go
File metadata and controls
79 lines (63 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package sauron
// #region General
// TwitchGqlResponseUser is various user data from GQL
type TwitchGqlUser struct {
ID string `json:"id"`
BroadcastSettings TwitchGqlBroadcastSettings `json:"broadcastSettings"`
DisplayName string `json:"displayName"`
Login string `json:"login"`
ProfileImageURL string `json:"profileImageURL"`
MediumProfileImageURL string `json:"medProfileImageUrl"`
Roles TwitchGqlRoles `json:"roles"`
}
// TwitchGqlBroadcastSettings is various broadcast settings
type TwitchGqlBroadcastSettings struct {
ID string `json:"id"`
Language string `json:"language"`
Game TwitchGqlGame `json:"game,omitempty"`
Title string `json:"title"`
}
// TwitchGqlGame is various game related settings
type TwitchGqlGame struct {
ID string `json:"id"`
BoxArtURL string `json:"boxArtURL"`
DisplayName string `json:"displayName"`
Name string `json:"name"`
TypeName string `json:"__typename"`
}
// #endregion
// #region Channel
// TwitchGqlChannelResponse is some of the possible GQL response we get from the Twitch endpoint if it is a channel
type TwitchGqlChannelResponse struct {
Data TwitchGqlData `json:"data"`
}
// TwitchGqlData is some of the possible GQL data
type TwitchGqlData struct {
CurrentUser string `json:"currentUser,omitempty"`
Stream TwitchGqlStream `json:"stream,omitempty"`
User TwitchGqlUser `json:"user"`
}
type TwitchGqlRoles struct {
IsAffiliate bool `json:"isAffiliate"`
IsPartner bool `json:"isPartner"`
IsStaff bool `json:"isStaff,omitempty"`
TypeName string `json:"__typename"`
}
type TwitchGqlStream struct {
Type string `json:"type,omitempty"`
}
// #endregion
// #region Clip
type TwitchGqlClipResponse struct {
Data TwitchGqlClipRoot `json:"data"`
}
type TwitchGqlClipRoot struct {
Clip TwitchGqlClipData `json:"clip"`
}
type TwitchGqlClipData struct {
Broadcaster TwitchGqlUser `json:"broadcaster"`
Game TwitchGqlGame `json:"game,omitempty"`
Slug string `json:"slug"`
Title string `json:"title"`
}
// #endregion