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
Feat/Pokemon partial name filter #1065
Feat/Pokemon partial name filter #1065
Conversation
Hi, thanks for the feature! It seems to me that the query filter is applicable to all endpoints, am I right? Could you post the result of this request? http://localhost:8000/api/v2/pokemon?limit=10&q=b Secondly, I don't think we will be able to ship this feature to the publicly accessible API. Due to the caching limits of Cloudflare, we cannot afford to enable such requests to the public. These requests potentially can create many cache keys (cache keys are the full URI) and for us is a big problem. On top of this, we don't run the Django db in production, we just have a JS function. Having said that, we can more than happily merge in this feature and those who spin up Pokeapi locally would benefit from this feature. |
@Indyandie if we merge this PR can we duplicate the |
@Naramsim we can mention that is local only in the description, and maybe OAS has s flag to handle this scenario. I'll look around... |
Thanks @JVMartyns ! |
A PokeAPI/api-data refresh has started. In ~45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data. |
The updater script has finished its job and has now opened a Pull Request towards PokeAPI/api-data with the updated data. |
The partial name filtering feature for Pokémon is being added to enhance the user's experience by allowing them to find Pokémon more efficiently and intuitively. Instead of needing to know a Pokémon's full name to conduct a successful search, users can type in a part of the name and receive a list of Pokémon that match the search criteria.
This is particularly useful in an extensive database where remembering exact names can be challenging, especially for users who are not familiar with all the Pokémon. Partial name filtering also speeds up the user's interaction with the application, making the search process more forgiving and less prone to errors.
Moreover, this functionality can increase the application's accessibility, as even if users make a typo or remember only part of a Pokémon's name, they can still find what they are looking for. In summary, adding this feature aims to make searching more flexible, accessible, and user-friendly for all users.
Here's an example of how this feature can be used in a web page:
The code below implements a simple search field that will search for pokemons as the user writes.
json response for search partial pokemon name "p" using new query: