-
Notifications
You must be signed in to change notification settings - Fork 8
/
stats.go
36 lines (31 loc) · 1.22 KB
/
stats.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
package structs
// StreakScopeStruct is the second-level object holding streak statistics.
type StreakScopeStruct struct {
Current int64 `json:"current"`
Best int64 `json:"best"`
Worst int64 `json:"worst"`
}
// WinrateScopeStruct is a second-level object holding winrate statistics for matches.
type WinrateMatchScopeStruct struct {
Rate float64 `json:"rate"`
History int64 `json:"history"`
PerMap []WinratePerMapStruct `json:"per_map"`
}
// WinratePerMapStruct holds the innermost JSON about winrates related to a single map.
type WinratePerMapStruct struct {
Map MapStruct `json:"map,omitempty"`
Rate float64 `json:"rate"`
History int64 `json:"history"`
}
// WinrateScopeStruct is a second-level object holding winrate statistics for series'.
type WinrateSeriesScopeStruct struct {
Rate float64 `json:"rate"`
History int64 `json:"history"`
PerFormat []WinratePerFormatStruct `json:"per_format"`
}
// WinratePerFormatStruct holds the innermost JSON about winrates related to a specific format.
type WinratePerFormatStruct struct {
BestOf int64 `json:"best_of"`
Rate float64 `json:"rate"`
History int64 `json:"history"`
}