Skip to content

wrapi/pokemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokéapi Wrapper

Client interface for accessing The RESTful Pokémon API.

NPM version

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

Encounters

Evolution

Games

Items

Machines

Moves

Locations

Pokemon

Utility

License

MIT

About

Wrapper for Pokéapi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published