Pokeapi: Evolution is hard to show

Created on 17 May 2018  路  2Comments  路  Source: PokeAPI/pokeapi

On the evolution endpoint, the evolution id's do not match the pokemon id's making it near impossible to show an evolution chain for the pokemon. It would be awesome to have those id's match up.

question

Most helpful comment

If you're trying to show an evolution chain for a particular Pok茅mon, you'll have to get the species of that Pok茅mon first, and then get the evolution chain for the species.

Keep in mind that pokemon-species and pokemon are two different resources. Some species have different Pok茅mon variations (e.g. red and blue Gyrados), so different endpoints and IDs are needed. Are you sure you don't want the species to begin with?

All 2 comments

If you're trying to show an evolution chain for a particular Pok茅mon, you'll have to get the species of that Pok茅mon first, and then get the evolution chain for the species.

Keep in mind that pokemon-species and pokemon are two different resources. Some species have different Pok茅mon variations (e.g. red and blue Gyrados), so different endpoints and IDs are needed. Are you sure you don't want the species to begin with?

Either way would work. How I have my project set up is that you can select a pokemon and get all of their moves and stats, I could just use a second API call to pull the species information to get more information about the pokemon, and more importantly the evolution.

Was this page helpful?
0 / 5 - 0 ratings