feat: sync Go client with Apify OpenAPI spec v2-2026-07-10T105921Z; add lazy iteration helpers - #16
Merged
Merged
Conversation
Spec delta (apify-docs #2754/#2750/#2753/#2747) added 401/402 error responses and relaxed field nullability/optionality; all handled by the existing generic error path and forward-compatible models. Request compression (brotli/gzip) documented by #2750 is already implemented. Version bump only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019rkZYoebybdnv7MFH9Ua6E
Adds an exported generic ListIterator[T] and an Iterate method to every collection the reference JS client iterates (actors, runs, builds, tasks, datasets, key-value-stores, request-queues, schedules, webhooks, webhook-dispatches, actor versions and env vars) plus dataset-item iteration (IterateItems / IterateDatasetItems[T]). StoreActorIterator becomes an alias of the shared type (public API unchanged). Adds one item-iteration integration test per collection. Also fixes two doc comments flagged in review. Minor version bump to 0.6.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019rkZYoebybdnv7MFH9Ua6E
Iterate's list-options Limit is now a cap on the total number of items yielded (matching the reference _listPaginated), and the per-page size is a separate chunkSize argument on every Iterate method (and IterateItems / IterateDatasetItems). Corrects the doc comments and CHANGELOG that claimed reference parity. Breaking change to StoreCollectionClient.Iterate's signature (bugfix). Adds a total-cap regression assertion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019rkZYoebybdnv7MFH9Ua6E
Covers loadPage/Next arithmetic (total-cap, multi-page, server-default page size, over-large limit, empty collection) via a stub fetch closure, so the iterator logic is exercised without a network or APIFY_TOKEN. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019rkZYoebybdnv7MFH9Ua6E
…erate Address full-review open items: - Add KeyValueStoreClient.IterateKeys cursor iterator (+ docs + integration test) - Iterate helpers now honor a caller-set Offset as the starting point - Document intentional retry-jitter divergence (Apify API docs prescribe jitter) - Add total-header-lag caveat to dataset item iterators - Hermetic tests for short-page and over-reported-total termination - Rename shadowed cap; fix smallPageDesc comment - README quick start reads APIFY_TOKEN from env; docs/misc checks !ok Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019rkZYoebybdnv7MFH9Ua6E
Add Dataset, KeyValueStore, and RequestQueue field tables to docs/storages.md and return types to the storage collection and single-resource method tables, matching the convention on the other resource pages. Verified against models.go and the client signatures. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019rkZYoebybdnv7MFH9Ua6E
…ld naming Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019rkZYoebybdnv7MFH9Ua6E
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.
Syncs the Go client to Apify OpenAPI spec
v2-2026-07-10T105921Zand adds lazy iteration helpers across the client.ClientVersionbumped to0.6.0.Added
Iteratehelpers on every list collection (actors, runs, builds, tasks, datasets, key-value-stores, request-queues, schedules, webhooks, webhook-dispatches, actor versions, env vars) plus dataset-item iteration (DatasetClient.IterateItems/ genericIterateDatasetItems[T]), backed by a new exported genericListIterator[T].Limitcaps the total items yielded (matching the reference); per-page size is a separatechunkSizeargument.KeyValueStoreClient.IterateKeysreturning aKeyValueStoreKeysIteratorthat walks all keys vianextExclusiveStartKey(mirrors the reference iterablelistKeys()).Fixed
Iteratehelpers now honor a caller-setOffsetas the starting point instead of discarding it, matching the referenceoptions.offsethandling.Changed
APISpecVersiontov2-2026-07-10T105921ZandClientVersionto0.6.0.StoreCollectionClient.Iteratenow takes a secondchunkSize *int64argument and treatsLimitas a total-item cap rather than page size, to match the reference iterator semantics.StoreActorIteratoris now an alias ofListIterator[ActorStoreListItem].Documentation
Call/WaitForFinishpolling relates toWithTimeout; where API tokens come from;IterateDatasetItems[T]signature + example;WithPublicBaseURLsample; storage resource model field tables; andclient.Build(id)vsActor.Build(...).Test stability
See
CHANGELOG.mdfor the full[0.6.0]entry.Generated by Claude Code