Girl-Code-It / Opportunity-Calendar-Backend

Opportunity Calendar is the one-stop place to refer important opportunities available in tech-space like newly posted jobs, internships, hackathons, tech-conferences, scholarships, etc.

Home Page:https://opportunity-calendar.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Pagination in the GET Opportunities API

Manvityagi opened this issue · comments

  1. Use two additional query params - limit and offset
    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 the getOpportunities function.

  2. 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