Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Implement Get Pokemon by HP #4

Open
sbmsr opened this issue Nov 18, 2022 · 0 comments
Open

[Feature] Implement Get Pokemon by HP #4

sbmsr opened this issue Nov 18, 2022 · 0 comments

Comments

@sbmsr
Copy link
Member

sbmsr commented Nov 18, 2022

What you need to do

Our API needs to support the ability to get all Pokemon, filtered by HP

Expected behavior

  1. 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 },
    }
  ]
  1. 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"
}
  1. 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"]' 
}
JunYuHuang added a commit to JunYuHuang/express-js-backend that referenced this issue Apr 11, 2023
maxim55069633 added a commit to maxim55069633/express-js-backend that referenced this issue May 7, 2023
antono91 added a commit to antono91/cbm-express-js-backend that referenced this issue Aug 11, 2023
clowjs added a commit to clowjs/express-js-backend that referenced this issue Nov 28, 2023
AjelmarMedina added a commit to AjelmarMedina/express-js-backend that referenced this issue Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant