Name lists
I think it would be beneficial to provide an endpoint for name lists by language. It's a pretty common use case to display lists of Pokemon, or lists of items, etc, but they only way to get a human readable name is to transform the identifier name (with not-so-ideal results, as well as English-only) or to load every full object in the list (tons of potentially slow API calls).
I propose a new endpoint that would look something like this:
GET /api/v2/name-list/{category-name}/{language-id}/
For example, the call GET /api/v2/name-list/pokemon-species/9/ would return a response containing an array of objects like this:
[
{
...
},
{
"name": "Nidoran\u2640",
"resource": {
"name": "nidoran-f",
"url": "http://pokeapi.co/api/v2/pokemon-species/29/"
}
},
{
...
}
]
This list could be paginated in the same way as the resource lists.
This would solve problems like #235.
Is this already implemented? I also search for a solution to show a list of all pokemons in German. There is an endpoint for getting all pokemons, but only in English. I would have to start a new call for every Pokemon to find the German name. That is not very performant I guess.
A query parameter for the language would be much more useful.
No it is not. But I am working on a full GraphQL API that will let you create very complex queries, such as getting all species of type Poison that were introduced in Generation IV, or get all species with "ran" in the name. It's almost done, but there are still some bugs I'm trying to pin down, and I'm creating a simple React application to test how well it works. It's all taking longer than I thought it would. But I should still create a pull request, even if it's not ready to be merged.
@DFelten @cmmartti @sargunv did you come up with something?