ringcentral / ringcentral-python

RingCentral Connect Platform Python SDK
MIT License
44 stars 35 forks source link

Pagination fails to paginate properly #12

Closed skammer closed 6 years ago

skammer commented 6 years ago

I have 4 calls without recording and 1 call with recording visible in my call list in my service.devtest.ringcentral.com admin portal. When I try to collect call log using

platform.get('/account/~/extension/~/call-log', request_params)

I keep getting inconsistent results.

When I try requesting results with perPage=10 and page=1 response contains all 4 calls, but paging has {pageStart: 0, perPage: 10, page: 1, pageEnd: 3}. pageEnd parameter is obviously wrong (disregarding the fact that pageStart starts with 0, and page starts with 1).

When requesting with perPage=2 things are equally perplexing. Starting withpage=1 I get what I would expect: 2 results and {pageStart: 0, perPage: 2, page: 1, pageEnd: 1}. But for some reason repeating request with page=2 returns 0 results with paging containing just {perPage: 10, page: 1} (no pageEnd and pageStart fields).

Any ideas how to overcome this?

kirill-konshin commented 6 years ago

Please forward this request to devsupport@ringcentral.com, we address only Python SDK related issues in this repository. I have notified support about this case. Thank you.