Documentation ¶
Index ¶
- func CommandBMap(locations *LocationArea) error
- func CommandCatch(name string, cache *pokecache.Cache, pokemon *Pokemon, pokemonURl string) error
- func CommandExit() error
- func CommandExplore(areaName string, cache *pokecache.Cache, defaultURL string) error
- func CommandHelp(commands map[string]CliCommand) error
- func CommandInspect(name string, cache *pokecache.Cache, pokemon *Pokemon) error
- func CommandMap(cache *pokecache.Cache, locations *LocationArea, defaultURL string) error
- func CommandPokedex(cache *pokecache.Cache) error
- func RegisterExitCallback(callback func())
- type CliCommand
- type LocationArea
- type LocationPokemonDetails
- type Pokemon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandBMap ¶
func CommandBMap(locations *LocationArea) error
func CommandCatch ¶
func CommandExit ¶
func CommandExit() error
func CommandExplore ¶
func CommandHelp ¶
func CommandHelp(commands map[string]CliCommand) error
func CommandInspect ¶
func CommandMap ¶
func CommandMap(cache *pokecache.Cache, locations *LocationArea, defaultURL string) error
func CommandPokedex ¶
func RegisterExitCallback ¶
func RegisterExitCallback(callback func())
RegisterExitCallback allows the main package to register a callback function for exit.
Types ¶
type CliCommand ¶
type LocationArea ¶
type LocationPokemonDetails ¶
type LocationPokemonDetails struct { PokemonEncounters []struct { Pokemon struct { Name string `json:"name"` URL string `json:"url"` } `json:"pokemon"` VersionDetails []struct { EncounterDetails []struct { Chance int `json:"chance"` ConditionValues []any `json:"condition_values"` MaxLevel int `json:"max_level"` Method struct { Name string `json:"name"` URL string `json:"url"` } `json:"method"` MinLevel int `json:"min_level"` } `json:"encounter_details"` MaxChance int `json:"max_chance"` Version struct { Name string `json:"name"` URL string `json:"url"` } `json:"version"` } `json:"version_details"` } `json:"pokemon_encounters"` }
type 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"` Height int `json:"height"` ID int `json:"id"` Name string `json:"name"` 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"` }
Click to show internal directories.
Click to hide internal directories.