You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.
Retrieving all pages is somewhat cumbersome - #11 - but for most programmatic uses it's the only correct way to use the API
(well, it's tempting to just request huge page size, but that's not really "correct", and there's been an idea that API might limit page size in future?)
So maybe the SDK could offer a helper that iterates all data.
should it concatenate everything to one array? Or return some kind of iterator you can start consuming? Maybe a channel?
requesting multiple pages in jumps risks missing/duplicating items if underlying collection is mutated in between. The SDK can't really solve this; but maybe we should think how to improve this on API side before abstracting a risky pattern in SDK...
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Retrieving all pages is somewhat cumbersome - #11 - but for most programmatic uses it's the only correct way to use the API
(well, it's tempting to just request huge page size, but that's not really "correct", and there's been an idea that API might limit page size in future?)
So maybe the SDK could offer a helper that iterates all data.
should it concatenate everything to one array? Or return some kind of iterator you can start consuming? Maybe a channel?
requesting multiple pages in jumps risks missing/duplicating items if underlying collection is mutated in between. The SDK can't really solve this; but maybe we should think how to improve this on API side before abstracting a risky pattern in SDK...
The text was updated successfully, but these errors were encountered: