Skip to content

Commit 606160b

Browse files
committed
chore: sync Rust client with Apify OpenAPI spec v2-2026-06-30T091455Z
Version-only sync from v2-2026-06-29T142258Z. An independent operation- and parameter-level audit of the new spec (131 paths / 231 operations), with the apify-client-js reference as the in-scope parity authority, found no change to the in-scope API surface. Bumps API_SPEC_VERSION and the crate version to 0.4.3 (patch) and adds two non-breaking documentation improvements. - src/version.rs: API_SPEC_VERSION -> v2-2026-06-30T091455Z - Cargo.toml: 0.4.2 -> 0.4.3 - CHANGELOG.md: [0.4.3] - examples/get_account.rs: explicit chrono::Utc import (self-contained snippet) - src/clients/run_collection.rs: runnable rustdoc example for two-arg runs().list()
1 parent 233c6b5 commit 606160b

5 files changed

Lines changed: 51 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ All notable changes to the Rust Apify API client are documented here. The format
44
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres
55
to [Semantic Versioning](https://semver.org/).
66

7+
## [0.4.3] - 2026-06-30
8+
9+
Synchronized with Apify OpenAPI specification `v2-2026-06-30T091455Z` (previously
10+
`v2-2026-06-29T142258Z`). An independent operation- and parameter-level audit of the new
11+
specification (131 paths / 231 operations) against the exposed client surface — with the
12+
`apify-client-js` reference client as the parity authority for which endpoints are in scope — found
13+
**no change to the in-scope API surface**: same paths, operations, query/header parameters, request
14+
bodies and response schemas. Spot-checks of the highest-churn endpoints (`POST /v2/actors/{actorId}/runs`,
15+
`GET /v2/store`, `GET /v2/datasets/{datasetId}/items`, `GET /v2/actor-runs` including the
16+
`startedAfter`/`startedBefore` filters, `POST /v2/actor-runs/{runId}/charge`,
17+
`POST /v2/actor-runs/{runId}/resurrect`) confirmed every documented parameter remains covered. The
18+
endpoints not exposed by the client (`run-sync` / `run-sync-get-dataset-items`,
19+
`/v2/tools/encode-and-sign` & `/v2/tools/decode-and-verify`, `/v2/browser-info`, and the keyed `POST`
20+
create variants that duplicate the covered `PUT` writes) remain out of scope, matching the reference
21+
client. No public API surface change, so this is a patch release.
22+
23+
### Changed
24+
- `API_SPEC_VERSION` bumped to `v2-2026-06-30T091455Z`.
25+
26+
### Documentation
27+
- `examples/get_account.rs` now imports `chrono::Utc` explicitly so the snippet is self-contained.
28+
- Added a runnable rustdoc example to `RunCollectionClient::list` showing the two-argument
29+
`list(ListOptions, RunListOptions)` call.
30+
731
## [0.4.2] - 2026-06-29
832

933
Synchronized with Apify OpenAPI specification `v2-2026-06-29T142258Z` (previously

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "apify-client"
3-
version = "0.4.2"
3+
version = "0.4.3"
44
authors = ["Apify Technologies <support@apify.com>"]
55
description = "An official, but experimental, AI-generated and AI-maintained Rust client for the Apify API (https://apify.com)."
66
license = "Apache-2.0"

examples/get_account.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//! Run with: `APIFY_TOKEN=... cargo run --example get_account`
44
55
use apify_client::ApifyClient;
6+
use chrono::Utc;
67

78
#[tokio::main]
89
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -22,7 +23,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2223
// Usage for the billing cycle that contains a specific `YYYY-MM-DD` date — pass `Some(date)`
2324
// to look up a particular cycle, or `None` for the current one. We derive the date from the
2425
// current day (rather than hard-coding one) so the lookup always lands on a real cycle.
25-
let date = chrono::Utc::now().format("%Y-%m-%d").to_string();
26+
let date = Utc::now().format("%Y-%m-%d").to_string();
2627
let dated_usage = client.me().monthly_usage_for_date(Some(&date)).await?;
2728
if let Some(cycle) = dated_usage.get("usageCycle") {
2829
println!("Usage cycle containing {date}: {cycle}");

src/clients/run_collection.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,29 @@ impl RunCollectionClient {
3939
}
4040

4141
/// Lists runs with offset/limit pagination and optional status/started-time filtering.
42+
///
43+
/// Unlike other collections, run listing takes two arguments: the shared [`ListOptions`]
44+
/// (offset/limit/desc) and a [`RunListOptions`] filter (status and start-time bounds).
45+
///
46+
/// # Example
47+
/// ```no_run
48+
/// use apify_client::{ApifyClient, ListOptions, RunListOptions};
49+
///
50+
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
51+
/// let client = ApifyClient::new("my-api-token");
52+
/// let runs = client
53+
/// .runs()
54+
/// .list(
55+
/// ListOptions { limit: Some(10), desc: Some(true), ..Default::default() },
56+
/// RunListOptions { status: vec!["SUCCEEDED".to_string()], ..Default::default() },
57+
/// )
58+
/// .await?;
59+
/// for run in runs.items {
60+
/// println!("{}", run.id);
61+
/// }
62+
/// # Ok(())
63+
/// # }
64+
/// ```
4265
pub async fn list(
4366
&self,
4467
options: ListOptions,

src/version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ pub const CLIENT_VERSION: &str = env!("CARGO_PKG_VERSION");
1010
/// and verified against.
1111
///
1212
/// This corresponds to the `info.version` field of the Apify OpenAPI document.
13-
pub const API_SPEC_VERSION: &str = "v2-2026-06-29T142258Z";
13+
pub const API_SPEC_VERSION: &str = "v2-2026-06-30T091455Z";

0 commit comments

Comments
 (0)