pokego

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 8 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 GetMoveList added in v0.3.0

func GetMoveList(limit int) (moves.MoveList, error)

GetMoveList returns a list of Move names. You have to include a limit for the amount of names you want.

func GetPokemon

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

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

func GetPokemonList added in v0.2.0

func GetPokemonList(limit int) (pokemon.PokemonList, error)

GetPokemonList returns a list of Pokemon names. You have to include a limit for the amount of names you want.

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