Socket
Book a DemoInstallSign in
Socket

pokeman-wrapi

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pokeman-wrapi

Wrapper for Pokéapi

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

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

Keywords

pokemon

FAQs

Package last updated on 24 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts