-
Notifications
You must be signed in to change notification settings - Fork 20
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
Provider client iterator #46
Provider client iterator #46
Conversation
A little refactoring to allow consumers to iterate pages from each provider. Intention is to maintain ProviderClient behavior except for these changes: - don't request a second page if the first page is empty (previously would have made a second request if `next_url` was present on first page) - don't return any results for a provider if any pages failed (previously would have returned partial results if a page other than the first failed)
I really like this idea, haven't dug into the code too much yet so I don't fully understand what's going on... I just wanted to point you to #35, where we're discussing actually removing the whole "pass multiple providers into a |
Cool, just skimmed that issue and I believe I agree. Based on the name I would expect |
Perhaps an improvement to names, re: CityofSantaMonica#46 CityofSantaMonica#35
I renamed the client classes in this PR |
@ezheidtmann just leaving these comments here as well... I'd like to take the approach suggested in #35, to clean up the existing class rather than renaming and introducing new classes. Did you want to refactor this PR towards this approach? |
I believe that my latest push does that in |
Perhaps an improvement to names, re: CityofSantaMonica#46 CityofSantaMonica#35
Thank you. I think what I'm getting at is, I'd rather not introduce a new class and support a migration path so early in the game. Refactoring the existing Can you also please rebase on |
Got it, thanks for that direction. I'll work on a breaking change with an iterator-based API over the next few days; I pushed some early thinking in #45 |
Hey @ezheidtmann. The latest release has evolved the library to the point that I think this would 1) be much easier to implement, 2) need to be re-done anyway. Closing this PR, but would welcome a new one. Thank you! |
Rebased on #45
Refactor provider client to allow consumers to iterate through pages, rather than waiting for all pages before continuing.
Seeks to maintain
ProviderClient
interface without substantive change.