golem

package module
v0.0.0-...-0649795 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2019 License: MIT Imports: 12 Imported by: 0

README

Golem

Go Report Card GoDoc

Golem is an API wrapper library for the PokeApi V2 API, built in Golang

Notice

This was built on Linux, so knowing my luck, it probably won't behave nicely on Windows.

If you do find an issue with using it on Windows or MacOS please let me know in the issues page.

Using this library

First you'll want to do a go get

go get github.com/flagbrew/golem

Then you'll to import it into your application, once there the syntax is

golem.Get(Object)()

To see a list of available objects, you can find the documentation for the API here

Defaults

The default location for the cached data is $HomeDirectory/.golem/ you are able to change this with the SetCachePath() command

Reporting bugs

I've done my best to test everything, but of course something probably will have slipped by.

If you find any bugs with this library, please report it on the issues page.

When reporting a bug, try to be as descriptive as possible, thank you.

"Golem" is a Pokemon, Pokemon is owned by Gamefreak & Nintendo and licensed by Nintendo All rights for the name and any reference to Pokemon is owned by them.

I obviously don't own the rights to the name or any name in relation to Pokemon, the only thing I own is the time I put into building this API wrapper.

License

MIT License

Copyright (c) 2019 FlagBrew & Allen (FM1337/FMCore)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearCache

func ClearCache()

ClearCache will clear the cache WARNING: Only do this if absolutely necessary, you don't want to clear your cache everytime as it will hurt the pokeapi! Also, I shouldn't need to say this, but DO NOT set your cache folder to anything important and then run this command as it will wipe out anything in that directory, and it will unlikely be recoverable. You have been warned!

func GetCachePath

func GetCachePath() string

GetCachePath returns the cachepath

func SetCachePath

func SetCachePath(path string)

SetCachePath sets the cache path that is used to cache information from the pokeapi.

Types

type Ability

type Ability struct {
	ID                int                   `json:"id" mapstructure:"id"`
	Name              string                `json:"name" mapstructure:"name"`
	IsMainSeries      bool                  `json:"is_main_series" mapstructure:"is_main_series"`
	GetGeneration     func() Generation     `json:"-" mapstructure:"-"`
	Generation        namedAPIResource      `json:"generation" mapstructure:"generation"`
	Names             []name                `json:"names" mapstructure:"names"`
	EffectEntries     []verboseEffect       `json:"effect_entries" mapstructure:"effect_entries"`
	EffectChanges     []abilityEffectChange `json:"effect_changes" mapstructure:"effect_changes"`
	FlavorTextEntries []abilityFlavorText   `json:"flavor_text_entries" mapstructure:"flavor_text_entries"`
	Pokemon           []abilityPokemon      `json:"pokemon" mapstructure:"pokemon"`
}

Ability ... Abilities provide passive effects for Pokémon in battle or in the overworld. Pokémon have multiple possible abilities but can have only one ability at a time. Check out Bulbapedia for greater detail. The MoveTarget schema can be found at https://pokeapi.co/docs/v2.html/#abilities

func GetAbility

func GetAbility(query string) Ability

GetAbility returns a Ability object Acceptable search queries: ID, String

type Berry

type Berry struct {
	ID                 int                  `json:"id" mapstructure:"id"`
	Name               string               `json:"name" mapstructure:"name"`
	GrowthTime         int                  `json:"growth_time" mapstructure:"growth_time"`
	MaxHarvest         int                  `json:"max_harvest" mapstructure:"max_harvest"`
	NaturalGiftPower   int                  `json:"natural_gift_power" mapstructure:"natural_gift_power"`
	Size               int                  `json:"size" mapstructure:"size"`
	Smoothness         int                  `json:"smoothness" mapstructure:"smoothness"`
	SoilDryness        int                  `json:"soil_dryness" mapstructure:"soil_dryness"`
	Firmness           namedAPIResource     `json:"firmness" mapstructure:"firmness"`
	GetFirmness        func() BerryFirmness `json:"-" mapstructure:"-"`
	Flavors            []berryFlavor        `json:"flavors" mapstructure:"flavors"`
	GetItem            func() Item          `json:"-" mapstructure:"-"`
	GetNaturalGiftType func() Type          `json:"-" mapstructure:"-"`
	Item               namedAPIResource     `json:"item" mapstructure:"item"`
	NaturalGiftType    namedAPIResource     `json:"natural_gift_type" mapstructure:"natural_gift_type"`
}

Berry ... Berries are small fruits that can provide HP and status condition restoration, stat enhancement, and even damage negation when eaten by Pokémon. Check out Bulbapedia for greater detail. The berry schema is found at https://pokeapi.co/docs/v2.html/#berries

func GetBerry

func GetBerry(query string) Berry

GetBerry returns a Berry object Acceptable search queries: ID, Name

type BerryFirmness

type BerryFirmness struct {
	ID         int                `json:"id" mapstructure:"id"`
	Name       string             `json:"name" mapstructure:"name"`
	Berries    []namedAPIResource `json:"berries" mapstructure:"berries"`
	GetBerries []func() Berry     `json:"-" mapstructure:"-"`
	Names      []name             `json:"names" mapstructure:"names"`
}

BerryFirmness ... Berries can be soft or hard. Check out Bulbapedia for greater detail. The BerryFirmness schema is found at https://pokeapi.co/docs/v2.html/#berry-firmnesses

func GetBerryFirmness

func GetBerryFirmness(query string) BerryFirmness

GetBerryFirmness returns a BerryFirmness object Acceptable search queries: ID, Name

type BerryFlavor

type BerryFlavor struct {
	ID             int                `json:"id" mapstructure:"id"`
	Name           string             `json:"name" mapstructure:"name"`
	Berries        []flavorBerry      `json:"berries" mapstructure:"berries"`
	ContestType    namedAPIResource   `json:"contest_type" mapstructure:"contest_type"`
	GetContestType func() ContestType `json:"-" mapstructure:"-"`
	Names          []name             `json:"names" mapstructure:"names"`
}

BerryFlavor ... Flavors determine whether a Pokémon will benefit or suffer from eating a berry based on their nature. Check out Bulbapedia for greater detail. The BerryFlavor schema can be found at https://pokeapi.co/docs/v2.html/#berry-flavors

func GetBerryFlavor

func GetBerryFlavor(query string) BerryFlavor

GetBerryFlavor returns a BerryFlavor object Acceptable search queries: ID, Name

type Characteristic

type Characteristic struct {
	ID             int           `json:"id" mapstructure:"id"`
	GeneModulo     int           `json:"gene_modulo" mapstructure:"gene_modulo"`
	PossibleValues []int         `json:"possible_values" mapstructure:"possible_values"`
	Descriptions   []description `json:"descriptions" mapstructure:"descriptions"`
}

Characteristic ... Characteristics indicate which stat contains a Pokémon's highest IV. A Pokémon's Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo). Check out Bulbapedia for greater detail. The Characteristic schema can be found at https://pokeapi.co/docs/v2.html/#characteristics

func GetCharacteristic

func GetCharacteristic(id int) Characteristic

GetCharacteristic returns a Characteristic object Acceptable search queries: ID

type ContestEffect

type ContestEffect struct {
	ID                int          `json:"id" mapstructure:"id"`
	Appeal            int          `json:"appeal" mapstructure:"appeal"`
	Jam               int          `json:"jam" mapstructure:"jam"`
	EffectEntries     []effect     `json:"effect_entries" mapstructure:"effect_entries"`
	FlavorTextEntries []flavorText `json:"flavor_text_entries" mapstructure:"flavor_text_entries"`
}

ContestEffect ... Contest effects refer to the effects of moves when used in contests. The ContestEffect schema can be found at https://pokeapi.co/docs/v2.html/#contest-effects

func GetContestEffect

func GetContestEffect(id int) ContestEffect

GetContestEffect returns a ContestEffect object Acceptable search queries: ID

type ContestType

type ContestType struct {
	ID             int                `json:"id" mapstructure:"id"`
	Name           string             `json:"name" mapstructure:"name"`
	GetBerryFlavor func() BerryFlavor `json:"-" mapstructure:"-"`
	BerryFlavor    namedAPIResource   `json:"berry_flavor" mapstructure:"berry_flavor"`
	Names          []contestName      `json:"names" mapstructure:"names"`
}

ContestType ... Contest types are categories judges used to weigh a Pokémon's condition in Pokémon contests. Check out Bulbapedia for greater detail. The ContestType schema can be found at https://pokeapi.co/docs/v2.html/#contest-types

func GetContestType

func GetContestType(query string) ContestType

GetContestType returns a ContestType object Acceptable search queries: ID, Name

type EggGroup

type EggGroup struct {
	ID                int                     `json:"id" mapstructure:"id"`
	Name              string                  `json:"name" mapstructure:"name"`
	Names             []name                  `json:"names" mapstructure:"names"`
	GetPokemonSpecies []func() PokemonSpecies `json:"-" mapstructure:"-"`
	PokemonSpecies    []namedAPIResource      `json:"pokemon_species" mapstructure:"pokemon_species"`
}

EggGroup ... Egg Groups are categories which determine which Pokémon are able to interbreed. Pokémon may belong to either one or two Egg Groups. Check out Bulbapedia for greater detail. The EggGroup schema can be found at https://pokeapi.co/docs/v2.html/#egg-groups

func GetEggGroup

func GetEggGroup(query string) EggGroup

GetEggGroup returns a EggGroup object Acceptable search queries: ID, String

type EncounterCondition

type EncounterCondition struct {
	ID        int                              `json:"id" mapstructure:"id"`
	Name      string                           `json:"name" mapstructure:"name"`
	GetValues []func() EncounterConditionValue `json:"-" mapstructure:"-"`
	Values    []namedAPIResource               `json:"values" mapstructure:"values"`
	Names     []name                           `json:"names" mapstructure:"names"`
}

EncounterCondition ... Conditions which affect what pokemon might appear in the wild, e.g., day or night. The EncounterCondition schema can be found at https://pokeapi.co/docs/v2.html/#encounter-conditions

func GetEncounterCondition

func GetEncounterCondition(query string) EncounterCondition

GetEncounterCondition returns a EncounterCondition object Acceptable search queries: ID, String

type EncounterConditionValue

type EncounterConditionValue struct {
	ID           int                       `json:"id" mapstructure:"id"`
	Name         string                    `json:"name" mapstructure:"name"`
	GetCondition func() EncounterCondition `json:"-" mapstructure:"-"`
	Condition    namedAPIResource          `json:"condition" mapstructure:"condition"`
	Names        []name                    `json:"names" mapstructure:"names"`
}

EncounterConditionValue ... Encounter condition values are the various states that an encounter condition can have, i.e., time of day can be either day or night. The EncounterConditionValue schema can be found at https://pokeapi.co/docs/v2.html/#encounter-condition-values

func GetEncounterConditionValue

func GetEncounterConditionValue(query string) EncounterConditionValue

GetEncounterConditionValue returns a EncounterConditionValue object Acceptable search queries: ID, String

type EncounterMethod

type EncounterMethod struct {
	ID    int    `json:"id" mapstructure:"id"`
	Name  string `json:"name" mapstructure:"name"`
	Order int    `json:"order" mapstructure:"order"`
	Names []name `json:"names" mapstructure:"names"`
}

EncounterMethod ... Methods by which the player might can encounter Pokémon in the wild, e.g., walking in tall grass. Check out Bulbapedia for greater detail. The EncounterMethod schema can be found at https://pokeapi.co/docs/v2.html/#encounter-methods

func GetEncounterMethod

func GetEncounterMethod(query string) EncounterMethod

GetEncounterMethod returns a EncounterMethod object Acceptable search queries: ID, String

type EvolutionChain

type EvolutionChain struct {
	ID                 int              `json:"id" mapstructure:"id"`
	GetBabyTriggerItem func() Item      `json:"-" mapstructure:"-"`
	BabyTriggerItem    namedAPIResource `json:"baby_trigger_item" mapstructure:"baby_trigger_item"`
	Chain              chainLink        `json:"chain" mapstructure:"chain"`
}

EvolutionChain ... Evolution chains are essentially family trees. They start with the lowest stage within a family and detail evolution conditions for each as well as Pokémon they can evolve into up through the hierarchy. The EvolutionChain schema can be found at https://pokeapi.co/docs/v2.html/#evolution-chains

func GetEvolutionChain

func GetEvolutionChain(id int) EvolutionChain

GetEvolutionChain returns a EvolutionChain object Acceptable search queries: ID

type EvolutionTrigger

type EvolutionTrigger struct {
	ID                int                     `json:"id" mapstructure:"id"`
	Name              string                  `json:"name" mapstructure:"name"`
	Names             []name                  `json:"names" mapstructure:"names"`
	GetPokemonSpecies []func() PokemonSpecies `json:"-" mapstructure:"-"`
	PokemonSpecies    []namedAPIResource      `json:"pokemon_species" mapstructure:"pokemon_species"`
}

EvolutionTrigger ... Evolution triggers are the events and conditions that cause a Pokémon to evolve. Check out Bulbapedia for greater detail. The EvolutionTrigger schema can be found at https://pokeapi.co/docs/v2.html/#evolution-triggers

func GetEvolutionTrigger

func GetEvolutionTrigger(query string) EvolutionTrigger

GetEvolutionTrigger returns a EvolutionTrigger object Acceptable search queries: ID, String

type Gender

type Gender struct {
	ID                      int                     `json:"id" mapstructure:"id"`
	Name                    string                  `json:"name" mapstructure:"name"`
	PokemonSpeciesDetails   []pokemonSpeciesGender  `json:"pokemon_species_details" mapstructure:"pokemon_species_details"`
	GetRequiredForEvolution []func() PokemonSpecies `json:"-" mapstructure:"-"`
	RequiredForEvolution    []namedAPIResource      `json:"required_for_evolution" mapstructure:"required_for_evolution"`
}

Gender ... Genders were introduced in Generation II for the purposes of breeding Pokémon but can also result in visual differences or even different evolutionary lines. Check out Bulbapedia for greater detail. The Gender schema can be found at https://pokeapi.co/docs/v2.html/#genders

func GetGender

func GetGender(query string) Gender

GetGender returns a Gender object Acceptable search queries: ID, String

type Generation

type Generation struct {
	ID                int                     `json:"id" mapstructure:"id"`
	Name              string                  `json:"name" mapstructure:"name"`
	GetAbilities      []func() Ability        `json:"-" mapstructure:"-"`
	Abilities         []namedAPIResource      `json:"abilities" mapstructure:"abilities"`
	Names             []name                  `json:"names" mapstructure:"names"`
	GetMainRegion     func() Region           `json:"-" mapstructure:"-"`
	MainRegion        namedAPIResource        `json:"main_region" mapstructure:"main_region"`
	GetMoves          []func() Move           `json:"-" mapstructure:"-"`
	Moves             []namedAPIResource      `json:"moves" mapstructure:"moves"`
	GetPokemonSpecies []func() PokemonSpecies `json:"-" mapstructure:"-"`
	PokemonSpecies    []namedAPIResource      `json:"pokemon_species" mapstructure:"pokemon_species"`
	GetTypes          []func() Type           `json:"-" mapstructure:"-"`
	Types             []namedAPIResource      `json:"types" mapstructure:"types"`
	GetVersionGroups  []func() VersionGroup   `json:"-" mapstructure:"-"`
	VersionGroups     []namedAPIResource      `json:"version_groups" mapstructure:"version_groups"`
}

Generation ... A generation is a grouping of the Pokémon games that separates them based on the Pokémon they include. In each generation, a new set of Pokémon, Moves, Abilities and Types that did not exist in the previous generation are released. The Generation schema can be found at https://pokeapi.co/docs/v2.html/#generations

func GetGeneration

func GetGeneration(query string) Generation

GetGeneration returns a Generation object Acceptable search queries: ID, String

type GrowthRate

type GrowthRate struct {
	ID                int                         `json:"id" mapstructure:"id"`
	Name              string                      `json:"name" mapstructure:"name"`
	Formula           string                      `json:"formula" mapstructure:"formula"`
	Descriptions      []description               `json:"descriptions" mapstructure:"descriptions"`
	Levels            []growthRateExperienceLevel `json:"levels" mapstructure:"levels"`
	GetPokemonSpecies []func() PokemonSpecies     `json:"-" mapstructure:"-"`
	PokemonSpecies    []namedAPIResource          `json:"pokemon_species" mapstructure:"pokemon_species"`
}

GrowthRate ... Growth rates are the speed with which Pokémon gain levels through experience. Check out Bulbapedia for greater detail. The GrowthRate schema can be found at https://pokeapi.co/docs/v2.html/#growth-rates

func GetGrowthRate

func GetGrowthRate(query string) GrowthRate

GetGrowthRate returns a GrowthRate object Acceptable search queries: ID, String

type Item

type Item struct {
	ID                int                      `json:"id" mapstructure:"id"`
	Name              string                   `json:"name" mapstructure:"name"`
	Cost              int                      `json:"cost" mapstructure:"cost"`
	FlingPower        int                      `json:"fling_power" mapstructure:"fling_power"`
	GetFlingEffect    func() ItemFlingEffect   `json:"-" mapstructure:"-"`
	FlingEffect       namedAPIResource         `json:"fling_effect" mapstructure:"fling_effect"`
	GetAttributes     []func() ItemAttribute   `json:"-" mapstructure:"-"`
	Attributes        []namedAPIResource       `json:"attributes" mapstructure:"attributes"`
	GetCategory       func() ItemCategory      `json:"-" mapstructure:"-"`
	Category          namedAPIResource         `json:"category" mapstructure:"category"`
	EffectEntries     []verboseEffect          `json:"effect_entries" mapstructure:"effect_entries"`
	FlavorTextEntries []versionGroupFlavorText `json:"flavor_text_entries" mapstructure:"flavor_text_entries"`
	GameIndices       []generationGameIndex    `json:"game_indices" mapstructure:"game_indices"`
	Sprites           itemSprite               `json:"sprites" mapstructure:"sprites"`
	HeldByPokemon     []itemHolderPokemon      `json:"held_by_pokemon" mapstructure:"held_by_pokemon"`
	GetBabyTriggerFor func() EvolutionChain    `json:"-" mapstructure:"-"`
	BabyTriggerFor    apiResource              `json:"baby_trigger_for" mapstructure:"baby_trigger_for"`
	Machines          []machineVersionDetail   `json:"machines" mapstructure:"machines"`
}

Item ... An item is an object in the games which the player can pick up, keep in their bag, and use in some manner. They have various uses, including healing, powering up, helping catch Pokémon, or to access a new area. The Item schema can be found at https://pokeapi.co/docs/v2.html/#item

func GetItem

func GetItem(query string) Item

GetItem returns a Item object Acceptable search queries: ID, String

type ItemAttribute

type ItemAttribute struct {
	ID           int                `json:"id" mapstructure:"id"`
	Name         string             `json:"name" mapstructure:"name"`
	GetItems     []func() Item      `json:"-" mapstructure:"-"`
	Items        []namedAPIResource `json:"items" mapstructure:"items"`
	Names        []name             `json:"names" mapstructure:"names"`
	Descriptions []description      `json:"descriptions" mapstructure:"descriptions"`
}

ItemAttribute ... Item attributes define particular aspects of items, e.g. "usable in battle" or "consumable". The ItemAttribute schema can be found at https://pokeapi.co/docs/v2.html/#item-attributes

func GetItemAttribute

func GetItemAttribute(query string) ItemAttribute

GetItemAttribute returns a ItemAttribute object Acceptable search queries: ID, String

type ItemCategory

type ItemCategory struct {
	ID        int                `json:"id" mapstructure:"id"`
	Name      string             `json:"name" mapstructure:"name"`
	GetItems  []func() Item      `json:"-" mapstructure:"-"`
	Items     []namedAPIResource `json:"items" mapstructure:"items"`
	Names     []name             `json:"names" mapstructure:"names"`
	GetPocket func() ItemPocket  `json:"-" mapstructure:"-"`
	Pocket    namedAPIResource   `json:"pocket" mapstructure:"pocket"`
}

ItemCategory ... Item categories determine where items will be placed in the players bag. The ItemCategory schema can be found at https://pokeapi.co/docs/v2.html/#item-categories

func GetItemCategory

func GetItemCategory(query string) ItemCategory

GetItemCategory returns a ItemCategory object Acceptable search queries: ID, String

type ItemFlingEffect

type ItemFlingEffect struct {
	ID            int                `json:"id" mapstructure:"id"`
	Name          string             `json:"name" mapstructure:"name"`
	EffectEntries []effect           `json:"effect_entries" mapstructure:"effect_entries"`
	GetItems      []func() Item      `json:"-" mapstructure:"-"`
	Items         []namedAPIResource `json:"items" mapstructure:"items"`
}

ItemFlingEffect ... The various effects of the move "Fling" when used with different items. The ItemFlingEffect schema can be found at https://pokeapi.co/docs/v2.html/#item-fling-effects

func GetItemFlingEffect

func GetItemFlingEffect(query string) ItemFlingEffect

GetItemFlingEffect returns a ItemFlingEffect object Acceptable search queries: ID, String

type ItemPocket

type ItemPocket struct {
	ID            int                   `json:"id" mapstructure:"id"`
	Name          string                `json:"name" mapstructure:"name"`
	GetCategories []func() ItemCategory `json:"-" mapstructure:"-"`
	Categories    []namedAPIResource    `json:"categories" mapstructure:"categories"`
	Names         []name                `json:"names" mapstructure:"names"`
}

ItemPocket ... Pockets within the players bag used for storing items by category. The ItemPocket schema can be found at https://pokeapi.co/docs/v2.html/#item-pockets

func GetItemPocket

func GetItemPocket(query string) ItemPocket

GetItemPocket returns a ItemPocket object Acceptable search queries: ID, String

type Language

type Language struct {
	ID       int    `json:"id" mapstructure:"id"`
	Name     string `json:"name" mapstructure:"name"`
	Official bool   `json:"official" mapstructure:"official"`
	Iso639   string `json:"iso639" mapstructure:"iso639"`
	Iso3166  string `json:"iso3166" mapstructure:"iso3166"`
	Names    []name `json:"names" mapstructure:"names"`
}

Language ... Languages for translations of API resource information. The Language schema can be found at https://pokeapi.co/docs/v2.html/#language

func GetLanguage

func GetLanguage(query string) Language

GetLanguage returns a Language object Acceptable search queries: ID, String

type Location

type Location struct {
	ID          int                   `json:"id" mapstructure:"id"`
	Name        string                `json:"name" mapstructure:"name"`
	GetRegion   func() Region         `json:"-" mapstructure:"-"`
	Region      namedAPIResource      `json:"region" mapstructure:"region"`
	Names       []name                `json:"names" mapstructure:"names"`
	GameIndices []generationGameIndex `json:"game_indices" mapstructure:"game_indices"`
	GetAreas    []func() LocationArea `json:"-" mapstructure:"-"`
	Areas       []namedAPIResource    `json:"areas" mapstructure:"areas"`
}

Location ... Locations that can be visited within the games. Locations make up sizable portions of regions, like cities or routes. The Location schema can be found at https://pokeapi.co/docs/v2.html/#locations

func GetLocation

func GetLocation(query string) Location

GetLocation returns a Location object Acceptable search queries: ID, String

type LocationArea

type LocationArea struct {
	ID                   int                   `json:"id" mapstructure:"id"`
	Name                 string                `json:"name" mapstructure:"name"`
	GameIndex            int                   `json:"game_index" mapstructure:"game_index"`
	EncounterMethodRates []encounterMethodRate `json:"encounter_method_rates" mapstructure:"encounter_method_rates"`
	GetLocation          func() Location       `json:"-" mapstructure:"-"`
	Location             namedAPIResource      `json:"location" mapstructure:"location"`
	Names                []name                `json:"names" mapstructure:"names"`
	PokemonEncounters    []pokemonEncounter    `json:"pokemon_encounters" mapstructure:"pokemon_encounters"`
}

LocationArea ... Location areas are sections of areas, such as floors in a building or cave. Each area has its own set of possible Pokémon encounters. The LocationArea schema can be found at https://pokeapi.co/docs/v2.html/#location-areas

func GetLocationArea

func GetLocationArea(query string) LocationArea

GetLocationArea returns a LocationArea object Acceptable search queries: ID, String

type Machine

type Machine struct {
	ID              int                 `json:"id" mapstructure:"id"`
	GetItem         func() Item         `json:"-" mapstructure:"-"`
	Item            namedAPIResource    `json:"item" mapstructure:"item"`
	GetMove         func() Move         `json:"-" mapstructure:"-"`
	Move            namedAPIResource    `json:"move" mapstructure:"move"`
	GetVersionGroup func() VersionGroup `json:"-" mapstructure:"-"`
	VersionGroup    namedAPIResource    `json:"version_group" mapstructure:"version_group"`
}

Machine ... Machines are the representation of items that teach moves to Pokémon. They vary from version to version, so it is not certain that one specific TM or HM corresponds to a single Machine. The Machine schema can be found at https://pokeapi.co/docs/v2.html/#machines

func GetMachine

func GetMachine(id int) Machine

GetMachine returns a Machine object Acceptable search queries: ID

type Move

type Move struct {
	ID                    int                       `json:"id" mapstructure:"id"`
	Name                  string                    `json:"name" mapstructure:"name"`
	Accuracy              int                       `json:"accuracy" mapstructure:"accuracy"`
	EffectChance          int                       `json:"effect_chance" mapstructure:"effect_chance"`
	PP                    int                       `json:"pp" mapstructure:"pp"`
	Priorty               int                       `json:"priorty" mapstructure:"priorty"`
	Power                 int                       `json:"power" mapstructure:"power"`
	ContestCombos         contestComboSet           `json:"contest_combos" mapstructure:"contest_combos"`
	GetContestType        func() ContestType        `json:"-" mapstructure:"-"`
	ContestType           namedAPIResource          `json:"contest_type" mapstructure:"contest_type"`
	GetContestEffect      func() ContestEffect      `json:"-" mapstructure:"-"`
	ContestEffect         apiResource               `json:"contest_effect" mapstructure:"contest_effect"`
	GetDamageClass        func() MoveDamageClass    `json:"-" mapstructure:"-"`
	DamageClass           namedAPIResource          `json:"damage_class" mapstructure:"damage_class"`
	EffectEntries         []verboseEffect           `json:"effect_entries" mapstructure:"effect_entries"`
	EffectChanges         []abilityEffectChange     `json:"effect_changes" mapstructure:"effect_changes"`
	FlavorTextEntries     []moveFlavorText          `json:"flavor_text_entries" mapstructure:"flavor_text_entries"`
	GetGeneration         func() Generation         `json:"-" mapstructure:"-"`
	Generation            namedAPIResource          `json:"generation" mapstructure:"generation"`
	Machines              []machineVersionDetail    `json:"machines" mapstructure:"machines"`
	Meta                  moveMetaData              `json:"meta" mapstructure:"meta"`
	Names                 []name                    `json:"names" mapstructure:"names"`
	PastValues            []pastMoveStatValue       `json:"past_values" mapstructure:"past_values"`
	StatChanges           []moveStatChange          `json:"stat_changes" mapstructure:"stat_changes"`
	GetSuperContestEffect func() SuperContestEffect `json:"-" mapstructure:"-"`
	SuperContestEffect    apiResource               `json:"super_contest_effect" mapstructure:"super_contest_effect"`
	GetTarget             func() MoveTarget         `json:"-" mapstructure:"-"`
	Target                namedAPIResource          `json:"target" mapstructure:"target"`
	GetType               func() Type               `json:"-" mapstructure:"-"`
	Type                  namedAPIResource          `json:"type" mapstructure:"type"`
}

Move ... Moves are the skills of Pokémon in battle. In battle, a Pokémon uses one move each turn. Some moves (including those learned by Hidden Machine) can be used outside of battle as well, usually for the purpose of removing obstacles or exploring new areas. The Move schema can be found at https://pokeapi.co/docs/v2.html/#moves

func GetMove

func GetMove(query string) Move

GetMove returns a Move object Acceptable search queries: ID, String

type MoveAilment

type MoveAilment struct {
	ID       int                `json:"id" mapstructure:"id"`
	Name     string             `json:"name" mapstructure:"name"`
	GetMoves []func() Move      `json:"-" mapstructure:"-"`
	Moves    []namedAPIResource `json:"moves" mapstructure:"moves"`
	Names    []name             `json:"names" mapstructure:"names"`
}

MoveAilment ... Move Ailments are status conditions caused by moves used during battle. See Bulbapedia for greater detail. The MoveAilment schema can be found at https://pokeapi.co/docs/v2.html/#move-ailments

func GetMoveAilment

func GetMoveAilment(query string) MoveAilment

GetMoveAilment returns a MoveAilment object Acceptable search queries: ID, String

type MoveBattleStyle

type MoveBattleStyle struct {
	ID    int    `json:"id" mapstructure:"id"`
	Name  string `json:"name" mapstructure:"name"`
	Names []name `json:"names" mapstructure:"names"`
}

MoveBattleStyle ... Styles of moves when used in the Battle Palace. See Bulbapedia for greater detail. The MoveBattleStyle schema can be found at https://pokeapi.co/docs/v2.html/#move-battle-styles

func GetMoveBattleStyle

func GetMoveBattleStyle(query string) MoveBattleStyle

GetMoveBattleStyle returns a MoveBattleStyle object Acceptable search queries: ID, String

type MoveCategory

type MoveCategory struct {
	ID           int                `json:"id" mapstructure:"id"`
	Name         string             `json:"name" mapstructure:"name"`
	GetMoves     []func() Move      `json:"-" mapstructure:"-"`
	Moves        []namedAPIResource `json:"moves" mapstructure:"moves"`
	Descriptions []description      `json:"descriptions" mapstructure:"descriptions"`
}

MoveCategory ... Very general categories that loosely group move effects. The MoveCategory schema can be found at https://pokeapi.co/docs/v2.html/#move-categories

func GetMoveCategory

func GetMoveCategory(query string) MoveCategory

GetMoveCategory returns a MoveCategory object Acceptable search queries: ID, String

type MoveDamageClass

type MoveDamageClass struct {
	ID           int                `json:"id" mapstructure:"id"`
	Name         string             `json:"name" mapstructure:"name"`
	Descriptions []description      `json:"descriptions" mapstructure:"descriptions"`
	GetMoves     []func() Move      `json:"-" mapstructure:"-"`
	Moves        []namedAPIResource `json:"moves" mapstructure:"moves"`
	Names        []name             `json:"names" mapstructure:"names"`
}

MoveDamageClass ... The MoveDamageClass schema can be found at https://pokeapi.co/docs/v2.html/#move-damage-classes

func GetMoveDamageClass

func GetMoveDamageClass(query string) MoveDamageClass

GetMoveDamageClass returns a MoveDamageClass object Acceptable search queries: ID, String

type MoveLearnMethod

type MoveLearnMethod struct {
	ID               int                   `json:"id" mapstructure:"id"`
	Name             string                `json:"name" mapstructure:"name"`
	Descriptions     []description         `json:"descriptions" mapstructure:"descriptions"`
	Names            []name                `json:"names" mapstructure:"names"`
	GetVersionGroups []func() VersionGroup `json:"-" mapstructure:"-"`
	VersionGroups    []namedAPIResource    `json:"version_groups" mapstructure:"version_groups"`
}

MoveLearnMethod ... Methods by which Pokémon can learn moves. The MoveLearnMethod schema can be found at https://pokeapi.co/docs/v2.html/#move-learn-methods

func GetMoveLearnMethod

func GetMoveLearnMethod(query string) MoveLearnMethod

GetMoveLearnMethod returns a MoveLearnMethod object Acceptable search queries: ID, String

type MoveTarget

type MoveTarget struct {
	ID           int                `json:"id" mapstructure:"id"`
	Name         string             `json:"name" mapstructure:"name"`
	Descriptions []description      `json:"descriptions" mapstructure:"descriptions"`
	GetMoves     []func() Move      `json:"-" mapstructure:"-"`
	Moves        []namedAPIResource `json:"moves" mapstructure:"moves"`
	Names        []name             `json:"names" mapstructure:"names"`
}

MoveTarget ... Targets moves can be directed at during battle. Targets can be Pokémon, environments or even other moves. The MoveTarget schema can be found at https://pokeapi.co/docs/v2.html/#move-targets

func GetMoveTarget

func GetMoveTarget(query string) MoveTarget

GetMoveTarget returns a MoveTarget object Acceptable search queries: ID, String

type Nature

type Nature struct {
	ID                         int                         `json:"id" mapstructure:"id"`
	Name                       string                      `json:"name" mapstructure:"name"`
	GetDecreasedStat           func() Stat                 `json:"-" mapstructure:"-"`
	DecreasedStat              namedAPIResource            `json:"decreased_stat" mapstructure:"decreased_stat"`
	GetIncreasedStat           func() Stat                 `json:"-" mapstructure:"-"`
	IncreasedStat              namedAPIResource            `json:"increased_stat" mapstructure:"increased_stat"`
	GetHatesFlavor             func() BerryFlavor          `json:"-" mapstructure:"-"`
	HatesFlavor                namedAPIResource            `json:"hates_flavor" mapstructure:"hates_flavor"`
	GetLikesFlavor             func() BerryFlavor          `json:"-" mapstructure:"-"`
	LikesFlavor                namedAPIResource            `json:"likes_flavor" mapstructure:"likes_flavor"`
	PokeathlonStatChanges      []natureStatChange          `json:"pokeathlon_stat_changes" mapstructure:"pokeathlon_stat_changes"`
	MoveBattleStylePreferences []moveBattleStylePreference `json:"move_battle_style_preferences" mapstructure:"move_battle_style_preferences"`
	Names                      []name                      `json:"names" mapstructure:"names"`
}

Nature ... Natures influence how a Pokémon's stats grow. See Bulbapedia for greater detail. The Nature schema can be found at https://pokeapi.co/docs/v2.html/#natures

func GetNature

func GetNature(query string) Nature

GetNature returns a Nature object Acceptable search queries: ID, String

type PalParkArea

type PalParkArea struct {
	ID                int                       `json:"id" mapstructure:"id"`
	Name              string                    `json:"name" mapstructure:"name"`
	Names             []name                    `json:"names" mapstructure:"names"`
	PokemonEncounters []palParkEncounterSpecies `json:"pokemon_encounters" mapstructure:"pokemon_encounters"`
}

PalParkArea ... Areas used for grouping Pokémon encounters in Pal Park. They're like habitats that are specific to Pal Park. The PalParkArea schema can be found at https://pokeapi.co/docs/v2.html/#pal-park-areas

func GetPalParkArea

func GetPalParkArea(query string) PalParkArea

GetPalParkArea returns a PalParkArea object Acceptable search queries: ID, String

type PokeathlonStat

type PokeathlonStat struct {
	ID               int                              `json:"id" mapstructure:"id"`
	Name             string                           `json:"name" mapstructure:"name"`
	Names            []name                           `json:"names" mapstructure:"names"`
	AffectingNatures []naturePokeathlonStatAffectSets `json:"affecting_natures" mapstructure:"affecting_natures"`
}

PokeathlonStat ... Pokeathlon Stats are different attributes of a Pokémon's performance in Pokéathlons. In Pokéathlons, competitions happen on different courses; one for each of the different Pokéathlon stats. See Bulbapedia for greater detail. The PokeathlonStat schema can be found at https://pokeapi.co/docs/v2.html/#pokeathlon-stats

func GetPokeathlonStat

func GetPokeathlonStat(query string) PokeathlonStat

GetPokeathlonStat returns a PokeathlonStat object Acceptable search queries: ID, String

type Pokedex

type Pokedex struct {
	ID               int                   `json:"id" mapstructure:"id"`
	Name             string                `json:"name" mapstructure:"name"`
	IsMainSeries     bool                  `json:"is_main_series" mapstructure:"is_main_series"`
	Descriptions     []description         `json:"descriptions" mapstructure:"descriptions"`
	Names            []name                `json:"names" mapstructure:"names"`
	PokemonEntries   []pokemonEntry        `json:"pokemon_entries" mapstructure:"pokemon_entries"`
	GetRegion        func() Region         `json:"-" mapstructure:"-"`
	Region           namedAPIResource      `json:"region" mapstructure:"region"`
	GetVersionGroups []func() VersionGroup `json:"-" mapstructure:"-"`
	VersionGroups    []namedAPIResource    `json:"version_groups" mapstructure:"version_groups"`
}

Pokedex ... A Pokédex is a handheld electronic encyclopedia device; one which is capable of recording and retaining information of the various Pokémon in a given region with the exception of the national dex and some smaller dexes related to portions of a region. See Bulbapedia for greater detail. The Pokedex schema can be found at https://pokeapi.co/docs/v2.html/#pokedexes

func GetPokedex

func GetPokedex(query string) Pokedex

GetPokedex returns a Pokedex object Acceptable search queries: ID, String

type Pokemon

type Pokemon struct {
	ID                        int                   `json:"id" mapstructure:"id"`
	Name                      string                `json:"name" mapstructure:"name"`
	BaseExperience            int                   `json:"base_experience" mapstructure:"base_experience"`
	Height                    int                   `json:"height" mapstructure:"height"`
	IsDefault                 bool                  `json:"is_default" mapstructure:"is_default"`
	Order                     int                   `json:"order" mapstructure:"order"`
	Weight                    int                   `json:"weight" mapstructure:"weight"`
	Abilities                 []pokemonAbility      `json:"abilities" mapstructure:"abilities"`
	GetForms                  []func() PokemonForm  `json:"-" mapstructure:"-"`
	Forms                     []namedAPIResource    `json:"forms" mapstructure:"forms"`
	GameIndices               []versionGameIndex    `json:"game_indices" mapstructure:"game_indices"`
	HeldItems                 []pokemonHeldItem     `json:"held_items" mapstructure:"held_items"`
	GetLocationAreaEncounters func() LocationArea   `json:"-" mapstructure:"-"`
	LocationAreaEncounters    string                `json:"location_area_encounters" mapstructure:"location_area_encounters"`
	Moves                     []pokemonMove         `json:"moves" mapstructure:"moves"`
	Sprites                   pokemonSprites        `json:"sprites" mapstructure:"sprites"`
	GetSpecies                func() PokemonSpecies `json:"-" mapstructure:"-"`
	Species                   namedAPIResource      `json:"species" mapstructure:"species"`
	Stats                     []pokemonStat         `json:"stats" mapstructure:"stats"`
	Types                     []pokemonType         `json:"types" mapstructure:"types"`
}

Pokemon ... Pokémon are the creatures that inhabit the world of the Pokémon games. They can be caught using Pokéballs and trained by battling with other Pokémon. See Bulbapedia for greater detail. The Pokemon schema can be found at https://pokeapi.co/docs/v2.html/#pokemon

func GetPokemon

func GetPokemon(query string) Pokemon

GetPokemon returns a Pokemon object Acceptable search queries: ID, String

type PokemonColor

type PokemonColor struct {
	ID                int                     `json:"id" mapstructure:"id"`
	Name              string                  `json:"name" mapstructure:"name"`
	Names             []name                  `json:"names" mapstructure:"names"`
	GetPokemonSpecies []func() PokemonSpecies `json:"-" mapstructure:"-"`
	PokemonSpecies    []namedAPIResource      `json:"pokemon_species" mapstructure:"pokemon_species"`
}

PokemonColor ... Colors used for sorting Pokémon in a Pokédex. The color listed in the Pokédex is usually the color most apparent or covering each Pokémon's body. No orange category exists; Pokémon that are primarily orange are listed as red or brown. The PokemonColor schema can be found at https://pokeapi.co/docs/v2.html/#pokemon-colors

func GetPokemonColor

func GetPokemonColor(query string) PokemonColor

GetPokemonColor returns a PokemonColor object Acceptable search queries: ID, String

type PokemonForm

type PokemonForm struct {
	ID              int                 `json:"id" mapstructure:"id"`
	Name            string              `json:"name" mapstructure:"name"`
	Order           int                 `json:"order" mapstructure:"order"`
	FormOrder       int                 `json:"form_order" mapstructure:"form_order"`
	IsDefault       bool                `json:"is_default" mapstructure:"is_default"`
	IsBattleOnly    bool                `json:"is_battle_only" mapstructure:"is_battle_only"`
	IsMega          bool                `json:"is_mega" mapstructure:"is_mega"`
	FormName        string              `json:"form_name" mapstructure:"form_name"`
	GetPokemon      func() Pokemon      `json:"-" mapstructure:"-"`
	Pokemon         namedAPIResource    `json:"pokemon" mapstructure:"pokemon"`
	Sprites         pokemonFormSprites  `json:"sprites" mapstructure:"sprites"`
	GetVersionGroup func() VersionGroup `json:"-" mapstructure:"-"`
	VersionGroup    namedAPIResource    `json:"version_group" mapstructure:"version_group"`
	Names           []name              `json:"names" mapstructure:"names"`
	FormNames       []name              `json:"form_names" mapstructure:"form_names"`
}

PokemonForm ... Some Pokémon have the ability to take on different forms. At times, these differences are purely cosmetic and have no bearing on the difference in the Pokémon's stats from another; however, several Pokémon differ in stats (other than HP), type, and Ability depending on their form. The PokemonForm schema can be found at https://pokeapi.co/docs/v2.html/#pokemon-forms

func GetPokemonForm

func GetPokemonForm(query string) PokemonForm

GetPokemonForm returns a PokemonForm object Acceptable search queries: ID, String

type PokemonHabitat

type PokemonHabitat struct {
	ID                int                     `json:"id" mapstructure:"id"`
	Name              string                  `json:"name" mapstructure:"name"`
	Names             []name                  `json:"names" mapstructure:"names"`
	GetPokemonSpecies []func() PokemonSpecies `json:"-" mapstructure:"-"`
	PokemonSpecies    []namedAPIResource      `json:"pokemon_species" mapstructure:"pokemon_species"`
}

PokemonHabitat ... Habitats are generally different terrain Pokémon can be found in but can also be areas designated for rare or legendary Pokémon. The PokemonHabitat schema can be found at https://pokeapi.co/docs/v2.html/#pokemon-habitats

func GetPokemonHabitat

func GetPokemonHabitat(query string) PokemonHabitat

GetPokemonHabitat returns a PokemonHabitat object Acceptable search queries: ID, String

type PokemonShape

type PokemonShape struct {
	ID                int                     `json:"id" mapstructure:"id"`
	Name              string                  `json:"name" mapstructure:"name"`
	AwesomeNames      []awesomeName           `json:"awesome_names" mapstructure:"awesome_names"`
	Names             []name                  `json:"names" mapstructure:"names"`
	GetPokemonSpecies []func() PokemonSpecies `json:"-" mapstructure:"-"`
	PokemonSpecies    []namedAPIResource      `json:"pokemon_species" mapstructure:"pokemon_species"`
}

PokemonShape ... Shapes used for sorting Pokémon in a Pokédex. The PokemonShape schema can be found at https://pokeapi.co/docs/v2.html/#pokemon-shapes

func GetPokemonShape

func GetPokemonShape(query string) PokemonShape

GetPokemonShape returns a PokemonShape object Acceptable search queries: ID, String

type PokemonSpecies

type PokemonSpecies struct {
	ID                    int                      `json:"id" mapstructure:"id"`
	Name                  string                   `json:"name" mapstructure:"name"`
	Order                 int                      `json:"order" mapstructure:"order"`
	GenderRate            int                      `json:"gender_rate" mapstructure:"gender_rate"`
	CaptureRate           int                      `json:"capture_rate" mapstructure:"capture_rate"`
	BaseHappiness         int                      `json:"base_happiness" mapstructure:"base_happiness"`
	IsBaby                bool                     `json:"is_baby" mapstructure:"is_baby"`
	HatchCounter          int                      `json:"hatch_counter" mapstructure:"hatch_counter"`
	HasGenderDifferences  bool                     `json:"has_gender_differences" mapstructure:"has_gender_differences"`
	FormsSwitchable       bool                     `json:"forms_switchable" mapstructure:"forms_switchable"`
	GetGrowthRate         func() GrowthRate        `json:"-" mapstructure:"-"`
	GrowthRate            namedAPIResource         `json:"growth_rate" mapstructure:"growth_rate"`
	PokedexNumbers        []pokemonSpeciesDexEntry `json:"pokedex_numbers" mapstructure:"pokedex_numbers"`
	GetEggGroups          []func() EggGroup        `json:"-" mapstructure:"-"`
	EggGroups             []namedAPIResource       `json:"egg_groups" mapstructure:"egg_groups"`
	GetColor              func() PokemonColor      `json:"-" mapstructure:"-"`
	Color                 namedAPIResource         `json:"color" mapstructure:"color"`
	GetShape              func() PokemonShape      `json:"-" mapstructure:"-"`
	Shape                 namedAPIResource         `json:"shape" mapstructure:"shape"`
	GetEvolvesFromSpecies func() PokemonSpecies    `json:"-" mapstructure:"-"`
	EvolvesFromSpecies    namedAPIResource         `json:"evolves_from_species" mapstructure:"evolves_from_species"`
	GetEvolutionChain     func() EvolutionChain    `json:"-" mapstructure:"-"`
	EvolutionChain        apiResource              `json:"evolution_chain" mapstructure:"evolution_chain"`
	GetHabitat            func() PokemonHabitat    `json:"-" mapstructure:"-"`
	Habitat               namedAPIResource         `json:"habitat" mapstructure:"habitat"`
	GetGeneration         func() Generation        `json:"-" mapstructure:"-"`
	Generation            namedAPIResource         `json:"generation" mapstructure:"generation"`
	Names                 []name                   `json:"names" mapstructure:"names"`
	PalParkEncounters     []palParkEncounterArea   `json:"pal_park_encounters" mapstructure:"pal_park_encounters"`
	FlavorTextEntries     []flavorText             `json:"flavor_text_entries" mapstructure:"flavor_text_entries"`
	FormDescriptions      []description            `json:"form_descriptions" mapstructure:"form_descriptions"`
	Genera                []genus                  `json:"genera" mapstructure:"genera"`
	Varieties             []pokemonSpeciesVariety  `json:"varieties" mapstructure:"varieties"`
}

PokemonSpecies ... A Pokémon Species forms the basis for at least one Pokémon. Attributes of a Pokémon species are shared across all varieties of Pokémon within the species. A good example is Wormadam; Wormadam is the species which can be found in three different varieties, Wormadam-Trash, Wormadam-Sandy and Wormadam-Plant. The PokemonSpecies schema can be found at https://pokeapi.co/docs/v2.html/#pokemon-species

func GetPokemonSpecies

func GetPokemonSpecies(query string) PokemonSpecies

GetPokemonSpecies returns a PokemonSpecies object Acceptable search queries: ID, String

type Region

type Region struct {
	ID                int `json:"id" mapstructure:"id"`
	GetLocations      []func() Location
	Locations         []namedAPIResource    `json:"locations" mapstructure:"locations"`
	Name              string                `json:"name" mapstructure:"name"`
	Names             []name                `json:"names" mapstructure:"names"`
	GetMainGeneration func() Generation     `json:"-" mapstructure:"-"`
	MainGeneration    namedAPIResource      `json:"main_generation" mapstructure:"main_generation"`
	GetPokedexes      []func() Pokedex      `json:"-" mapstructure:"-"`
	Pokedexes         []namedAPIResource    `json:"pokedexes" mapstructure:"pokedexes"`
	GetVersionGroups  []func() VersionGroup `json:"-" mapstructure:"-"`
	VersionGroups     []namedAPIResource    `json:"version_groups" mapstructure:"version_groups"`
}

Region ... A region is an organized area of the Pokémon world. Most often, the main difference between regions is the species of Pokémon that can be encountered within them. The Region schema can be found at https://pokeapi.co/docs/v2.html/#regions

func GetRegion

func GetRegion(query string) Region

GetRegion returns a Region object Acceptable search queries: ID, String

type Stat

type Stat struct {
	ID                 int                     `json:"id" mapstructure:"id"`
	Name               string                  `json:"name" mapstructure:"name"`
	GameIndex          int                     `json:"game_index" mapstructure:"game_index"`
	IsBattleOnly       bool                    `json:"is_battle_only" mapstructure:"is_battle_only"`
	AffectingMoves     moveStatAffectSets      `json:"affecting_moves" mapstructure:"affecting_moves"`
	AffectingNatures   natureStatAffectSets    `json:"affecting_natures" mapstructure:"affecting_natures"`
	GetCharacteristics []func() Characteristic `json:"-" mapstructure:"-"`
	Characteristics    []apiResource           `json:"characteristics" mapstructure:"characteristics"`
	GetMoveDamageClass func() MoveDamageClass  `json:"-" mapstructure:"-"`
	MoveDamageClass    namedAPIResource        `json:"move_damage_class" mapstructure:"move_damage_class"`
	Names              []name                  `json:"names" mapstructure:"names"`
}

Stat ... Stats determine certain aspects of battles. Each Pokémon has a value for each stat which grows as they gain levels and can be altered momentarily by effects in battles. The Stat schema can be found at https://pokeapi.co/docs/v2.html/#stats

func GetStat

func GetStat(query string) Stat

GetStat returns a Stat object Acceptable search queries: ID, String

type SuperContestEffect

type SuperContestEffect struct {
	ID                int                `json:"id" mapstructure:"id"`
	Appeal            int                `json:"appeal" mapstructure:"appeal"`
	FlavorTextEntries []flavorText       `json:"flavor_text_entries" mapstructure:"flavor_text_entries"`
	GetMoves          []func() Move      `json:"-" mapstructure:"-"`
	Moves             []namedAPIResource `json:"moves" mapstructure:"moves"`
}

SuperContestEffect ... Super contest effects refer to the effects of moves when used in super contests. The SuperContestEffect can be found at https://pokeapi.co/docs/v2.html/#super-contest-effects

func GetSuperContestEffect

func GetSuperContestEffect(id int) SuperContestEffect

GetSuperContestEffect returns a SuperContestEffect object Acceptable search queries: ID

type Type

type Type struct {
	ID                 int                    `json:"id" mapstructure:"id"`
	Name               string                 `json:"name" mapstructure:"name"`
	DamageRelations    typeRelations          `json:"damage_relations" mapstructure:"damage_relations"`
	GameIndices        []generationGameIndex  `json:"game_indices" mapstructure:"game_indices"`
	GetGeneration      func() Generation      `json:"-" mapstructure:"-"`
	Generation         namedAPIResource       `json:"generation" mapstructure:"generation"`
	GetMoveDamageClass func() MoveDamageClass `json:"-" mapstructure:"-"`
	MoveDamageClass    namedAPIResource       `json:"move_damage_class" mapstructure:"move_damage_class"`
	Names              []name                 `json:"names" mapstructure:"names"`
	Pokemon            []typePokemon          `json:"pokemon" mapstructure:"pokemon"`
	GetMoves           []func() Move          `json:"-" mapstructure:"-"`
	Moves              []namedAPIResource     `json:"moves" mapstructure:"moves"`
}

Type .. Types are properties for Pokémon and their moves. Each type has three properties: which types of Pokémon it is super effective against, which types of Pokémon it is not very effective against, and which types of Pokémon it is completely ineffective against. The Type schema can be found at https://pokeapi.co/docs/v2.html/#types

func GetType

func GetType(query string) Type

GetType returns a Type object Acceptable search queries: ID, String

type Version

type Version struct {
	ID              int                 `json:"id" mapstructure:"id"`
	Name            string              `json:"name" mapstructure:"name"`
	Names           []name              `json:"names" mapstructure:"names"`
	GetVersionGroup func() VersionGroup `json:"-" mapstructure:"-"`
	VersionGroup    namedAPIResource    `json:"version_group" mapstructure:"version_group"`
}

Version ... Versions of the games, e.g., Red, Blue or Yellow. The Version schema can be found at https://pokeapi.co/docs/v2.html/#version

func GetVersion

func GetVersion(query string) Version

GetVersion returns a Version object Acceptable search queries: ID, String

type VersionGroup

type VersionGroup struct {
	ID                  int                      `json:"id" mapstructure:"id"`
	Name                string                   `json:"name" mapstructure:"name"`
	Order               int                      `json:"order" mapstructure:"order"`
	Generation          namedAPIResource         `json:"generation" mapstructure:"generation"`
	GetMoveLearnMethods []func() MoveLearnMethod `json:"-" mapstructure:"-"`
	MoveLearnMethods    []namedAPIResource       `json:"move_learn_methods" mapstructure:"move_learn_methods"`
	GetPokedexes        []func() Pokedex         `json:"-" mapstructure:"-"`
	GetVersions         []func() Version         `json:"-" mapstructure:"-"`
	GetGeneration       func() Generation        `json:"-" mapstructure:"-"`
	Pokedexes           []namedAPIResource       `json:"pokedexes" mapstructure:"pokedexes"`
	Regions             []namedAPIResource       `json:"regions" mapstructure:"regions"`
	Versions            []namedAPIResource       `json:"versions" mapstructure:"versions"`
}

VersionGroup ... Version groups categorize highly similar versions of the games. The VersionGroup schema can be found at https://pokeapi.co/docs/v2.html/#version-groups

func GetVersionGroup

func GetVersionGroup(query string) VersionGroup

GetVersionGroup returns a VersionGroup object Acceptable search queries: ID, String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL