1.1.8 • Published 3 years ago

pokemon.js v1.1.8

Weekly downloads
43
License
ISC
Repository
github
Last release
3 years ago

Table Of Contents

About

pokemon.js is a Node.js module that makes interacting with PokéAPI easier.

Installation

Node.js 12.0.0 or newer is required.
No dependencies are required.

npm install pokemon.js

Example Usage

const Pokemon = require('pokemon.js');

Pokemon.setLanguage('english');

Pokemon.getPokemon('pikachu').then(console.log);

Methods

  • getPokemon(pokemon):
    Returns data for the pokémon in JSON format.
  • getType(pokemon | type):
    Returns an Array that contains the pokémon's type(s) or returns data for the type in JSON format.
  • getAbility(pokemon | ability):
    Returns an Array that contains the pokémon's abilities or returns data for the ability in JSON format.
  • getSprites(pokemon):
    Returns an Object that contains the sprites for the pokémon.
  • getStats(pokemon):
    Returns an Object that contains the stats for the pokémon.
  • getForms(pokemon):
    Returns an Array that contains the forms for the pokémon.
  • getEvolutionLine(pokemon):
    Returns an Array that contains the evolution line of the pokémon.
  • canLearn(pokemon):
    Determines whether the pokémon can learn a move, retruning true or false.
  • getMove(pokemon | move):
    Returns an Array that contains the moves the pokémon learns or data on the move in JSON format.
  • getNature(nature):
    Returns an Object that contains the increased and decreased stat caused by the nature.
  • getItem(item):
    Returns data on the item in JSON format.
  • getRegion(region):
    Returns data on the region in JSON format.
  • getGeneration(generation):
    Returns data on the generation in JSON format.
  • getAll(type):
    Returns an Array that contains the names of all the specified type.
  • setLanguage(language):
    Sets the language to the language you prefer if available.
  • getLanguage()
    Returns the current language.

Links

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago