Open TunerBotDev opened 2 years ago
yes, IDs are related to resources. So you are actually requesting two different things.
yes, IDs are related to resources. So you are actually requesting two different things.
but there is now way to interaconnect both of the URLs. like im making a pokedex and need to fetch evolution chain as well, so i cannot fetch the evolution chain since the ID of the pokemon provided in the /pokemon url is different in evolution-chain url. please add feature to fetch evolution chains via names too.
yes, IDs are related to resources. So you are actually requesting two different things.
but there is now way to interaconnect both of the URLs. like im making a pokedex and need to fetch evolution chain as well, so i cannot fetch the evolution chain since the ID of the pokemon provided in the /pokemon url is different in evolution-chain url. please add feature to fetch evolution chains via names too.
Use the pokemon-species
endpoint:
Through the endpoint specified by @merfed you can get the evolution chain:
So you would need to make 3 API calls and 3 JSON parsing:
That's how this API works
let suppose a url https://pokeapi.co/api/v2/pokemon/charmander. here the ID of the pokemon is given as 4. okay so now since the url https://pokeapi.co/api/v2/evolution-chain/4 only supports number, when we fetch it, WHY IS IT SHOWING CATERPIE