-
Notifications
You must be signed in to change notification settings - Fork 18
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
Pagination utilities #44
base: master
Are you sure you want to change the base?
Conversation
…nse which allows users to more easily paginate through responses rather than constructing new requests themselves
@gje4 Any comments on the way it works? Thoughts about how to improve it so it doesn't require the config? |
Spent some more time with this. First thought would be a move to setting config to a global level. Either requiring the app to be set once at the appDelegate or even in the pList. It does have some restrictions that we have talked about in the past. The other thought not sure if its worth exploring/thoughts. Or even tell them to pass the link Think that may not be very efficient though. I guess in closing, I do not think it is too much to ask for config. I also think from a practical stand point needing that much data for the UI is going to be the edge case. So probably not worth to much time. |
I'm pretty against making this config global - would prefer to keep everything contained to the Moltin module. It's on the implementing developer to then decide how best to manage both the class and the configuration. The functions really already take the URL from the links dictionary, config is largely needed in order to construct other parameters such as authentication headers. |
All good with me, think it adds value and should be pushed. |
Status
Feature
Implements a new feature
Description
Adds some utility functions to the
PaginatedResponse
class which allows for simpler iteration through pages.Notes
Ideally, I'd not want the configuration to be specified again for each function, however, the response class does not have any understanding of the request that made it, so that would have to change and I'm not sure if I want that right now.