-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add automatic pagination support to DSIS API client #29
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
Conversation
Qif-Equinor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good and add few comments.
could you add some tests against the new argument ?
Qif-Equinor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update the doc as commented.
I have updated docs to the newer version now, where we use max_pages in stead of fetch all. Not entirely sure what you mean by "Class should be used here."? , @Qif-Equinor |
🤖 I have created a release *beep* *boop* --- ## [0.3.0](v0.2.1...v0.3.0) (2025-11-10) ### Features * add automatic pagination support to DSIS API client ([#29](#29)) ([c4e5766](c4e5766)), closes [#28](#28) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This pull request introduces automatic pagination support to the DSIS API client and updates the documentation to explain how pagination works and how to control it. The main logic for following OData
nextLinkreferences and aggregating paged results is now handled transparently when usingexecute_query(), with an option to disable it for manual pagination. Theget()method has also been refactored and moved to the base client class.The most important changes include:
Pagination Support and API Enhancements
execute_query()via a newfetch_allparameter (defaultTrue). When enabled, the client follows allodata.nextLinkreferences and aggregates results into a single response. Manual pagination is possible by settingfetch_all=False. The logic for aggregating paged results is implemented in the new_aggregate_nextlink_pageshelper method. [1] [2] [3]Client Refactoring
get()method fromDSISClienttoBaseClientto reduce duplication and improve maintainability. The method was also refactored for clarity and to ensure schema validation is handled in the base class. [1] [2] [3] [4]Documentation Updates
fetch_allparameter, and when to use or disable it. Added a new example demonstrating manual pagination control. [1] [2]closes #28