anitab-org / anitab-org/mentorship-backend

Search and filtering for endpoints

Open
#297 8 comments 1 reaction 0 assignees View on GitHub
Category: Coding Open Source Hack Status: Available
Dominant language
Python
Stars
200
Forks
449
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem?**
I was making a write-up about best REST practices and something essential came to my mind. A functionality so common that it's surprising we don't have it - search.

**Describe the solution you'd like**
I'd like features listed above to be supported in all endpoints (if applicable). It could be done using [`BaseModel.filter()`](https://flask-sqlalchemy.palletsprojects.com/en/2.x/queries/#querying-records) method that Flask-SQLAlchemy provides.

### Search URL examples
`/users?username=john`
`/users?location=us`
`/mentorship_relation/{request_id}/tasks?title=learn_react`

**Describe alternatives you've considered**
We can do all this stuff on the client side and considering current scale of the project, it's not really a big deal. However, serious problems will arise if the number of users (or data in general) gets increased.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.