README
poke-v2
A NodeJS wrapper for the api provided by http://pokeapi.co
npm install --save poke-v2
- All function calls return a promise.
- If that promise is resolved the returned value is an object with .res and .body
Example
import Poke from 'poke-v2';
// var Poke = require('poke-v2').default; If not using babel es2015
var poke = new Poke();
// For example we will call the pokemon function.
poke.pokemon(1)
.then((data) => {
console.log(data.res);
console.log(data.body);
})
.catch((err) => {
console.log(err);
})
.done();
For documentation go to: http://pokeapi.co/docsv2/
For a list of all functions available through poke-v2 please look in the ./functions.json file