Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiCallSetup ¶
ApiCallSetup Helper function to handle API calls and JSON unmarshalling
Types ¶
type PokemonJSONStruct ¶
type PokemonJSONStruct struct {
Name string `json:"name"`
ID int `json:"id"`
Weight int `json:"weight"`
Height int `json:"height"`
Abilities []struct {
Ability struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"ability"`
Hidden bool `json:"hidden"`
Slot int `json:"slot"`
} `json:"abilities"`
Types []struct {
Slot int `json:"slot"`
Type struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"type"`
} `json:"types"`
Sprites struct {
FrontDefault string `json:"front_default"`
} `json:"sprites"`
Stats []struct {
BaseStat int `json:"base_stat"`
Stat struct {
Name string `json:"name"`
} `json:"stat"`
} `json:"stats"`
}
func PokemonApiCall ¶
type TypesJSONStruct ¶
type TypesJSONStruct struct {
Name string `json:"name"`
ID int `json:"id"`
Moves []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"moves"`
Pokemon []struct {
Pokemon struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"pokemon"`
Slot int `json:"slot"`
} `json:"pokemon"`
DamageRelations struct {
DoubleDamageFrom []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"double_damage_from"`
DoubleDamageTo []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"double_damage_to"`
HalfDamageFrom []struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"half_damage_from"`
HalfDamageTo []struct {
Name string `json:"name"`
URL string `json:"ul"`
} `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"`
}
func TypesApiCall ¶
Click to show internal directories.
Click to hide internal directories.