Client interface for accessing The RESTful Pokémon API.
Install via npm
npm install pokemon-wrapi --save
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.
client.pokemon.list(function(err, data) {
if (!err) {
console.log(data);
}
});
client.pokemon('palkia', function(err, data) {
if (!err) {
console.log(data);
}
});
- contest.type.list
- contest.type
- contest.effect.list
- contest.effect
- superContest.effect.list
- superContest.effect
- encounter.method.list
- encounter.method
- encounter.condition.list
- encounter.condition
- encounter.condition.value.list
- encounter.condition.value
- generation.list
- generation
- pokedex.list
- pokedex
- version.list
- version
- version.group.list
- version.group
- item.list
- item
- item.attribute.list
- item.attribute
- item.category.list
- item.category
- item.fling.effect.list
- item.fling.effect
- item.pocket.list
- item.pocket
- move.list
- move
- move.ailment.list
- move.ailment
- move.battle.style.list
- move.battle.style
- move.category.list
- move.category
- move.damage.class.list
- move.damage.class
- move.learn.method.list
- move.learn.method
- move.target.list
- move.target
- location.list
- location
- location.area.list
- location.area
- pal.park.area.list
- pal.park.area
- region.list
- region
- ability.list
- ability
- characteristic.list
- characteristic
- egg.group.list
- egg.group
- gender.list
- gender
- growth.rate.list
- growth.rate
- nature.list
- nature
- pokeathlon.stat.list
- pokeathlon.stat
- pokemon.list
- pokemon
- pokemon.color.list
- pokemon.color
- pokemon.form.list
- pokemon.form
- pokemon.habitat.list
- pokemon.habitat
- pokemon.shape.list
- pokemon.shape
- pokemon.species.list
- pokemon.species
- stat.list
- stat
- type.list
- type