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

API contract for GET tasks/paginated #82

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ivinayakg
Copy link
Contributor

@ivinayakg ivinayakg commented Jul 23, 2022

#83

Copy link
Contributor

@ankushdharkar ankushdharkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read https://jsonapi.org/ and see if it makes sense to be used here. Thank you for these docs!

tasks/README.md Outdated
@@ -42,6 +42,7 @@
| :--------------------------------: | :---------------: |
| [GET /tasks](#get-tasks) | Returns all tasks |
| [GET /tasks/self](#get-tasksself) | Returns all tasks of a user |
| [GET /tasks/paginated](#get-taskspaginated) | Returns all tasks based on the query (paginated) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to have a paginated path. Is there something else we can do here to make it implicit to handle pagination, e.g using query params?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, i have decided to make that change, and will do that

tasks/README.md Outdated
{
tasks : {<task_object>}[],
total : {<task_object>}[] length,
till : <task_object_id>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea!
Should we combine total, till etc under a common field in the result?

If you ask me, I would highly recommend us adopting: https://jsonapi.org/ spec

@ankushdharkar ankushdharkar added the documentation Improvements or additions to documentation label Jul 24, 2022
@shubham-y shubham-y linked an issue Jul 24, 2022 that may be closed by this pull request
ivinayakg and others added 3 commits July 26, 2022 13:43
Note: As the query is growing therefore rather than providing a different result based on wether it is queried or not lets just create a union where every result will have a meta data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API contract to GET /tasks (with query)
2 participants