microdex

package module
v0.0.0-...-6989733 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: GPL-3.0 Imports: 6 Imported by: 1

README

MicroDex

MicroDex is a golang library based on the RESTful api PokeAPI(https://pokeapi.co/), it offers plenty of information about pokemon, berries, evolutions and so much more about this universe.

In this library I can only offer the opportunity to get information about this creatures called pokemon and it's stats.

Getting the library

go get -u github.com/404a10/MicroDex

Create a Pokemon object

Charizard := microdex.CreatePokemon("Charizard")

And that's it, I'll leave a little demo on the demo folder just to show the attributes available in a pokemon object. (I'll try to add everything available about pokemon in the API but, for now I have this).

List of available attributes

  • Name
  • ID (The one on the pokedex)
  • Height
  • Weight
  • Types
  • Moves
TO DO
  • Get every attribute on the PokeAPI API about pokemon
  • Add berries to the API

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pokemon

type Pokemon struct {
	Name   string   `njson:"name"`
	ID     int      `njson:"id"`
	Height int      `njson:"height"`
	Weight int      `njson:"weight"`
	Type_1 string   `njson:"types.0.type.name"`
	Type_2 string   `njson:"types.1.type.name"`
	Moves  []string `njson:"moves.#.move.name"`
}

func CreatePokemon

func CreatePokemon(name string) Pokemon

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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