Skip to content

Instantly share code, notes, and snippets.

@bhague1281
Last active July 27, 2016 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhague1281/59256ab3d4d96cd8ce49b402646c2e9e to your computer and use it in GitHub Desktop.
Save bhague1281/59256ab3d4d96cd8ce49b402646c2e9e to your computer and use it in GitHub Desktop.
const request = require('request');
const API_ENDPOINT = 'http://pokeapi.co/api/v2/pokemon/';
request(API_ENDPOINT, (error, response, body) => {
console.log(body);
// {
// "count": 811,
// "previous": null,
// "results": [
// {
// "url": "http://pokeapi.co/api/v2/pokemon/1/",
// "name": "bulbasaur"
// },
// {
// "url": "http://pokeapi.co/api/v2/pokemon/2/",
// "name": "ivysaur"
// },
// ....
// }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment