1.0.1 • Published 9 years ago

poke-node v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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);
});