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

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

Open
pavlokurochka opened this issue Aug 20, 2024 · 0 comments

Comments

@pavlokurochka
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant