Implement Pagination in the GET Opportunities API
Manvityagi opened this issue · comments
-
Use two additional query params -
limit
andoffset
Instead of returning all the opportunities return something like: limited_query_set = query_set[offset : offset + limit].
An Example: if offset = 7 & limit = 20, The opportunities 7th to 27th should be returned.
PS:
Use
"DEFAULT_PAGE_LIMIT" - 20
"DEFAULT_PAGE_OFFSET", - 0
The changes will be effectively done in/managers/opportunity/index.js
in thegetOpportunities
function. -
Update the API documentation accordingly inside
routes/opportunity.js
Hello @Manvityagi mam , I would like to take this issue
Hello @Manvityagi mam , I would like to take this issue
Hi @Kashish0423, Go ahead. Assigned to you