Skip to content

Pagination options in launches/query don't work. No matter what page number you post, query would always return the first page. #1360

@pavlokurochka

Description

@pavlokurochka

Pagination options in spacexdata don't work. No matter what page number you post, query would always return the first page.

import requests
rc = requests.delete(f"https://api.spacexdata.com/admin/cache")
rc.raise_for_status()
print(rc) 
response = requests.post(
        "https://api.spacexdata.com/v4/launches/query",
        json={
            "query": {
                "date_utc": {
                    "$gt": "2017-01-24T00:00:00.000Z",
                  },
            "options": {
                    "page": 5,
                     "limit": 10
                }
            }
        }
    )
response_json = response.json()
for k in response_json.keys():
  print(f'{k}:{response_json[k]}')

totalDocs:170
offset:0
limit:10
totalPages:17
page:1
pagingCounter:1
hasPrevPage:False
hasNextPage:True
prevPage:None
nextPage:2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions