Skip to content

feat: sync Go client with Apify OpenAPI spec v2-2026-07-10T105921Z; add lazy iteration helpers - #16

Merged
Pijukatel merged 7 commits into
masterfrom
claude/festive-babbage-6r538u
Jul 12, 2026
Merged

Pijukatel merged 7 commits into
masterfrom
claude/festive-babbage-6r538u

Conversation

@Pijukatel

Copy link
Copy Markdown
Collaborator

Syncs the Go client to Apify OpenAPI spec v2-2026-07-10T105921Z and adds lazy iteration helpers across the client. ClientVersion bumped to 0.6.0.

Added

  • Lazy Iterate helpers 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 / generic IterateDatasetItems[T]), backed by a new exported generic ListIterator[T]. Limit caps the total items yielded (matching the reference); per-page size is a separate chunkSize argument.
  • Cursor-based KeyValueStoreClient.IterateKeys returning a KeyValueStoreKeysIterator that walks all keys via nextExclusiveStartKey (mirrors the reference iterable listKeys()).

Fixed

  • Iterate helpers now honor a caller-set Offset as the starting point instead of discarding it, matching the reference options.offset handling.

Changed

  • Bumped APISpecVersion to v2-2026-07-10T105921Z and ClientVersion to 0.6.0.
  • Breaking: StoreCollectionClient.Iterate now takes a second chunkSize *int64 argument and treats Limit as a total-item cap rather than page size, to match the reference iterator semantics. StoreActorIterator is now an alias of ListIterator[ActorStoreListItem].

Documentation

  • Documented how Call/WaitForFinish polling relates to WithTimeout; where API tokens come from; IterateDatasetItems[T] signature + example; WithPublicBaseURL sample; storage resource model field tables; and client.Build(id) vs Actor.Build(...).

Test stability

  • Create-then-iterate collection integration tests tolerate list-endpoint eventual consistency via a shared bounded retry helper.

See CHANGELOG.md for the full [0.6.0] entry.


Generated by Claude Code

claude added 7 commits July 10, 2026 19:40
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
@Pijukatel Pijukatel changed the title chore: sync Go client with Apify OpenAPI spec v2-2026-07-10T105921Z; add lazy iteration helpers feat: sync Go client with Apify OpenAPI spec v2-2026-07-10T105921Z; add lazy iteration helpers Jul 12, 2026
@Pijukatel
Pijukatel merged commit 2735fc4 into master Jul 12, 2026
2 checks passed
@Pijukatel
Pijukatel deleted the claude/festive-babbage-6r538u branch July 12, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants