/
structs.go
165 lines (148 loc) · 5.95 KB
/
structs.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
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
package leagueliveapi
type apiError struct {
ErrorCode string `json:"errorCode"`
HTTPStatus int `json:"httpStatus"`
ImplementationDetails interface{} `json:"implementationDetails"`
Message string `json:"message"`
}
type AllGameData struct {
ActivePlayer ActivePlayer `json:"activePlayer"`
AllPlayers []Player `json:"allPlayers"`
Events Events `json:"events"`
GameData GameData `json:"gameData"`
}
type ActivePlayer struct {
Abilities Abilities `json:"abilities"`
ChampionStats ChampionStats `json:"championStats"`
CurrentGold float64 `json:"currentGold"`
FullRunes FullRunes `json:"fullRunes"`
Level int `json:"level"`
SummonerName string `json:"summonerName"`
}
type Abilities struct {
E Ability `json:"E"`
Passive Ability `json:"Passive"`
Q Ability `json:"Q"`
R Ability `json:"R"`
W Ability `json:"W"`
}
type Ability struct {
AbilityLevel int `json:"abilityLevel,omitempty"`
DisplayName string `json:"displayName"`
ID string `json:"id"`
RawDescription string `json:"rawDescription"`
RawDisplayName string `json:"rawDisplayName"`
}
type ChampionStats struct {
AbilityHaste float64 `json:"abilityHaste"`
AbilityPower float64 `json:"abilityPower"`
Armor float64 `json:"armor"`
ArmorPenetrationFlat float64 `json:"armorPenetrationFlat"`
ArmorPenetrationPercent float64 `json:"armorPenetrationPercent"`
AttackDamage float64 `json:"attackDamage"`
AttackRange float64 `json:"attackRange"`
AttackSpeed float64 `json:"attackSpeed"`
BonusArmorPenetrationPercent float64 `json:"bonusArmorPenetrationPercent"`
BonusMagicPenetrationPercent float64 `json:"bonusMagicPenetrationPercent"`
CritChance float64 `json:"critChance"`
CritDamage float64 `json:"critDamage"`
CurrentHealth float64 `json:"currentHealth"`
HealthRegenRate float64 `json:"healthRegenRate"`
LifeSteal float64 `json:"lifeSteal"`
MagicLethality float64 `json:"magicLethality"`
MagicPenetrationFlat float64 `json:"magicPenetrationFlat"`
MagicPenetrationPercent float64 `json:"magicPenetrationPercent"`
MagicResist float64 `json:"magicResist"`
MaxHealth float64 `json:"maxHealth"`
MoveSpeed float64 `json:"moveSpeed"`
PhysicalLethality float64 `json:"physicalLethality"`
ResourceMax float64 `json:"resourceMax"`
ResourceRegenRate float64 `json:"resourceRegenRate"`
ResourceType string `json:"resourceType"`
ResourceValue float64 `json:"resourceValue"`
SpellVamp float64 `json:"spellVamp"`
Tenacity float64 `json:"tenacity"`
}
type Rune struct {
DisplayName string `json:"displayName,omitempty"`
ID int `json:"id"`
RawDescription string `json:"rawDescription"`
RawDisplayName string `json:"rawDisplayName,omitempty"`
}
type FullRunes struct {
GeneralRunes []Rune `json:"generalRunes"`
Keystone Rune `json:"keystone"`
PrimaryRuneTree Rune `json:"primaryRuneTree"`
SecondaryRuneTree Rune `json:"secondaryRuneTree"`
StatRunes []Rune `json:"statRunes"`
}
type Player struct {
ChampionName string `json:"championName"`
IsBot bool `json:"isBot"`
IsDead bool `json:"isDead"`
Items []Item `json:"items"`
Level int `json:"level"`
Position string `json:"position"`
RawChampionName string `json:"rawChampionName"`
RespawnTimer float64 `json:"respawnTimer"`
Runes Runes `json:"runes"`
Scores Scores `json:"scores"`
SkinID int `json:"skinID"`
SummonerName string `json:"summonerName"`
SummonerSpells SummonerSpells `json:"summonerSpells"`
Team string `json:"team"`
}
type Item struct {
CanUse bool `json:"canUse"`
Consumable bool `json:"consumable"`
Count int `json:"count"`
DisplayName string `json:"displayName"`
ItemID int `json:"itemID"`
Price int `json:"price"`
RawDescription string `json:"rawDescription"`
RawDisplayName string `json:"rawDisplayName"`
Slot int `json:"slot"`
}
type Runes struct {
Keystone Rune `json:"keystone"`
PrimaryRuneTree Rune `json:"primaryRuneTree"`
SecondaryRuneTree Rune `json:"secondaryRuneTree"`
}
type Scores struct {
Assists int `json:"assists"`
CreepScore int `json:"creepScore"`
Deaths int `json:"deaths"`
Kills int `json:"kills"`
WardScore float64 `json:"wardScore"`
}
type SummonerSpell struct {
DisplayName string `json:"displayName"`
RawDescription string `json:"rawDescription"`
RawDisplayName string `json:"rawDisplayName"`
}
type SummonerSpells struct {
SummonerSpellOne SummonerSpell `json:"summonerSpellOne"`
SummonerSpellTwo SummonerSpell `json:"summonerSpellTwo"`
}
type Events struct {
Events []Event `json:"Events"`
}
type Event struct {
EventID int `json:"EventID"`
EventName string `json:"EventName"`
EventTime float64 `json:"EventTime"`
Assisters []string `json:"Assisters,omitempty"`
DragonType string `json:"DragonType,omitempty"`
KillerName string `json:"KillerName,omitempty"`
Recipient string `json:"Recipient,omitempty"`
Stolen string `json:"Stolen,omitempty"`
TurretKilled string `json:"TurretKilled,omitempty"`
VictimName string `json:"VictimName,omitempty"`
}
type GameData struct {
GameMode string `json:"gameMode"`
GameTime float64 `json:"gameTime"`
MapName string `json:"mapName"`
MapNumber int `json:"mapNumber"`
MapTerrain string `json:"mapTerrain"`
}