pokeapigo

package module
v0.0.0-...-0d25375 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2017 License: MIT Imports: 8 Imported by: 0

README

pokeapigo

A concurrent Go wrapper with caching based on worker goroutines for pokeapi v2.

Installation

go get github.com/pace543/pokeapigo

Usage

pokeapigo is designed around the concept of Jobs and Results.

First, create a pointer for Client by passing a &ClientParam to pokeapiGo.NewClient():

pokeapiClient := pokeapigo.NewClient(&pokeapigo.ClientParam{})

You can specify a specific *http.Client and the number of worker goroutines in &ClientParam (defaults are a *http.Client with a timeout of 10 seconds and 3 worker goroutines).

Next, pass any number of &Job to pokeapiClient.AddJobs():

pokeapiClient.AddJobs(&pokeapigo.Job{
    Endpoint: // endpoint from pokeapi.co documentation
    Id:       // out of id and name, use this because some endpoints only accept id
    Name:
}, ...)

Then, in a for-loop, obtain the results:

for {
    res := pokeapiClient.PullResult()
}

You will need to use a type assertion on res.Data to obtain a struct containing the information pulled for the given endpoint and id/name:

res.Data.(*pokeapigo.Berry) // for berry endpoint

If in a for-loop, you could use a type switch:

for {
    switch res.Data.(type) {
    ...
    }
}

Example

import (
	"../pokeapigo"
	"fmt"
)

func main() {
	pokeapiClient := pokeapigo.NewClient(&pokeapigo.ClientParam{})
	pokeapiClient.AddJobs(&pokeapigo.Job{
		Endpoint: "berry-firmness",
		Id: 1,
	}, &pokeapigo.Job{
		Endpoint: "berry",
		Id: 2,
	}, &pokeapigo.Job{
		Endpoint: "berry-flavor",
		Id: 3,
	}, &pokeapigo.Job{
		Endpoint: "evolution-chain",
		Id: 4,
	}, &pokeapigo.Job{
		Endpoint: "evolution-trigger",
		Id: 1,
	})

	for i := 0; i < 5; i++ {
		res := pokeapiClient.PullResult()
		switch res.Data.(type) {
		case *pokeapigo.BerryFirmness:
			fmt.Println(res.Data.(*pokeapigo.BerryFirmness))
		case *pokeapigo.Berry:
			fmt.Println(res.Data.(*pokeapigo.Berry))
		case *pokeapigo.BerryFlavor:
			fmt.Println(res.Data.(*pokeapigo.BerryFlavor))
		case *pokeapigo.EvolutionChain:
			fmt.Println(res.Data.(*pokeapigo.EvolutionChain))
		case *pokeapigo.EvolutionTrigger:
			fmt.Println(res.Data.(*pokeapigo.EvolutionTrigger))
		}
	}

	pokeapiClient.AddJobs(&pokeapigo.Job{
		Endpoint: "evolution-trigger",
		Id: 1,
	})
	res := pokeapiClient.PullResult()
	fmt.Println(res.Data.(*pokeapigo.EvolutionTrigger))
}

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for more information.

Documentation

Overview

Package pokeapigo provides a concurrent Go wrapper with caching based on worker goroutines for pokeapi v2.

Index

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 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

type Client struct {
	Http       *http.Client
	NumWorkers int
	// contains filtered or unexported fields
}

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

func (c *Client) AddJobs(j ...*Job)

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

func (c *Client) PullResult() *Result

PullResult returns a *Result from the results channel in the client on which the method is called.

type ClientParam

type ClientParam struct {
	Http       *http.Client
	NumWorkers int
}

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 GrowthRateExperienceLevel

type GrowthRateExperienceLevel struct {
	Level      int
	Experience int
}

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 Job

type Job struct {
	Endpoint string
	Id       int
	Name     string
}

Job represents a request to pokeapi v2.

func (*Job) String

func (j *Job) String() string

type Language

type Language struct {
	Id       int
	Name     string
	Official bool
	Iso639   string
	Iso3166  string
	Names    []Name
}

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 MoveBattleStyle struct {
	Id    int
	Name  string
	Names []Name
}

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 MoveMetaData struct {
	Ailment        NamedAPIResource
	Category       NamedAPIResource
	Min_Hits       int
	Max_Hits       int
	Min_Turns      int
	Max_Turns      int
	Drain          int
	Healing        int
	Crit_Rate      int
	Ailment_Chance int
	Flinch_Chance  int
	Stat_Chance    int
}

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

type NamedAPIResource struct {
	Name string
	Url  string
}

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 PokemonFormSprites struct {
	Front_Default string
	Front_Shiny   string
	Back_Default  string
	Back_Shiny    string
}

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 PokemonSprites struct {
	Front_Default      string
	Front_Shiny        string
	Front_Female       string
	Front_Shiny_Female string
	Back_Default       string
	Back_Shiny         string
	Back_Female        string
	Back_Shiny_Female  string
}

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 Result

type Result struct {
	Endpoint string
	Data     interface{}
	Error    error
}

Result represents returned information from pokeapi v2.

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
}

Jump to

Keyboard shortcuts

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