PokeAPI / pokeapi

The Pokémon API
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
4.12k stars 931 forks source link

Something I don't understand between forms and Pokemon varieties #709

Open AskipLudo opened 2 years ago

AskipLudo commented 2 years ago

Hello, so I'm working on a project using PokeAPI so to show forms in my project I wanted to use the routes :

So for example I tried with Pichu, but sadly the number of "pokemon-form" route of spiky eared pichu is 10065 but in my project I used the ids to get sprites and everything else I need but the ID 10065 is also used for Mega Sceptile.

I can stop trying to use the "pokemon-form" route but that would be sad to not get all the Pokemon forms I would like.

C-Garza commented 2 years ago

It looks like we don't have a sprite for pichu-spiky-eared.

The pokemon form sprites are a bit different than the /pokemon sprites route. They can either look like 10xxx or the pokemon id along with the form, like arceus, 493-bug. You can see all the forms for a pokemon on the /pokemon route on the forms property.

Ex: /pokemon/pichu

It's also worth noting that /pokemon-form uses the pokemon-form ID, and /pokemon uses the pokemon ID. That's why you can have 10065 point to Mega Sceptile, but not pichu-spiky-eared. 10065 pokemon ID is Mega Sceptile, but 10065 pokemon-form ID is pichu-spiky-eared.