PokeAPI / pokedex-promise-v2

An easy way to use pokeapi v2 with promises in node.js
MIT License
516 stars 91 forks source link

Resource #29

Closed Naramsim closed 7 years ago

Naramsim commented 7 years ago

Add .resource method

  P.resource(['/api/v2/pokemon/36', 'api/v2/berry/8', 'https://pokeapi.co/api/v2/ability/9/'])
    .then(function(response) {
      console.log(response); // resource function accepts singles or arrays of URLs/paths
    });

  P.resource('api/v2/berry/5')
    .then(function(response) {
      console.log(response);
    });
Naramsim commented 7 years ago

@TheTommyTwitch we have a problem with Node v0. I needed to remove the forced installation of npm@3 since on Node 8 it doesn´t work anymore.

Without the force of npm@3, the builds on node@0.10 and node@0.12 aren´t working anymore since they use npm@2 which is far outdated https://github.com/npm/npm/issues/18963

I think we can safely remove node@0 builds since it is not supported by the community. The package moreover will continue to work in node@0 since it is only the webpack build that fails.

tasadurian commented 7 years ago

Sounds good @Naramsim

tasadurian commented 7 years ago

@Naramsim you can merge this when it's ready to go.