PokeAPI / pokeapi

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

How can I get all Alola pokémon including alolan forms? #327

Closed thechief389 closed 4 years ago

thechief389 commented 6 years ago

I'm working on a command-line Pokémon Sun and Moon game and I'm trying to figure out how to get the alola id and name of all the Pokémon in alola. The entry for the Alolan Raichu has the id 10100 and the name is "raichu-alola", rather than 26 and "raichu".(It would be very confusing for two entries to have the same name)

How can I get the alola id and the species name of all the pokemon?

Naramsim commented 6 years ago

https://pokeapi.co/api/v2/pokemon/10100/

thechief389 commented 6 years ago

That doesn’t have the original name or Id though.

thechief389 commented 6 years ago

It has the species name though.

Naramsim commented 6 years ago

https://pokeapi.co/api/v2/pokemon/raichu-alola/

You can query it even by name

haynesherway commented 6 years ago

Are sprites for alolan forms going to be available at any point? They currently return as null.

Naramsim commented 6 years ago

Probably not, not soon

haynesherway commented 6 years ago

I see that some of the sprites are available and even in the repo, what needs to be done to get that in the right spots?

Naramsim commented 6 years ago

Restart the server with all the sprites in the correct location. Anyway, it is recommended to clone this repo locally and serve by yourself the sprites

Naramsim commented 4 years ago

To get all the pokemon species of generation7 use https://pokeapi.co/api/v2/generation/7/ .pokemon_species

To get all the pokemon species of the updated alola pokedex use https://pokeapi.co/api/v2/pokedex/21/ .pokemon_entries

Then for each pokemon you should see if they have an alolan form