-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
What you need to do
Our API needs to support the ability to get all Pokemon, filtered by HP
Expected behavior
- a request to http://localhost:3000/pokemon/hp?[gt]=250 should return HTTP status 200 and the following JSON body
[
{
id: 242,
name: { english: "Blissey", japanese: "ハピナス", chinese: "幸福蛋", french: "Leuphorie" },
type: ["Normal"],
base: { HP: 255, Attack: 10, Defense: 10, "Sp. Attack": 75, "Sp. Defense": 135, Speed: 55 },
}
]- a request to http://localhost:3000/pokemon/hp?[gt]=250&[lt]=20 should return HTTP status 404 and the following JSON body
{
error: "Not found"
}- a request to http://localhost:3000/pokemon/hp?[badComparator]=200 should return HTTP status 400 and the following JSON body
{
error: 'Invalid Operator. Must be one of ["gt","gte","lt","lte"]'
}Metadata
Metadata
Assignees
Labels
No labels