diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ef0faf..f138746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to the Apify Go client are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.1] - 2026-07-14 + +### Changed + +- Synced against Apify OpenAPI spec `v2-2026-07-13T092445Z`. The spec changes (added `402` + and `408` error responses on the synchronous run and `resurrect` endpoints, and relaxed + `required` on the run/build/key-value-store/webhook stats sub-schemas) need no code change: + error responses are handled generically and stats sub-documents are not modelled as typed + fields. +- Bumped `APISpecVersion` to `v2-2026-07-13T092445Z` and `ClientVersion` to `0.7.1`. + ## [0.7.0] - 2026-07-12 ### Changed diff --git a/README.md b/README.md index ec76f70..6806bc5 100644 --- a/README.md +++ b/README.md @@ -80,16 +80,27 @@ see [`examples/public_build_no_token`](examples/public_build_no_token)). Most en anything account-scoped or that reads or writes your resources — require a token. ```go -client := apify.NewClient( - apify.WithToken("my-api-token"), - apify.WithBaseURL("https://api.apify.com"), // /v2 is appended automatically - apify.WithPublicBaseURL("https://api.apify.com"), // base for signed, shareable URLs - apify.WithMaxRetries(8), // default 8 - apify.WithMinDelayBetweenRetries(500*time.Millisecond), - apify.WithTimeout(360*time.Second), // default 6 minutes - apify.WithUserAgentSuffix("MyTool/1.0"), - apify.WithHTTPBackend(apify.NewDefaultHTTPBackend()), +package main + +import ( + "time" + + apify "github.com/apify/apify-client-go" ) + +func main() { + client := apify.NewClient( + apify.WithToken("my-api-token"), + apify.WithBaseURL("https://api.apify.com"), // /v2 is appended automatically + apify.WithPublicBaseURL("https://api.apify.com"), // base for signed, shareable URLs + apify.WithMaxRetries(8), // default 8 + apify.WithMinDelayBetweenRetries(500*time.Millisecond), + apify.WithTimeout(360*time.Second), // default 6 minutes + apify.WithUserAgentSuffix("MyTool/1.0"), + apify.WithHTTPBackend(apify.NewDefaultHTTPBackend()), + ) + _ = client +} ``` | Option | Default | Description | @@ -191,7 +202,7 @@ func main() { - `apify.ClientVersion` — the semantic version of this library. - `apify.APISpecVersion` — the Apify OpenAPI spec version this client was built against - (`v2-2026-07-10T105921Z`). + (`v2-2026-07-13T092445Z`). ### Releasing @@ -226,7 +237,7 @@ APIFY_TOKEN= go run ./examples/run_store_actor | `get_account` | Fetch and print the current account details. | | `storages` | Create, write to, and read from a dataset, key-value store, and request queue. | | `run_store_actor` | Run a Store Actor, wait for it, and read its default dataset. | -| `run_and_last_run_storages` | Start a run, then fetch the Actor's last run and its storages. | +| `run_and_last_run_storages` | Start a run, wait for it to finish, then fetch the Actor's last run and its storages. | | `iterate_store` | Lazily iterate Actors in the Apify Store. | | `log_redirection` | Start an Actor and stream its log in real time. | | `create_build_run_actor` | Create an Actor, build it, run it, and print the run log. | diff --git a/docs/actors.md b/docs/actors.md index 4438ac7..b0025e1 100644 --- a/docs/actors.md +++ b/docs/actors.md @@ -90,7 +90,7 @@ The `Actor` value returned by `Get`/`Create`/`Update` and listed by `List`: | `LastRunWithOptions(options LastRunOptions) *RunClient` | Client for the last run, filtered by status and/or origin. | | `Builds() *BuildCollectionClient` | This Actor's builds. | | `Runs() *RunCollectionClient` | This Actor's runs. | -| `Version(n) *ActorVersionClient` / `Versions() *ActorVersionCollectionClient` | Versions. | +| `Version(n) *ActorVersionClient` / `Versions() *ActorVersionCollectionClient` | Client for a single Actor version (by version number), or a collection client for listing and creating this Actor's versions. | | `Webhooks() *WebhookCollectionClient` | This Actor's webhooks. | > **Note — two different `Build`s.** `Actor.Build(ctx, versionNumber, ActorBuildOptions)` here diff --git a/docs/storages.md b/docs/storages.md index 2d5e1fb..61a577d 100644 --- a/docs/storages.md +++ b/docs/storages.md @@ -300,7 +300,7 @@ API (omit it on create): Return types: -`ListHead`/`ListAndLockHead` return a `RequestQueueHead`: +`ListHead` returns a `RequestQueueHead`. (`ListAndLockHead` returns the raw API response as `json.RawMessage` - unmarshal it into your own type, or into `RequestQueueHead` if you want the same shape.) | Field | Type | Meaning | |---|---|---| diff --git a/version.go b/version.go index 3cb98aa..03c663d 100644 --- a/version.go +++ b/version.go @@ -4,10 +4,10 @@ package apify // // It follows Semantic Versioning (https://semver.org/). Changes to the public // interface (other than additive ones) are considered breaking changes. -const ClientVersion = "0.7.0" +const ClientVersion = "0.7.1" // APISpecVersion is the version of the Apify OpenAPI specification that this // client was generated and verified against. // // It corresponds to the `info.version` field of the Apify OpenAPI document. -const APISpecVersion = "v2-2026-07-10T105921Z" +const APISpecVersion = "v2-2026-07-13T092445Z"