-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
What you need to do
Our API needs to support the ability to get a Pokemon by ID.
Expected behavior
- a request to http://localhost:3000/pokemon/482 should return HTTP status 200 and the following JSON body
{
id: 482,
name: { english: "Azelf", japanese: "アグノム", chinese: "亚克诺姆", french: "Créfadet" },
type: ["Psychic"],
base: { HP: 75, Attack: 125, Defense: 70, "Sp. Attack": 125, "Sp. Defense": 70, Speed: 115 },
}
- a request to http://localhost:3000/pokemon/badId should return HTTP status 400 and the following JSON body
{
error: "Invalid ID"
}
- a request to http://localhost:3000/pokemon/999999999 should return HTTP status 404 and the following JSON body
{
error: "Not found"
}
Metadata
Metadata
Assignees
Labels
No labels