This repository was archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructs.go
More file actions
290 lines (260 loc) · 8.89 KB
/
structs.go
File metadata and controls
290 lines (260 loc) · 8.89 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
package quaverapi
// Leaderboard structures
type Leaderboard struct {
Users []LeaderboardUser `json:"users"`
}
type LeaderboardUser struct {
Id int `json:"id"`
SteamId string `json:"steam_id"`
Username string `json:"username"`
Country string `json:"country"`
Allowed int `json:"allowed"`
Privileges int `json:"privileges"`
UserGroups int `json:"usergroups"`
AvatarUrl string `json:"avatar_url"`
RegDate string `json:"time_registered"`
LastActivity string `json:"latest_activity"`
Stats RatingStats `json:"stats"`
}
type LeaderboardHitsUser struct {
Id int `json:"id"`
SteamId string `json:"steam_id"`
Username string `json:"username"`
Country string `json:"country"`
Allowed int `json:"allowed"`
Privileges int `json:"privileges"`
UserGroups int `json:"usergroups"`
AvatarUrl string `json:"avatar_url"`
RegDate string `json:"time_registered"`
LastActivity string `json:"latest_activity"`
Stats RatingStats `json:"stats"`
}
type RatingStats struct {
Rank int `json:"rank"`
RankedScore int `json:"ranked_score"`
Accuracy float64 `json:"overall_accuracy"`
Rating float64 `json:"overall_performance_rating"`
Playcount int `json:"play_count"`
MaxCombo int `json:"max_combo"`
}
type HitsStats struct {
Rank int `json:"rank"`
TotalHits int `json:"total_hits"`
TotalPlays int `json:"total_ranked_plays"`
TotalFails int `json:"total_ranked_failures"`
}
// Map structures
type Mapsets struct {
Status int `json:"status"`
Mapset Mapset `json:"mapset"`
}
type UserMapsets struct {
Status int `json:"status"`
Mapsets []Mapset `json:"mapsets"`
}
type Maps struct {
Status int `json:"status"`
Map Map `json:"map"`
}
type Mapset struct {
Id int `json:"id"`
Md5 string `json:"package_md5"`
CreatorId int `json:"creator_id"`
CreatorUsername string `json:"creator_username"`
CreatorAvatarUrl string `json:"creator_avatar_url"`
Artist string `json:"artist"`
Title string `json:"title"`
Source string `json:"source"`
Tags string `json:"tags"`
Description string `json:"description"`
SubmitDate string `json:"date_submitted"`
LastUpdateDate string `json:"date_last_updated"`
Visible int `json:"visible"`
RankedStatus int `json:"ranked_status"`
Maps []Map
}
type Map struct {
Id int `json:"id"`
MapsetId int `json:"mapset_id"`
Md5 string `json:"md5"`
CreatorId int `json:"creator_id"`
CreatorUsername string `json:"creator_username"`
Mode int `json:"game_mode"`
RankedStatus int `json:"ranked_status"`
Artist string `json:"artist"`
Title string `json:"title"`
Source string `json:"source"`
Tags string `json:"tags"`
Description string `json:"description"`
DifficultyName string `json:"difficulty_name"`
Length int `json:"length"`
Bpm float64 `json:"bpm"`
DifficultyRating float64 `json:"difficulty_rating"`
ObjectsNormal int `json:"count_hitobject_normal"`
ObjectsLong int `json:"count_hitobject_long"`
Playcount int `json:"play_count"`
Failcount int `json:"fail_count"`
PendingMods int `json:"mods_pending"`
AcceptedMods int `json:"mods_accepted"`
DeniedMods int `json:"mods_denied"`
IgnoredMods int `json:"mods_ignored"`
OnlineOffset int `json:"online_offset"`
}
// Score structures
type Scores struct {
Status int `json:"status"`
Scores []Score `json:"scores"`
}
type MapScores struct {
Status int `json:"status"`
Scores []MapScore `json:"scores"`
}
type Score struct {
ScoreId int `json:"id"`
Time string `json:"time"`
Mode int `json:"mode"`
Mods int `json:"mods"`
ModsString string `json:"mods_string"`
Rating float64 `json:"performance_rating"`
PersonalBest bool `json:"personal_best"`
Score int `json:"total_score"`
Accuracy float64 `json:"accuracy"`
Grade string `json:"grade"`
MaxCombo int `json:"max_combo"`
CountMarv int `json:"count_marv"`
CountPerf int `json:"count_perf"`
CountGreat int `json:"count_great"`
CountGood int `json:"count_good"`
CountOkay int `json:"count_okay"`
CountMiss int `json:"count_miss"`
ScrollSpeed int `json:"scroll_speed"`
TourGameId int `json:"tournament_game_id"`
Ratio float64 `json:"ratio"`
Map Map `json:"map"`
}
type MapScore struct {
ScoreId int `json:"id"`
MapMd5 string `json:"map_md5"`
Time string `json:"time"`
Mode int `json:"mode"`
Mods int `json:"mods"`
ModsString string `json:"mods_string"`
Rating float64 `json:"performance_rating"`
PersonalBest bool `json:"personal_best"`
Score int `json:"total_score"`
Accuracy float64 `json:"accuracy"`
Grade string `json:"grade"`
MaxCombo int `json:"max_combo"`
CountMarv int `json:"count_marv"`
CountPerf int `json:"count_perf"`
CountGreat int `json:"count_great"`
CountGood int `json:"count_good"`
CountOkay int `json:"count_okay"`
CountMiss int `json:"count_miss"`
User UserInfo `json:"user"`
}
type ReplayData struct {
Status int `json:"status"`
Hits []string `json:"hits"`
}
// User structures
type User struct {
User UserData `json:"user"`
}
type Users struct {
Users []UserInfo `json:"users"`
}
type UserData struct {
Info UserInfo `json:"info"`
Activity []UserActivity `json:"activity_feed"`
Keys4 UserMode `json:"keys4"`
Keys7 UserMode `json:"keys7"`
}
type UserInfo struct {
Id int `json:"id"`
SteamId string `json:"steam_id"`
RegDate string `json:"time_registered"`
Allowed int `json:"allowed"`
Privileges int `json:"privileges"`
UserGroups int `json:"usergroups"`
MuteEnd string `json:"mute_endtime"`
LastActivity string `json:"latest_activity"`
Username string `json:"username"`
Country string `json:"country"`
AvatarUrl string `json:"avatar_url"`
Socials UserSocials `json:"information"`
Online bool `json:"online"`
}
type UserSocials struct {
Discord string `json:"discord"`
Twitter string `json:"twitter"`
Twitch string `json:"twitch"`
Youtube string `json:"youtube"`
}
type UserActivity struct {
Id int `json:"id"`
Type int `json:"type"`
Date string `json:"timestamp"`
Map UserActivityMap `json:"map"`
}
type UserActivityMap struct {
Id int `json:"id"`
Name string `json:"name"`
}
type UserMode struct {
GlobalRank int `json:"globalRank"`
CountryRank int `json:"countryRank"`
MultiRank int `json:"multiplayerWinRank"`
Stats UserStats `json:"stats"`
}
type UserStats struct {
TotalScore int `json:"total_score"`
RankedScore int `json:"ranked_score"`
Accuracy float64 `json:"overall_accuracy"`
Rating float64 `json:"overall_performance_rating"`
Playcount int `json:"play_count"`
Failcount int `json:"fail_count"`
MaxCombo int `json:"max_combo"`
ReplaysWatched int `json:"replays_watched"`
TotalMarv int `json:"total_marv"`
TotalPerf int `json:"total_perf"`
TotalGreat int `json:"total_great"`
TotalGood int `json:"total_good"`
TotalOkay int `json:"total_okay"`
TotalMiss int `json:"total_miss"`
TotalPauses int `json:"total_pauses"`
MultiWins int `json:"multiplayer_wins"`
MultiLosses int `json:"multiplayer_losses"`
MultiTies int `json:"multiplayer_ties"`
}
type RankGraph struct {
Status int `json:"status"`
Statistics []Rank `json:"statistics"`
}
type Rank struct {
Rank int `json:"rank"`
Timestamp string `json:"timestamp"`
}
type Achievements struct {
Status int `json:"status"`
Achievements []Achievement `json:"achievements"`
}
type Achievement struct {
Id int `json:"id"`
SteamApiName string `json:"steam_api_name"`
Name string `json:"name"`
Description string `json:"description"`
Difficulty string `json:"difficulty"`
Unlocked bool `json:"unlocked"`
}
// Server Stats structures
type Server struct {
Status int `json:"status"`
Stats ServerStats `json:"stats"`
}
type ServerStats struct {
OnlineUsers int64 `json:"total_online_users"`
TotalUsers int64 `json:"total_users"`
TotalMapsets int64 `json:"total_mapsets"`
TotalScores int64 `json:"total_scores"`
}