Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Engineers exporting analytics currently have to maintain their own continuation loop around export_reviews. Add iter_export_pages to both client facades so they can consume CSV or NDJSON exports one page at a time while preserving the organization, dataset, time window, format, grouping, and optional starting cursor.
The iterator reuses the existing bounded transport and export decoder. It yields ExportPage objects so callers retain raw text, decoded rows, dataset version, and settled horizon. It follows cursors even when an intermediate page is empty, rejects empty or repeated continuation cursors before yielding that page, and raises pagination-limit if max_pages is exhausted while continuation remains. The default limit is 100 pages, configurable from 1 to 1000. Requests happen only when the consumer advances the iterator.
The existing single-page method and API contract remain unchanged. The contract checker recognizes the new facade helper. The README includes a streaming example and error behavior.
Verification:
HTTP tests cover sync/async behavior, CSV/NDJSON, lazy fetching, resumed cursors, exact filter preservation, empty intermediate pages, normal completion at the configured bound, invalid page limits, repeated and cyclic cursors, and an API refusal without pagination retries.
Implementation and verification performed with AI coding assistance.