Skip to content

feat: Apify API client for Rust (OpenAPI v2-2026-06-16T064758Z) - #1

Merged
Pijukatel merged 7 commits into
masterfrom
claude/stoic-tesla-1ting1
Jun 19, 2026
Merged

feat: Apify API client for Rust (OpenAPI v2-2026-06-16T064758Z)#1
Pijukatel merged 7 commits into
masterfrom
claude/stoic-tesla-1ting1

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a complete, idiomatic Apify API client for Rust, generated from the Apify OpenAPI specification v2-2026-06-16T064758Z and developed into a fully-compliant client mirroring the canonical apify-client-js reference.

Highlights

  • Resource-oriented facade: ApifyClient + builder, with accessors for actors, builds, runs, tasks, datasets, key-value stores, request queues, schedules, webhooks, webhook dispatches, store, log, user, actor versions and env vars.
  • Replaceable HTTP transport: HttpBackend trait with a default ReqwestBackend.
  • Cross-cutting parity with JS: Bearer auth, mandated User-Agent header, retries with exponential backoff + jitter on 429/5xx/network, growing per-attempt timeouts, unified error handling.
  • Convenience methods: actor/task call, run/build wait_for_finish, dataset push/list/download, KVS records + get_records, request-queue lock lifecycle + cursor pagination, log streaming/redirection, lazy store iteration, HMAC URL signing.
  • Versioning constants: CLIENT_VERSION and API_SPEC_VERSION (v2-2026-06-16T064758Z).
  • Tests: offline unit tests + live integration tests per resource (env-driven, isolated, panic-safe cleanup) + 7 runnable doc examples each with a CI smoke test.
  • CI: Rust-path-filtered integration workflow (PR→master + manual dispatch, APIFY_TOKEN secret, fmt/clippy/build/test/doctest).
  • Docs + CHANGELOG.

Developed via the orchestrated create-client / review-client loop until the review gate passed with no open items.

claude added 5 commits June 18, 2026 10:53
…6-16T064758Z

Generated with openapi-generator 7.23.0 (rust/reqwest generator).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Develop the openapi-generator draft into a complete, idiomatic, fully
OpenAPI-compliant Apify API client mirroring the canonical JS reference:
resource-oriented client facade, replaceable HTTP backend, retries with
exponential backoff, mandated User-Agent, convenience methods (call,
wait_for_finish, pagination, log redirection, URL signing), versioning
constants, integration + unit tests, doc examples, CI workflow, docs and
CHANGELOG. Based on OpenAPI spec v2-2026-06-16T064758Z.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Percent-encode user-controlled URL path segments (KVS keys, request IDs,
lock paths); fix User-Agent isAtHome to read APIFY_IS_AT_HOME; add missing
spec query params (dataset outputFields/feedTitle/feedDescription, KVS keys
collection/signature, request-queue cursor/filter, storage list
unnamed/ownership, run list startedAfter/startedBefore); rework KVS
get_record attachment handling; add simple-GET tests, webhook_dispatch get,
actor-versions and env-vars CRUD tests, APIFY_API_URL path test, panic-safe
cleanup; add CI fail-fast guard for missing APIFY_TOKEN.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implement KeyValueStoreClient::get_records (GET .../records download-all
ZIP, with collection/prefix/signature params), reachable on nested
run/task default-store routes; document the redundant POST records alias
as a JS-reference-parity omission. Fix integration test cleanup Drop
guard runtime-handle deadlock and switch tests to multi_thread flavor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sion

Fix RequestQueueRequestsIterator to feed nextCursor back as the cursor
query param (was misrouted as exclusiveStartId, breaking pagination past
page 1); add multi-page pagination test. Add signature param to dataset
items list/download options. Add wait_for_finish to default_build for JS
parity. Resolve real rustc version into User-Agent via build.rs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add charge idempotency-key header (RunChargeOptions), metamorph
content_type (RunMetamorphOptions), resurrect max_items/
max_total_charge_usd/restart_on_error, run-list status array, and
request-queue batchAddRequests client-side chunking (25/batch); make
abort gracefully omittable; read both APIFY_IS_AT_HOME and isAtHome for
User-Agent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Pijukatel Pijukatel added the adhoc Ad-hoc unplanned task added during the sprint. label Jun 19, 2026
@Pijukatel Pijukatel added this to the v0 milestone Jun 19, 2026
@github-actions github-actions Bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels Jun 19, 2026
…run status

Address external-reviewer documentation hints:
- Document call/wait_for_finish wait_secs None vs Some(n) semantics (None
  = unbounded; Some = bounded, may return a non-terminal run) in rustdoc
  and docs.
- Fix docs/actors.md to name ActorListOptions (was wrongly ListOptions)
  and clarify the per-resource list option types.
- Document get_or_create's Option<&str> param with a named-create example.
- Note that option structs are re-exported at the crate root; switch
  examples/iterate_store.rs to the short import path.
- Document ActorRun.status known values; clarify actor-id forms in README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Pijukatel
Pijukatel merged commit cacaf24 into master Jun 19, 2026
2 checks passed
@Pijukatel
Pijukatel deleted the claude/stoic-tesla-1ting1 branch July 8, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants