-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
50 lines (44 loc) · 1.38 KB
/
models.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
package chocolateclashgoapi
const (
FWALeague = "fwa"
OtherLeague = "cc"
)
type Member struct {
Tag string `json:"tag"`
Name string `json:"name"`
Synchronized bool `json:"synchronized"`
InGameUrl string `json:"inGameUrl"`
Donations int `json:"donations"`
DonationsReceived int `json:"donationsReceived"`
TownHallLevel int `json:"townHallLevel"`
Role string `json:"role"`
Clan Clan `json:"clan"`
Actions []Action `json:"actions"`
Attacks []Attack `json:"attacks"`
Notes []Note `json:"notes"`
}
type Clan struct {
Tag string `json:"tag"`
Name string `json:"name"`
League string `json:"league"`
Url string `json:"url"`
}
type Action struct {
Timestamp string `json:"timestamp"`
Action string `json:"action"`
Clan Clan `json:"clan"`
}
type Attack struct {
Timestamp string `json:"timestamp"`
Information string `json:"information"`
Color *string `json:"color"`
MemberOnClan *Clan `json:"memberOnClan"`
OpponentClan *Clan `json:"opponentClan"`
FixWarPid bool `json:"fixWarPid"`
FixWarPidUrl *string `json:"fixWarPidUrl"`
}
type Note struct {
Timestamp string `json:"timestamp"`
Note string `json:"note"`
Author string `json:"author"`
}