pokeman-wrapi
v0.1.0
Published
Wrapper for Pokéapi
Downloads
8
Maintainers
Readme
Pokéapi Wrapper
Client interface for accessing The RESTful Pokémon API.
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
- contest.type.list
- contest.type
- contest.effect.list
- contest.effect
- superContest.effect.list
- superContest.effect
Encounters
- encounter.method.list
- encounter.method
- encounter.condition.list
- encounter.condition
- encounter.condition.value.list
- encounter.condition.value
Evolution
Games
Items
- 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
Machines
Moves
- 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
Locations
- location.list
- location
- location.area.list
- location.area
- pal.park.area.list
- pal.park.area
- region.list
- region
Pokemon
- 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