Created
January 18, 2017 16:12
-
-
Save zgababa/4628e3e404f45c3d193286a77bdc43f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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