Add pagination support for OData feed responses #346
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Search queries were only returning the first page of results. OData feeds include
<link rel="next">elements with$skiptokenparameters for pagination, but these were being ignored.Changes
choco/client.py: Modifiedsearch()to follow pagination links until exhaustedhreffrom<link rel="next">elements in feed XMLtests/test_search.py: Added pagination test and updated existing test to mock next page URLExample
Before: Search returns 30 results (first page only)
After: Search returns all results across pages
Works with all search modes (
exact,by_id_only,by_tag_only,id_starts_with) and both/Packages()and/FindPackagesById()endpoints.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.