pokeman-wrapi

0.1.0 • Public • Published

Pokéapi Wrapper

Client interface for accessing The RESTful Pokémon API.

NPM version

Installation

Install via npm

npm install pokemon-wrapi --save

Usage

Create a client object to access Pokéapi resources.

var pokeWrapi = require('pokemon-wrapi');
 
var client = new pokeWrapi();
 
// Now you are ready to make API calls to Pokéapi.

Provide parameters and a callback.

Resource API calls follow this syntax:

client.resource(name, callback);

  • name - id or name.

Resource list API calls follow this syntax:

client.resource.list(queryString, callback);

  • queryString - (if required) limit & offset are used for pagination.

Examples

Lists all Pokémons.

client.pokemon.list(function(err, data) {
  if (!err) {
    console.log(data);
  } 
});

Get details of a specific Pokémon.

client.pokemon('palkia', function(err, data) {
  if (!err) {
    console.log(data);
  } 
});

API Functions

Berries

Contests

Encounters

Evolution

Games

Items

Machines

Moves

Locations

Pokemon

Utility

License

MIT

Package Sidebar

Install

npm i pokeman-wrapi

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • palanik