PokeGO is a Go package that provides bindings to the Pokeapi. It caches to a local SQLite database.
go get github.com/mazylol/pokego
Import the package into your project.
import "github.com/mazylol/pokego"
Use the GetPokemon function to get a Pokemon of the provided name.
pokemon, err := pokego.GetPokemon("slugma")
// Print out name
fmt.Println(pokemon.Name)
You can also get a list of every Pokemon name.
pokemonList, err := pokego.GetResourceList("pokemon", 35) // 35 is how many pokemon it will get
// Print out the first Pokemons name
fmt.Println(pokemonList.Results[0].Name)
- Resource Lists/Pagination
- Berries
- Contests
- Encounters
- Evolution
- Games
- Items
- Locations
- Machines
- Moves
- Pokemon
- Utility
Contributors are very welcome. I still have a lot of ground to cover and any help is greatly appreciated. Refer to the features to see what needs done.