[Feature] Update `/pokemon` endpoint to include a Pokémon's type
sbmsr opened this issue · comments
seb commented
What you need to do
Our API needs to expose a Pokemon's type. As it currently stands, a request to http://localhost:8000/pokemon/
returns:
[
{
"id": 1,
"name_english": "Bulbasaur",
"name_japanese": "フシギダネ",
"name_chinese": "妙蛙种子",
"name_french": "Bulbizarre",
"hp": 45,
"attack": 49,
"defense": 49,
"special_attack": 65,
"special_defense": 65,
"speed": 45
},
{
"id": 2,
...
Expected behavior
- a request to http://localhost:8000/pokemon/ should return HTTP status 200 and the following JSON body:
[
{
"id": 1,
"name_english": "Bulbasaur",
"name_japanese": "フシギダネ",
"name_chinese": "妙蛙种子",
"name_french": "Bulbizarre",
"hp": 45,
"attack": 49,
"defense": 49,
"special_attack": 65,
"special_defense": 65,
"speed": 45,
"types": [
{
"type": "Grass"
},
{
"type": "Poison"
}
]
},
{
"id": 2,