pokeapi icon indicating copy to clipboard operation
pokeapi copied to clipboard

Some Pokemon get requests do not respond correct to name, but do with ID #

Open d0rf47 opened this issue 2 years ago • 2 comments

I think there its a naming / species issue: example data

"name": "basculin-red-striped",
"order": 666,
"past_types": [],
"species": {
"name": "basculin",
"url": "https://pokeapi.co/api/v2/pokemon-species/550/"
},

Should the name property not be 'basculin' and the species.name be 'basculin-red-striped' I am not sure if this is a database storage issue or possible code bug, but I wanted to bring it to attention. Steps to Reproduce:

  1. go to link https://pokeapi.co/api/v2/pokemon/550 & https://pokeapi.co/api/v2/pokemon/basculin 2.The second should return same results as the first however it returns a 404 response.

d0rf47 avatar May 07 '23 22:05 d0rf47

Should the name property not be 'basculin' and the species.name be 'basculin-red-striped'

It's the other way around in our convention

Naramsim avatar May 09 '23 12:05 Naramsim

Are you certain? It is not consistent.

Example Burmy:

{
"abilities": [],
"base_experience": 45,
"forms": [
{
"name": "burmy-plant",
"url": "https://pokeapi.co/api/v2/pokemon-form/412/"
},
{
"name": "burmy-sandy",
"url": "https://pokeapi.co/api/v2/pokemon-form/10034/"
},
{
"name": "burmy-trash",
"url": "https://pokeapi.co/api/v2/pokemon-form/10035/"
}
],
"game_indices": [],
"height": 2,
"held_items": [],
"id": 412,
"is_default": true,
"location_area_encounters": "https://pokeapi.co/api/v2/pokemon/412/encounters",
"moves": [],
"name": "burmy",
"order": 541,
"past_types": [],
"species": {
"name": "burmy",
"url": "https://pokeapi.co/api/v2/pokemon-species/412/"
},
"sprites": {},
"stats": [],
"types": [
{
"slot": 1,
"type": {
"name": "bug",
"url": "https://pokeapi.co/api/v2/type/7/"
}
}
],
"weight": 34
}

This is how most pokemon appear to be named, but basculin is the only one i've seen where it does not conform, Red-Stripe Basculin is the form of the basculin not the name of it. Other wise there would be multiple Pokemon entries and therefore multiple pokemon Id's for each form of every pokemon. It should be searchable by Name, not form-name. It really seems like a mix up btwn the two fields for this specific mon.

https://pokeapi.co/api/v2/ability/{id or name}/

d0rf47 avatar May 09 '23 15:05 d0rf47