Documentation
¶
Overview ¶
Package pokeapigo provides a concurrent Go wrapper with caching based on worker goroutines for pokeapi v2.
Index ¶
- type APIResource
- type APIResourceList
- type Ability
- type AbilityEffectChange
- type AbilityFlavorText
- type AbilityPokemon
- type AwesomeName
- type Berry
- type BerryFirmness
- type BerryFlavor
- type BerryFlavorMap
- type ChainLink
- type Characteristic
- type Client
- type ClientParam
- type ContestComboDetail
- type ContestComboSets
- type ContestEffect
- type ContestName
- type ContestType
- type Description
- type Effect
- type EggGroup
- type Encounter
- type EncounterCondition
- type EncounterConditionValue
- type EncounterMethod
- type EncounterMethodRate
- type EncounterVersionDetails
- type EvolutionChain
- type EvolutionDetail
- type EvolutionTrigger
- type FlavorBerryMap
- type FlavorText
- type Gender
- type Generation
- type GenerationGameIndex
- type Genus
- type GrowthRate
- type GrowthRateExperienceLevel
- type Item
- type ItemAttribute
- type ItemCategory
- type ItemFlingEffect
- type ItemHolderPokemon
- type ItemHolderPokemonVersionDetail
- type ItemPocket
- type ItemSprites
- type Job
- type Language
- type Location
- type LocationArea
- type LocationAreaEncounter
- type Machine
- type MachineVersionDetail
- type Move
- type MoveAilment
- type MoveBattleStyle
- type MoveBattleStylePreference
- type MoveCategory
- type MoveDamageClass
- type MoveFlavorText
- type MoveLearnMethod
- type MoveMetaData
- type MoveStatAffect
- type MoveStatAffectSets
- type MoveStatChange
- type MoveTarget
- type Name
- type NamedAPIResource
- type NamedAPIResourceList
- type Nature
- type NaturePokeathlonStatAffect
- type NaturePokeathlonStatAffectSets
- type NatureStatAffectSets
- type NatureStatChange
- type PalParkArea
- type PalParkEncounterArea
- type PalParkEncounterSpecies
- type PastMoveStatValues
- type PokeathlonStat
- type Pokedex
- type Pokemon
- type PokemonAbility
- type PokemonColor
- type PokemonEncounter
- type PokemonEntry
- type PokemonForm
- type PokemonFormSprites
- type PokemonHabitat
- type PokemonHeldItem
- type PokemonHeldItemVersion
- type PokemonMove
- type PokemonMoveVersion
- type PokemonShape
- type PokemonSpecies
- type PokemonSpeciesDexEntry
- type PokemonSpeciesGender
- type PokemonSpeciesVariety
- type PokemonSprites
- type PokemonStat
- type PokemonType
- type Region
- type Result
- type Stat
- type SuperContestEffect
- type Type
- type TypePokemon
- type TypeRelations
- type VerboseEffect
- type Version
- type VersionEncounterDetail
- type VersionGameIndex
- type VersionGroup
- type VersionGroupFlavorText
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResource ¶
type APIResource struct {
Url string
}
func (*APIResource) GetJob ¶
func (apires *APIResource) GetJob() *Job
GetJob is called on a *APIResource and returns a *Job which can then be submitted to the client to receive a result containing the data which the *APIResource refers to.
type APIResourceList ¶
type APIResourceList struct {
Count int
Next string
Previous bool
Results []APIResource
}
type Ability ¶
type Ability struct {
Id int
Name string
Is_Main_Series bool
Generation NamedAPIResource
Names []Name
Effect_Entries []VerboseEffect
Effect_Changes []AbilityEffectChange
Flavor_Text_Entries []AbilityFlavorText
Pokemon []AbilityPokemon
}
type AbilityEffectChange ¶
type AbilityEffectChange struct {
Effect_Entries []Effect
Version_Group NamedAPIResource
}
type AbilityFlavorText ¶
type AbilityFlavorText struct {
Flavor_Text string
Language NamedAPIResource
Version_Group NamedAPIResource
}
type AbilityPokemon ¶
type AbilityPokemon struct {
Is_Hidden bool
Slot int
Pokemon NamedAPIResource
}
type AwesomeName ¶
type AwesomeName struct {
Awesome_Name string
Language NamedAPIResource
}
type Berry ¶
type Berry struct {
Id int
Name string
Growth_Time int
Max_Harvest int
Natural_Gift_Power int
Size int
Smoothness int
Soil_Dryness int
Firmness NamedAPIResource
Flavors []BerryFlavorMap
Item NamedAPIResource
Natural_Gift_Type NamedAPIResource
}
type BerryFirmness ¶
type BerryFirmness struct {
Id int
Name string
Berries []NamedAPIResource
Names []Name
}
type BerryFlavor ¶
type BerryFlavor struct {
Id int
Name string
Berries []FlavorBerryMap
Contest_Type NamedAPIResource
Names []Name
}
type BerryFlavorMap ¶
type BerryFlavorMap struct {
Potency int
Flavor NamedAPIResource
}
type ChainLink ¶
type ChainLink struct {
Is_Baby bool
Species NamedAPIResource
Evolution_Details []EvolutionDetail
Evolves_To []ChainLink
}
type Characteristic ¶
type Characteristic struct {
Id int
Gene_Modulo int
Possible_Values []int
Descriptions []Description
}
type Client ¶
Client is the struct through which requests are made and received.
func NewClient ¶
func NewClient(param *ClientParam) *Client
NewClient takes a *ClientParam and returns a *Client. Must be called in order to use the package.
func (*Client) AddJobs ¶
AddJobs takes a variable number of *Job and uses a goroutine and an anonymous function to add those *Job to the jobs channel in the client on which the method is called.
func (*Client) PullResult ¶
PullResult returns a *Result from the results channel in the client on which the method is called.
type ClientParam ¶
ClientParam contains options to be passed to the NewClient function.
type ContestComboDetail ¶
type ContestComboDetail struct {
Use_Before []NamedAPIResource
Use_After []NamedAPIResource
}
type ContestComboSets ¶
type ContestComboSets struct {
Normal ContestComboDetail
Super ContestComboDetail
}
type ContestEffect ¶
type ContestEffect struct {
Id int
Appeal int
Jam int
Effect_Entries []Effect
Flavor_Text_Entries []FlavorText
}
type ContestName ¶
type ContestName struct {
Name string
Color string
Language NamedAPIResource
}
type ContestType ¶
type ContestType struct {
Id int
Name string
Berry_Flavor NamedAPIResource
Names []ContestName
}
type Description ¶
type Description struct {
Description string
Language NamedAPIResource
}
type Effect ¶
type Effect struct {
Effect string
Language NamedAPIResource
}
type EggGroup ¶
type EggGroup struct {
Id int
Name string
Names []Name
Pokemon_Species []NamedAPIResource
}
type Encounter ¶
type Encounter struct {
Min_Level int
Max_Level int
Condition_Values []NamedAPIResource
Chance int
Method NamedAPIResource
}
type EncounterCondition ¶
type EncounterCondition struct {
// contains filtered or unexported fields
}
type EncounterConditionValue ¶
type EncounterConditionValue struct {
// contains filtered or unexported fields
}
type EncounterMethod ¶
type EncounterMethod struct {
// contains filtered or unexported fields
}
type EncounterMethodRate ¶
type EncounterMethodRate struct {
Encounter_Method NamedAPIResource
Version_Details []EncounterVersionDetails
}
type EncounterVersionDetails ¶
type EncounterVersionDetails struct {
Rate int
Version NamedAPIResource
}
type EvolutionChain ¶
type EvolutionChain struct {
Id int
Baby_Trigger_Item NamedAPIResource
Chain ChainLink
}
type EvolutionDetail ¶
type EvolutionDetail struct {
Item NamedAPIResource
Trigger NamedAPIResource
Gender int
Held_Item NamedAPIResource
Known_Move NamedAPIResource
Known_Move_Type NamedAPIResource
Location NamedAPIResource
Min_Level int
Min_Happiness int
Min_Beauty int
Min_Affection int
Needs_Overworld_Rain bool
Party_Species NamedAPIResource
Party_Type NamedAPIResource
Relative_Physical_Stats int
Time_Of_Day string
Trade_Species NamedAPIResource
Turn_Upside_Down bool
}
type EvolutionTrigger ¶
type EvolutionTrigger struct {
Id int
Name string
Names []Name
Pokemon_Species []NamedAPIResource
}
type FlavorBerryMap ¶
type FlavorBerryMap struct {
Potency int
Berry NamedAPIResource
}
type FlavorText ¶
type FlavorText struct {
Flavor_Text string
Language NamedAPIResource
}
type Gender ¶
type Gender struct {
Id int
Name string
Pokemon_Species_Details []PokemonSpeciesGender
Required_For_Evolution []NamedAPIResource
}
type Generation ¶
type Generation struct {
Id int
Name string
Abilities []NamedAPIResource
Names []Name
Main_Region NamedAPIResource
Moves []NamedAPIResource
Pokemon_Species []NamedAPIResource
Types []NamedAPIResource
Version_Groups []NamedAPIResource
}
type GenerationGameIndex ¶
type GenerationGameIndex struct {
Game_Index int
Generation NamedAPIResource
}
type Genus ¶
type Genus struct {
Genus string
Language NamedAPIResource
}
type GrowthRate ¶
type GrowthRate struct {
Id int
Name string
Formula string
Descriptions []Description
Levels []GrowthRateExperienceLevel
Pokemon_Species []NamedAPIResource
}
type Item ¶
type Item struct {
Id int
Name string
Cost int
Fling_Power int
Fling_Effect NamedAPIResource
Attributes []NamedAPIResource
Category ItemCategory
Effect_Entries []VerboseEffect
Flavor_Text_Entries []VersionGroupFlavorText
Game_Indices []GenerationGameIndex
Names []Name
Sprites ItemSprites
Held_By_Pokemon []ItemHolderPokemon
Baby_Trigger_For APIResource
Machines []MachineVersionDetail
}
type ItemAttribute ¶
type ItemAttribute struct {
Id int
Name string
Items []NamedAPIResource
Names []Name
Descriptions []Description
}
type ItemCategory ¶
type ItemCategory struct {
Id int
Name string
Items []NamedAPIResource
Names []Name
Pocket []NamedAPIResource
}
type ItemFlingEffect ¶
type ItemFlingEffect struct {
Id int
Name string
Effect_Entries []Effect
Items []NamedAPIResource
}
type ItemHolderPokemon ¶
type ItemHolderPokemon struct {
Pokemon string
Version_Details []ItemHolderPokemonVersionDetail
}
type ItemHolderPokemonVersionDetail ¶
type ItemHolderPokemonVersionDetail struct {
Rarity string
Version NamedAPIResource
}
type ItemPocket ¶
type ItemPocket struct {
Id int
Name string
Categories []NamedAPIResource
Names []Name
}
type ItemSprites ¶
type ItemSprites struct {
Default string
}
type Location ¶
type Location struct {
Id int
Name string
Region NamedAPIResource
Names []Name
Game_Indices []GenerationGameIndex
Areas []NamedAPIResource
}
type LocationArea ¶
type LocationArea struct {
Id int
Name string
Game_Index int
Encounter_Method_Rates []EncounterMethodRate
Location NamedAPIResource
Names []Name
Pokemon_Encounters []PokemonEncounter
}
type LocationAreaEncounter ¶
type LocationAreaEncounter struct {
Location_Area NamedAPIResource
Version_Details []VersionEncounterDetail
}
type Machine ¶
type Machine struct {
Id int
Item NamedAPIResource
Move NamedAPIResource
Version_Group NamedAPIResource
}
type MachineVersionDetail ¶
type MachineVersionDetail struct {
Machine APIResource
Version_Group NamedAPIResource
}
type Move ¶
type Move struct {
Id int
Name string
Accuracy int
Effect_Chance int
Pp int
Priority int
Power int
Contest_Combos ContestComboSets
Contest_Type NamedAPIResource
Contest_Effect APIResource
Damage_Class NamedAPIResource
Effect_Entries []VerboseEffect
Effect_Changes []AbilityEffectChange
Flavor_Text_Entries []MoveFlavorText
Generation NamedAPIResource
Machines []MachineVersionDetail
Meta MoveMetaData
Names []Name
Past_Values []PastMoveStatValues
Stat_Changes []MoveStatChange
Super_Contest_Effect APIResource
Target NamedAPIResource
Type NamedAPIResource
}
type MoveAilment ¶
type MoveAilment struct {
Id int
Name string
Moves []NamedAPIResource
Names []Name
}
type MoveBattleStyle ¶
type MoveBattleStylePreference ¶
type MoveBattleStylePreference struct {
Low_HP_Preference int
High_HP_Preference int
Move_Battle_Style NamedAPIResource
}
type MoveCategory ¶
type MoveCategory struct {
Id int
Name string
Moves []NamedAPIResource
Descriptions []Description
}
type MoveDamageClass ¶
type MoveDamageClass struct {
Id int
Name string
Descriptions []Description
Moves []NamedAPIResource
Names []Name
}
type MoveFlavorText ¶
type MoveFlavorText struct {
Flavor_Text string
Language NamedAPIResource
Version_Group NamedAPIResource
}
type MoveLearnMethod ¶
type MoveLearnMethod struct {
Id int
Name string
Descriptions []Description
Names []Name
Version_Groups []NamedAPIResource
}
type MoveMetaData ¶
type MoveStatAffect ¶
type MoveStatAffect struct {
Change int
Move NamedAPIResource
}
type MoveStatAffectSets ¶
type MoveStatAffectSets struct {
Increase []MoveStatAffect
Decrease []MoveStatAffect
}
type MoveStatChange ¶
type MoveStatChange struct {
Change int
Stat NamedAPIResource
}
type MoveTarget ¶
type MoveTarget struct {
Id int
Name string
Descriptions []Description
Moves []NamedAPIResource
Names []Name
}
type Name ¶
type Name struct {
Name string
Language NamedAPIResource
}
type NamedAPIResource ¶
func (*NamedAPIResource) GetJob ¶
func (namedResource *NamedAPIResource) GetJob() *Job
GetJob is called on a *NamedAPIResource and returns a *Job which can then be submitted to the client to receive a result containing the data which the *NamedAPIResource refers to.
type NamedAPIResourceList ¶
type NamedAPIResourceList struct {
Count int
Next string
Previous bool
Results []NamedAPIResource
}
type Nature ¶
type Nature struct {
Id int
Name string
Decreased_Stat NamedAPIResource
Increased_Stat NamedAPIResource
Hates_Flavor NamedAPIResource
Likes_Flavor NamedAPIResource
Pokeathlon_Stat_Changes []NatureStatChange
Move_Battle_Style_Preferences []MoveBattleStylePreference
Names []Name
}
type NaturePokeathlonStatAffect ¶
type NaturePokeathlonStatAffect struct {
Max_Change int
Nature NamedAPIResource
}
type NaturePokeathlonStatAffectSets ¶
type NaturePokeathlonStatAffectSets struct {
Increase []NaturePokeathlonStatAffect
Decrease []NaturePokeathlonStatAffect
}
type NatureStatAffectSets ¶
type NatureStatAffectSets struct {
Increase []NamedAPIResource
Decrease []NamedAPIResource
}
type NatureStatChange ¶
type NatureStatChange struct {
Max_Change int
Pokeathlon_Stat NamedAPIResource
}
type PalParkArea ¶
type PalParkArea struct {
Id int
Name string
Names []Name
Pokemon_Encounters []PalParkEncounterSpecies
}
type PalParkEncounterArea ¶
type PalParkEncounterArea struct {
Base_Score int
Rate int
Area NamedAPIResource
}
type PalParkEncounterSpecies ¶
type PalParkEncounterSpecies struct {
Base_Score int
Rate int
Pokemon_Species NamedAPIResource
}
type PastMoveStatValues ¶
type PastMoveStatValues struct {
Accuracy int
Effect_Chance int
Power int
Pp int
Effect_Entries []VerboseEffect
Type NamedAPIResource
Version_Group NamedAPIResource
}
type PokeathlonStat ¶
type PokeathlonStat struct {
Id int
Name string
Names []Name
Affecting_Natures NaturePokeathlonStatAffectSets
}
type Pokedex ¶
type Pokedex struct {
Id int
Name string
Is_Main_Series bool
Descriptions []Description
Names []Name
Pokemon_Entries []PokemonEntry
Region NamedAPIResource
Version_Groups []NamedAPIResource
}
type Pokemon ¶
type Pokemon struct {
Id int
Name string
Base_Experience int
Height int
Is_Default bool
Order int
Weight int
Abilities []PokemonAbility
Forms []NamedAPIResource
Game_Indices []VersionGameIndex
Held_Items []PokemonHeldItem
Location_Area_Encounters string
Moves []PokemonMove
Sprites PokemonSprites
Species NamedAPIResource
Stats []PokemonStat
Types []PokemonType
}
type PokemonAbility ¶
type PokemonAbility struct {
Is_Hidden bool
Slot int
Ability NamedAPIResource
}
type PokemonColor ¶
type PokemonColor struct {
Id int
Name string
Names []Name
Pokemon_Species []NamedAPIResource
}
type PokemonEncounter ¶
type PokemonEncounter struct {
Pokemon NamedAPIResource
Version_Details []VersionEncounterDetail
}
type PokemonEntry ¶
type PokemonEntry struct {
Entry_Number int
Pokemon_Species NamedAPIResource
}
type PokemonForm ¶
type PokemonForm struct {
Id int
Name string
Order int
Form_Order int
Is_Default bool
Is_Battle_Only bool
Is_Mega bool
Form_Name string
Pokemon NamedAPIResource
Sprites PokemonFormSprites
Version_Group NamedAPIResource
Names []Name
Form_Names []Name
}
type PokemonFormSprites ¶
type PokemonHabitat ¶
type PokemonHabitat struct {
Id int
Name string
Names []Name
Pokemon_Species []NamedAPIResource
}
type PokemonHeldItem ¶
type PokemonHeldItem struct {
Item NamedAPIResource
Version_Details []PokemonHeldItemVersion
}
type PokemonHeldItemVersion ¶
type PokemonHeldItemVersion struct {
Version NamedAPIResource
Rarity int
}
type PokemonMove ¶
type PokemonMove struct {
Move NamedAPIResource
Version_Group_Details []PokemonMoveVersion
}
type PokemonMoveVersion ¶
type PokemonMoveVersion struct {
Move_Learn_Method NamedAPIResource
Version_Group NamedAPIResource
Level_Learned_At int
}
type PokemonShape ¶
type PokemonShape struct {
Id int
Name string
Awesome_Names []AwesomeName
Names []Name
Pokemon_Species []NamedAPIResource
}
type PokemonSpecies ¶
type PokemonSpecies struct {
Id int
Name string
Order int
Gender_Rate int
Capture_Rate int
Base_Happiness int
Is_Baby bool
Hatch_Counter int
Has_Gender_Differences bool
Forms_Switchable bool
Growth_Rate NamedAPIResource
Pokedex_Numbers []PokemonSpeciesDexEntry
Egg_Groups []NamedAPIResource
Color NamedAPIResource
Shape NamedAPIResource
Evolves_From_Species NamedAPIResource
Evolution_Chain APIResource
Habitat NamedAPIResource
Generation NamedAPIResource
Names []Name
Pal_Park_Encounters []PalParkEncounterArea
Flavor_Text_Entries []FlavorText
Form_Descriptions []Description
Genera []Genus
Varieties []PokemonSpeciesVariety
}
type PokemonSpeciesDexEntry ¶
type PokemonSpeciesDexEntry struct {
Entry_Number int
Pokedex NamedAPIResource
}
type PokemonSpeciesGender ¶
type PokemonSpeciesGender struct {
Rate int
Pokemon_Species NamedAPIResource
}
type PokemonSpeciesVariety ¶
type PokemonSpeciesVariety struct {
Is_Default bool
Pokemon NamedAPIResource
}
type PokemonSprites ¶
type PokemonStat ¶
type PokemonStat struct {
Stat NamedAPIResource
Effort int
Base_Stat int
}
type PokemonType ¶
type PokemonType struct {
Slot int
Type NamedAPIResource
}
type Region ¶
type Region struct {
Id int
Name string
Locations []NamedAPIResource
Main_Generation NamedAPIResource
Names []Name
Pokedexes []NamedAPIResource
Version_Groups []NamedAPIResource
}
type Stat ¶
type Stat struct {
Id int
Name string
Game_Index int
Is_Battle_Only bool
Affecting_Moves MoveStatAffectSets
Affecting_Natures NatureStatAffectSets
Characteristics []APIResource
Move_Damage_Class NamedAPIResource
Names []Name
}
type SuperContestEffect ¶
type SuperContestEffect struct {
Id int
Appeal int
Flavor_Text_Entries []FlavorText
Moves []NamedAPIResource
}
type Type ¶
type Type struct {
Id int
Name string
Damage_Relations TypeRelations
Game_Indices []GenerationGameIndex
Generation NamedAPIResource
Move_Damage_Class NamedAPIResource
Names []Name
Pokemon []TypePokemon
Moves []NamedAPIResource
}
type TypePokemon ¶
type TypePokemon struct {
Slot int
Pokemon NamedAPIResource
}
type TypeRelations ¶
type TypeRelations struct {
No_Damage_To []NamedAPIResource
Half_Damage_To []NamedAPIResource
Double_Damage_To []NamedAPIResource
No_Damage_From []NamedAPIResource
Half_Damage_From []NamedAPIResource
Double_Damage_From []NamedAPIResource
}
type VerboseEffect ¶
type VerboseEffect struct {
Effect string
Short_Effect string
Language NamedAPIResource
}
type Version ¶
type Version struct {
Id int
Name string
Names []Name
Version_Group NamedAPIResource
}
type VersionEncounterDetail ¶
type VersionEncounterDetail struct {
Version NamedAPIResource
Max_Chance int
Encounter_Details []Encounter
}
type VersionGameIndex ¶
type VersionGameIndex struct {
Game_Index int
Version NamedAPIResource
}
type VersionGroup ¶
type VersionGroup struct {
Id int
Name string
Order int
Generation NamedAPIResource
Move_Learn_Methods []NamedAPIResource
Pokedexes []NamedAPIResource
Regions []NamedAPIResource
Versions []NamedAPIResource
}
type VersionGroupFlavorText ¶
type VersionGroupFlavorText struct {
Text string
Language NamedAPIResource
Version_Group NamedAPIResource
}