/
pokemon.go
540 lines (525 loc) · 14.7 KB
/
pokemon.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
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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
package structs
// Ability is a single ability.
type Ability struct {
EffectChanges []struct {
EffectEntries []struct {
Effect string `json:"effect"`
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
} `json:"effect_entries"`
VersionGroup struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"version_group"`
} `json:"effect_changes"`
EffectEntries []struct {
Effect string `json:"effect"`
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
ShortEffect string `json:"short_effect"`
} `json:"effect_entries"`
FlavorTextEntries []struct {
FlavorText string `json:"flavor_text"`
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
VersionGroup struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"version_group"`
} `json:"flavor_text_entries"`
Generation struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"generation"`
ID int `json:"id"`
IsMainSeries bool `json:"is_main_series"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
Pokemon []struct {
IsHidden bool `json:"is_hidden"`
Pokemon struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon"`
Slot int `json:"slot"`
} `json:"pokemon"`
}
// Characteristic is a single characteristic.
type Characteristic struct {
Descriptions []struct {
Description string `json:"description"`
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
} `json:"descriptions"`
GeneModulo int `json:"gene_modulo"`
HighestStat struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"highest_stat"`
ID int `json:"id"`
PossibleValues []int `json:"possible_values"`
}
// EggGroup is a single egg group.
type EggGroup struct {
ID int `json:"id"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
PokemonSpecies []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon_species"`
}
// Gender is a single gender.
type Gender struct {
ID int `json:"id"`
Name string `json:"name"`
PokemonSpeciesDetails []struct {
PokemonSpecies struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon_species"`
Rate int `json:"rate"`
} `json:"pokemon_species_details"`
RequiredForEvolution []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"required_for_evolution"`
}
// GrowthRate is a single growth rate.
type GrowthRate struct {
Descriptions []struct {
Description string `json:"description"`
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
} `json:"descriptions"`
Formula string `json:"formula"`
ID int `json:"id"`
Levels []struct {
Experience int `json:"experience"`
Level int `json:"level"`
} `json:"levels"`
Name string `json:"name"`
PokemonSpecies []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon_species"`
}
// Nature is a single nature.
type Nature struct {
DecreasedStat interface{} `json:"decreased_stat"`
HatesFlavor interface{} `json:"hates_flavor"`
ID int `json:"id"`
IncreasedStat interface{} `json:"increased_stat"`
LikesFlavor interface{} `json:"likes_flavor"`
MoveBattleStylePreferences []struct {
HighHpPreference int `json:"high_hp_preference"`
LowHpPreference int `json:"low_hp_preference"`
MoveBattleStyle struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"move_battle_style"`
} `json:"move_battle_style_preferences"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
PokeathlonStatChanges []struct {
MaxChange int `json:"max_change"`
PokeathlonStat struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokeathlon_stat"`
} `json:"pokeathlon_stat_changes"`
}
// PokeathlonStat is a single Pokeathlon stat.
type PokeathlonStat struct {
AffectingNatures struct {
Decrease []struct {
MaxChange int `json:"max_change"`
Nature struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"nature"`
} `json:"decrease"`
Increase []struct {
MaxChange int `json:"max_change"`
Nature struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"nature"`
} `json:"increase"`
} `json:"affecting_natures"`
ID int `json:"id"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
}
// Pokemon is a single Pokemon.
type Pokemon struct {
Abilities []struct {
Ability struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"ability"`
IsHidden bool `json:"is_hidden"`
Slot int `json:"slot"`
} `json:"abilities"`
BaseExperience int `json:"base_experience"`
Forms []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"forms"`
GameIndices []struct {
GameIndex int `json:"game_index"`
Version struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"version"`
} `json:"game_indices"`
Height int `json:"height"`
HeldItems []interface{} `json:"held_items"`
ID int `json:"id"`
IsDefault bool `json:"is_default"`
LocationAreaEncounters string `json:"location_area_encounters"`
Moves []struct {
Move struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"move"`
VersionGroupDetails []struct {
LevelLearnedAt int `json:"level_learned_at"`
MoveLearnMethod struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"move_learn_method"`
VersionGroup struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"version_group"`
} `json:"version_group_details"`
} `json:"moves"`
Name string `json:"name"`
Order int `json:"order"`
Species struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"species"`
Sprites struct {
BackDefault string `json:"back_default"`
BackFemale interface{} `json:"back_female"`
BackShiny string `json:"back_shiny"`
BackShinyFemale interface{} `json:"back_shiny_female"`
FrontDefault string `json:"front_default"`
FrontFemale interface{} `json:"front_female"`
FrontShiny string `json:"front_shiny"`
FrontShinyFemale interface{} `json:"front_shiny_female"`
} `json:"sprites"`
Stats []struct {
BaseStat int `json:"base_stat"`
Effort int `json:"effort"`
Stat struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"stat"`
} `json:"stats"`
Types []struct {
Slot int `json:"slot"`
Type struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"type"`
} `json:"types"`
Weight int `json:"weight"`
}
// PokemonColor is a single Pokemon color.
type PokemonColor struct {
ID int `json:"id"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
PokemonSpecies []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon_species"`
}
// PokemonForm is a single Pokemon form.
type PokemonForm struct {
FormName string `json:"form_name"`
FormNames []interface{} `json:"form_names"`
FormOrder int `json:"form_order"`
ID int `json:"id"`
IsBattleOnly bool `json:"is_battle_only"`
IsDefault bool `json:"is_default"`
IsMega bool `json:"is_mega"`
Name string `json:"name"`
Names []interface{} `json:"names"`
Order int `json:"order"`
Pokemon struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon"`
Sprites struct {
BackDefault string `json:"back_default"`
BackShiny string `json:"back_shiny"`
FrontDefault string `json:"front_default"`
FrontShiny string `json:"front_shiny"`
} `json:"sprites"`
VersionGroup struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"version_group"`
}
// PokemonHabitat is a single Pokemon habitat.
type PokemonHabitat struct {
ID int `json:"id"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
PokemonSpecies []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon_species"`
}
// PokemonShape is a single Pokemon shape.
type PokemonShape struct {
AwesomeNames []struct {
AwesomeName string `json:"awesome_name"`
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
} `json:"awesome_names"`
ID int `json:"id"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
PokemonSpecies []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon_species"`
}
// PokemonSpecies is a single Pokemon species.
type PokemonSpecies struct {
BaseHappiness int `json:"base_happiness"`
CaptureRate int `json:"capture_rate"`
Color struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"color"`
EggGroups []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"egg_groups"`
EvolutionChain struct {
URL string `json:"url"`
} `json:"evolution_chain"`
EvolvesFromSpecies interface{} `json:"evolves_from_species"`
FlavorTextEntries []struct {
FlavorText string `json:"flavor_text"`
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Version struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"version"`
} `json:"flavor_text_entries"`
FormDescriptions []interface{} `json:"form_descriptions"`
FormsSwitchable bool `json:"forms_switchable"`
GenderRate int `json:"gender_rate"`
Genera []struct {
Genus string `json:"genus"`
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
} `json:"genera"`
Generation struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"generation"`
GrowthRate struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"growth_rate"`
Habitat struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"habitat"`
HasGenderDifferences bool `json:"has_gender_differences"`
HatchCounter int `json:"hatch_counter"`
ID int `json:"id"`
IsBaby bool `json:"is_baby"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
Order int `json:"order"`
PalParkEncounters []struct {
Area struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"area"`
BaseScore int `json:"base_score"`
Rate int `json:"rate"`
} `json:"pal_park_encounters"`
PokedexNumbers []struct {
EntryNumber int `json:"entry_number"`
Pokedex struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokedex"`
} `json:"pokedex_numbers"`
Shape struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"shape"`
Varieties []struct {
IsDefault bool `json:"is_default"`
Pokemon struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon"`
} `json:"varieties"`
}
// Stat is a single stat.
type Stat struct {
AffectingMoves struct {
Decrease []interface{} `json:"decrease"`
Increase []struct {
Change int `json:"change"`
Move struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"move"`
} `json:"increase"`
} `json:"affecting_moves"`
AffectingNatures struct {
Decrease []interface{} `json:"decrease"`
Increase []interface{} `json:"increase"`
} `json:"affecting_natures"`
Characteristics []struct {
URL string `json:"url"`
} `json:"characteristics"`
GameIndex int `json:"game_index"`
ID int `json:"id"`
IsBattleOnly bool `json:"is_battle_only"`
MoveDamageClass interface{} `json:"move_damage_class"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
}
// Type is a single type.
type Type struct {
DamageRelations struct {
DoubleDamageFrom []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"double_damage_from"`
DoubleDamageTo []interface{} `json:"double_damage_to"`
HalfDamageFrom []interface{} `json:"half_damage_from"`
HalfDamageTo []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"half_damage_to"`
NoDamageFrom []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"no_damage_from"`
NoDamageTo []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"no_damage_to"`
} `json:"damage_relations"`
GameIndices []struct {
GameIndex int `json:"game_index"`
Generation struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"generation"`
} `json:"game_indices"`
Generation struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"generation"`
ID int `json:"id"`
MoveDamageClass struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"move_damage_class"`
Moves []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"moves"`
Name string `json:"name"`
Names []struct {
Language struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"language"`
Name string `json:"name"`
} `json:"names"`
Pokemon []struct {
Pokemon struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon"`
Slot int `json:"slot"`
} `json:"pokemon"`
}