pokego

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 11 Imported by: 0

README

PokeGO

Go Reference Go Report Card CI

PokeGO is a Go package that provides bindings to the Pokeapi. It caches to a local SQLite database.

Getting Started

Installing
go get github.com/mazylol/pokego
Usage

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.GetPokemonList(35) // 35 is how many pokemon it will get
	
// Print out the first Pokemons name
fmt.Println(pokemonList.Results[0].Name)

Features

  • Moves
  • Abilities
  • Pokémon (including various forms)
  • Types
  • Egg Groups
  • Game Versions
  • Items
  • Pokédexes
  • Pokémon Evolution Chains

Contributions <3

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMove added in v0.3.0

func GetMove(name string) (moves.Move, error)

GetMove returns a Move struct containing information about the Move with the given name.

func GetPokemon

func GetPokemon(name string) (pokemon.Pokemon, error)

GetPokemon returns a Pokemon struct containing information about the Pokemon with the given name.

func GetPokemonAbility added in v0.4.0

func GetPokemonAbility(name string) (pokemon.Ability, error)

GetPokemonAbility returns an Ability struct containing information about the Ability with the given name.

func GetPokemonCharacteristic added in v0.4.0

func GetPokemonCharacteristic(id int) (pokemon.Characteristic, error)

GetPokemonCharacteristic returns a Characteristic struct containing information about the Characteristic with the given id.

func GetPokemonColor added in v0.4.0

func GetPokemonColor(name string) (pokemon.Color, error)

GetPokemonColor returns a Color struct containing information about the Color with the given name.

func GetPokemonEggGroup added in v0.4.0

func GetPokemonEggGroup(name string) (pokemon.EggGroup, error)

GetPokemonEggGroup returns an EggGroup struct containing information about the EggGroup with the given name.

func GetPokemonForm added in v0.4.0

func GetPokemonForm(name string) (pokemon.Form, error)

GetPokemonForm returns a Form struct containing information about the Form with the given name.

func GetPokemonGender added in v0.4.0

func GetPokemonGender(name string) (pokemon.Gender, error)

GetPokemonGender returns a Gender struct containing information about the EggGroup with the given name.

func GetPokemonGrowthRate added in v0.4.0

func GetPokemonGrowthRate(name string) (pokemon.GrowthRate, error)

GetPokemonGrowthRate returns a GrowthRate struct containing information about the GrowthRate with the given name.

func GetPokemonHabitat added in v0.4.0

func GetPokemonHabitat(name string) (pokemon.Habitat, error)

GetPokemonHabitat returns a Habitat struct containing information about the Habitat with the given name.

func GetPokemonLocationArea added in v0.4.0

func GetPokemonLocationArea(name string) ([]pokemon.LocationArea, error)

GetPokemonLocationArea returns a PokemonLocationArea struct containing information about the PokemonLocationArea with the given name.

func GetPokemonNature added in v0.4.0

func GetPokemonNature(name string) (pokemon.Nature, error)

GetPokemonNature returns a Nature struct containing information about the Nature with the given name.

func GetPokemonPokeathlonStats added in v0.4.0

func GetPokemonPokeathlonStats(name string) (pokemon.PokeathlonStat, error)

GetPokemonPokeathlonStats returns a PokeathlonStat struct containing information about the PokeathlonStat with the given name.

func GetPokemonShape added in v0.4.0

func GetPokemonShape(name string) (pokemon.Shape, error)

GetPokemonShape returns a Shape struct containing information about the Shape with the given name.

func GetPokemonSpecies added in v0.4.0

func GetPokemonSpecies(name string) (pokemon.Species, error)

GetPokemonSpecies returns a Species struct containing information about the Species with the given name.

func GetPokemonStat added in v0.4.0

func GetPokemonStat(name string) (pokemon.Stat, error)

GetPokemonStat returns a Stat struct containing information about the Stat with the given name.

func GetPokemonType added in v0.4.0

func GetPokemonType(name string) (pokemon.Type, error)

GetPokemonType returns a Type struct containing information about the Type with the given name.

func GetResourceList added in v0.4.0

func GetResourceList(endpoint string, count int) (resource.List, error)

GetResourceList returns a ResourceList struct containing information about the list of resources with the given name.

Types

This section is empty.

Directories

Path Synopsis
types

Jump to

Keyboard shortcuts

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