page_cursor() currently has strange behavior where the limit argument controls both the total number of results and the page size, but in different ways.
|
limit = valid_page_size(limit), |
- If
limit = Inf, page size is 500 and you get all results
- If
limit > 500 & limit < Inf, page size is 500 and you get limit results
- If
limit > 0 & limit <= 500, page size is limit and you get limit results
There is no way to, say, set the page size and limit to different values unless limit > 500. We should expose more flexibility here.