poke-node

1.0.1 • Public • Published

poke-node

Build Status

Node.js wrapper for PokeAPI

Installation

poke-node can be installed through the npm:

$ npm install poke-node

To build and install from the latest source:

$ git clone git@github.com:dmlittle/poke-node.git
$ npm install

Usage

var PokeAPI = require('poke-node')();
 
PokeAPI.pokemon.retrieve(1, function (err, res) {
  console.log(res) // Log Bulbasaur's Info
});

Additionally, every resource method returns a promise, so you don't have to use the regular callback. E.g.

var PokeAPI = require('poke-node')();
 
PokeAPI.pokemon.retrieve(1)
.then(function (res) {
  console.log(res);
})
.catch(function (e) {
  console.log(e);
});

Package Sidebar

Install

npm i poke-node

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dmlittle