-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjson.go
70 lines (68 loc) · 2.62 KB
/
json.go
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
package main
// https://mholt.github.io/json-to-go/
type TwitchStreamsResponse struct {
Total int `json:"_total"`
Streams []struct {
Game string `json:"game"`
Viewers int `json:"viewers"`
AverageFps float64 `json:"average_fps"`
VideoHeight int `json:"video_height"`
CreatedAt string `json:"created_at"`
ID int64 `json:"_id"`
Channel struct {
Mature bool `json:"mature"`
Status string `json:"status"`
BroadcasterLanguage string `json:"broadcaster_language"`
DisplayName string `json:"display_name"`
Game string `json:"game"`
Delay int `json:"delay"`
Language string `json:"language"`
ID int `json:"_id"`
Name string `json:"name"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Logo string `json:"logo"`
Banner string `json:"banner"`
VideoBanner string `json:"video_banner"`
Background string `json:"background"`
ProfileBanner string `json:"profile_banner"`
ProfileBannerBackgroundColor string `json:"profile_banner_background_color"`
Partner bool `json:"partner"`
URL string `json:"url"`
Views int `json:"views"`
Followers int `json:"followers"`
Links struct {
Self string `json:"self"`
Follows string `json:"follows"`
Commercial string `json:"commercial"`
StreamKey string `json:"stream_key"`
Chat string `json:"chat"`
Features string `json:"features"`
Subscriptions string `json:"subscriptions"`
Editors string `json:"editors"`
Teams string `json:"teams"`
Videos string `json:"videos"`
} `json:"_links"`
} `json:"channel"`
Preview struct {
Small string `json:"small"`
Medium string `json:"medium"`
Large string `json:"large"`
Template string `json:"template"`
} `json:"preview"`
Links struct {
Self string `json:"self"`
} `json:"_links"`
} `json:"streams"`
Links struct {
Summary string `json:"summary"`
Followed string `json:"followed"`
Next string `json:"next"`
Featured string `json:"featured"`
Self string `json:"self"`
} `json:"_links"`
}
type ResponseItem struct {
Name string `json:"name"`
URL string `json:"url"`
}