-
Notifications
You must be signed in to change notification settings - Fork 0
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
The device_tokens API method no longer returns the current or total pages #1
Comments
The API is paged; but current_page and num_pages are no longer available. Instead of using a naive page/offset method we switched it to start after the last device token returned in the previous page, which is lighter on our db. As long as the next url exists, keep reading there. |
Thanks, Adam. So that means I should keep requesting pages until I get an empty response? |
Yes, that's correct. The last page should have no next page value, so you can stop there. |
Sorry, but isn't there is no 'next page' value ever? Put simply, I'm seeing JSON objects in the format:
|
That should only happen if there are no more pages. Try appending "?limit=10" to the request to force a smaller amount; you should have the same |
Ahh, you're right. Annoying that fields like that are only present in the response object depending on what query params you use... Anyway, thanks, that's enough for me to work with. |
Well, it's not that it's based on what query params you use, but on whether the data exists at all. So the option was between returning Hope that makes it more clear. |
Yep, but that's what I'd prefer: |
The documentation is wrong:
current_page
andnum_pages
are no longer returned in the response JSON object. Check to see if the API is paged anymore.The text was updated successfully, but these errors were encountered: