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

Retrieve multiple pokemon in a single request #16

Open
1 of 4 tasks
Szeraax opened this issue Nov 1, 2022 · 2 comments
Open
1 of 4 tasks

Retrieve multiple pokemon in a single request #16

Szeraax opened this issue Nov 1, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Szeraax
Copy link

Szeraax commented Nov 1, 2022

I'm opening this issue because:

  • I have a question/doubt.
  • I want to report a bug/issue.
  • I want to request a feature or suggest something.
  • Other:

Description:

Related to #1, it would be nice to be able to query the API for multiple pokemon in a single request. Could be done via query param ?number=1,3,4,7 on the pokemon endpoint.

Alternatively, you could implement a search endpoint that will return a list of pokemon name/id via a POST request with body data to filter. Something like this:

POST: /v1/search

Body: {"name":"saur"}
This would return all pokemon whose names match saur.

Body: {"gen":[1,2],"name":"saur"}
This would return all pokemon whose names match saur and are in the first 2 gens.

Search would then have the same data model as pokemon, but always return an array instead of a single.

@atlanna
Copy link

atlanna bot commented Nov 1, 2022

Thank you for opening this issue.
A maintainer will get by as soon as practical to address this issue.

Since this is your first time here, please check the contributing guidelines to see other ways you can get involved.

@iamtraction iamtraction added the enhancement New feature or request label Nov 1, 2022
@mr-palindrome
Copy link

If this is issue is open to be fixed or implemented can I work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants