Skip to content

Instantly share code, notes, and snippets.

@zgababa
Created January 18, 2017 16:12
Show Gist options
  • Save zgababa/4628e3e404f45c3d193286a77bdc43f8 to your computer and use it in GitHub Desktop.
Save zgababa/4628e3e404f45c3d193286a77bdc43f8 to your computer and use it in GitHub Desktop.
'use strict';
const request = require('request-promise');
const path = require('path');
const Promise = require('bluebird');
const BASE_PATH = 'http://pokeapi.co/api/v2/';
function getPokemon(id) {
return request({
uri : BASE_PATH + path.join('pokemon-form', id.toString()),
json : true
});
}
module.exports = {
getPokemon
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment