I'm trying to work with the call log API and ensure I retrieve all the possible data. According to the docs, the result has a paging object that MAY return totalPages or totalElements. In all of my calls to the call log, I never see these values. Given that, how do I know when to stop fetching data?
To test I tried to paginate 2 items at a time. My call log has 4 items in it so I figured this would let me test fetching two pages. On the first request, the paging result has pageStart of 0, which means the first record is index 0. I then fetch my next page, the same. My code then fetches a third page, which is wrong of course, and I see pageStart now has a value of 2, which doesn't make sense as it should be an array of 2 values.
So *in theory*, I could say if pageStart > what my page max should be (well using 0 based indexes) then it means to stop, but is that right?