PokeAPI / pokeapi.co

The PokéAPI documentation website
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
138 stars 52 forks source link

Fixed the type of location_area_encounters #84

Closed Crejak closed 4 years ago

Crejak commented 4 years ago

The documentation previously stated that the type of the property "location_area_ecounters" in Pokemon was a string, instead of a list of LocationAreaEncounter.

Naramsim commented 4 years ago

I think the current type is correct. Right now if you query https://pokeapi.co/api/v2/pokemon/710 .location_area_encounters you get a string ("https://pokeapi.co/api/v2/pokemon/710/encounters").

Then if you follow that address you get a list of LocationAreaEncounter.

Naramsim commented 4 years ago

What we should do is to add another endpoint (GET https://pokeapi.co/api/v2/pokemon/{id or name}/encounters) and there state that we are returning a list of LocationAreaEncounter

Naramsim commented 4 years ago

Closing since the appropriate PR was raised.