From 23e1ae217be4ee358fd053fc990f895f0011854b Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Nov 2026 16:22:12 +0000 Subject: [PATCH 1/2] chore: sync PHP client with Apify OpenAPI spec v2-2026-11-10T140017Z Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_017ocuAJ6an2FrPuYqCvUoaA --- CHANGELOG.md | 6 ++++++ README.md | 3 ++- docs/runs.md | 2 +- src/Resource/RunClient.php | 5 ++++- src/Version.php | 4 ++-- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e277cd..859c5d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.14.1 + +- Synced with Apify OpenAPI spec `v2-2026-11-10T140017Z`, which only changes descriptions. +- Documented that `RunClient::charge()` is called from the Actor run with the `APIFY_TOKEN` of the run, and how to charge a multi-tenant Server Actor request. +- Documented that the Console shows an API token only once. + ## 0.14.0 - Synced with Apify OpenAPI spec `v2-2026-11-09T143926Z`: `zstd` is a documented `Content-Encoding`. diff --git a/README.md b/README.md index 31bbaad..0d726eb 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,8 @@ echo 'Item count: ' . $items->getCount() . PHP_EOL; ``` The client does not read `APIFY_TOKEN`. Pass it yourself, for example `new ApifyClient(getenv('APIFY_TOKEN'))`. -You can find your token in [Apify Console → Settings → API & Integrations](https://console.apify.com/settings/integrations). +You can create a token in [Apify Console → Settings → API & Integrations](https://console.apify.com/settings/integrations). +The Console shows a token only once, right after you create or rotate it, so store it somewhere safe. ## Configuration diff --git a/docs/runs.md b/docs/runs.md index 8f02e91..8da22c0 100644 --- a/docs/runs.md +++ b/docs/runs.md @@ -26,7 +26,7 @@ An Actor's or task's runs are available at `$client->actor($id)->runs()` / `$cli - `metamorph(string $targetActorId, mixed $input = null, ?MetamorphOptions $options = null): ActorRun`: `$input` is as for `ActorClient::start()`. - `reboot(): ActorRun` - `resurrect(?RunResurrectOptions $options = null): ActorRun` -- `charge(RunChargeOptions $options): void`: for pay-per-event Actors. +- `charge(RunChargeOptions $options): void`: for pay-per-event Actors. Call it from the Actor run itself, with the token the run received in `APIFY_TOKEN`. For a multi-tenant Server Actor, set `requestId` to the request's `X-Actor-Request-ID` header value. - `waitForFinish(?int $waitSecs = null, int|float|string|null $timeoutSecs = null): ActorRun`: `$timeoutSecs` is the timeout of each poll request (default `'noTimeout'`). - `dataset(): DatasetClient`, `keyValueStore(): KeyValueStoreClient`, `requestQueue(): RequestQueueClient`: a 404 from `get()` or `delete()` is thrown, since the client cannot tell a missing run from a missing storage. - `iterateDatasetItems(?RunIterateDatasetItemsOptions $options = null, int|float|string|null $timeoutSecs = null): Generator`: lazily yields the items of the default dataset while the run is producing them, and returns when the run has finished and the dataset is drained. `$timeoutSecs` is the timeout of each request, polls included (default: the `long` tier). See [below](#reading-a-dataset-while-the-run-is-running). diff --git a/src/Resource/RunClient.php b/src/Resource/RunClient.php index 1e05404..098d5bf 100644 --- a/src/Resource/RunClient.php +++ b/src/Resource/RunClient.php @@ -156,7 +156,10 @@ public function resurrect(?RunResurrectOptions $options = null, int|float|string /** * Charges for events of a pay-per-event Actor run. * - * The request always carries an idempotency key, so a retried charge is applied once. + * Call it from the Actor run itself, with a client that uses the token the run received in its + * {@code APIFY_TOKEN} environment variable. The request always carries an idempotency key, so a retried + * charge is applied once. To charge a request to a multi-tenant Server Actor, set + * {@see RunChargeOptions::$requestId} to the request's {@code X-Actor-Request-ID} header value. */ public function charge(RunChargeOptions $options, int|float|string|null $timeoutSecs = null): void { diff --git a/src/Version.php b/src/Version.php index cbb9841..5644b6d 100644 --- a/src/Version.php +++ b/src/Version.php @@ -17,13 +17,13 @@ final class Version * The semantic version of this client library (see https://semver.org/). * Changes to the public interface other than additive ones are considered breaking changes. */ - public const CLIENT_VERSION = '0.14.0'; + public const CLIENT_VERSION = '0.14.1'; /** * The version of the Apify OpenAPI specification this client was generated and verified * against. Corresponds to the {@code info.version} field of the Apify OpenAPI document. */ - public const API_SPEC_VERSION = 'v2-2026-11-09T143926Z'; + public const API_SPEC_VERSION = 'v2-2026-11-10T140017Z'; private function __construct() { From 88bc14cc61db460e9a5ab305be5cfd87ddcf18f1 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Nov 2026 16:25:47 +0000 Subject: [PATCH 2/2] docs: write Apify Console in token notes Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_017ocuAJ6an2FrPuYqCvUoaA --- CHANGELOG.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 859c5d9..8b9fd9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Synced with Apify OpenAPI spec `v2-2026-11-10T140017Z`, which only changes descriptions. - Documented that `RunClient::charge()` is called from the Actor run with the `APIFY_TOKEN` of the run, and how to charge a multi-tenant Server Actor request. -- Documented that the Console shows an API token only once. +- Documented that Apify Console shows an API token only once. ## 0.14.0 diff --git a/README.md b/README.md index 0d726eb..543f2fe 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ echo 'Item count: ' . $items->getCount() . PHP_EOL; The client does not read `APIFY_TOKEN`. Pass it yourself, for example `new ApifyClient(getenv('APIFY_TOKEN'))`. You can create a token in [Apify Console → Settings → API & Integrations](https://console.apify.com/settings/integrations). -The Console shows a token only once, right after you create or rotate it, so store it somewhere safe. +Apify Console shows a token only once, right after you create or rotate it, so store it somewhere safe. ## Configuration