Files
nuzlocke-tracker/tools/fetch-pokeapi/models.go

48 lines
1.4 KiB
Go
Raw Normal View History

package main
// Output JSON structs — identical schema to current Python output.
type GameOutput struct {
Name string `json:"name"`
Slug string `json:"slug"`
Generation int `json:"generation"`
Region string `json:"region"`
ReleaseYear int `json:"release_year"`
Color *string `json:"color"`
}
type PokemonOutput struct {
PokeAPIID int `json:"pokeapi_id"`
NationalDex int `json:"national_dex"`
Name string `json:"name"`
Types []string `json:"types"`
SpriteURL string `json:"sprite_url"`
}
type EvolutionOutput struct {
FromPokeAPIID int `json:"from_pokeapi_id"`
ToPokeAPIID int `json:"to_pokeapi_id"`
Trigger string `json:"trigger"`
MinLevel *int `json:"min_level"`
Item *string `json:"item"`
HeldItem *string `json:"held_item"`
Condition *string `json:"condition"`
Region *string `json:"region"`
}
type RouteOutput struct {
Name string `json:"name"`
Order int `json:"order"`
Encounters []EncounterOutput `json:"encounters"`
Children []RouteOutput `json:"children,omitempty"`
}
type EncounterOutput struct {
PokeAPIID int `json:"pokeapi_id"`
PokemonName string `json:"pokemon_name"`
Method string `json:"method"`
EncounterRate int `json:"encounter_rate"`
MinLevel int `json:"min_level"`
MaxLevel int `json:"max_level"`
}