PokeAPI / pokedex-promise-v2

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

statuscode 404 on trying to get characteristics of eevee #39

Closed notnot-nick closed 4 years ago

notnot-nick commented 4 years ago

im using pokedex-promise-v2 and when i call poke.getCharacteristicById(id), eevee's id returns a 404 while pokemon like squirtle, and pikachu work fine

Naramsim commented 4 years ago

Hi @S0LDR

I think you misunderstood the endpoint. In /characteristic/{id} the id is not the id of a Pokemon. These ids range from 1 to 30: https://pokeapi.co/api/v2/characteristic/?offset=0&limit=50

The same characteristic can be owned by multiple pokemon. To devise the characteristic of a pokemon you should apply a formula and then with the data of all ~30 characteristics correctly place a pokemon. The formula is described here: https://bulbapedia.bulbagarden.net/wiki/Characteristic

Naramsim commented 4 years ago

Bumb @S0LDR