Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to the Rust Apify API client are documented here. The format
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres
to [Semantic Versioning](https://semver.org/).

## [0.4.3] - 2026-06-30

### Changed
- Bumped `API_SPEC_VERSION` to `v2-2026-06-30T091455Z`.
- Bumped crate version to `0.4.3`.

### Documentation
- `examples/get_account.rs`: import `chrono::Utc` explicitly so the snippet is self-contained.
- `RunCollectionClient::list`: added a rustdoc example for the two-argument
`list(ListOptions, RunListOptions)` call.

## [0.4.2] - 2026-06-29

Synchronized with Apify OpenAPI specification `v2-2026-06-29T142258Z` (previously
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apify-client"
version = "0.4.2"
version = "0.4.3"
authors = ["Apify Technologies <support@apify.com>"]
description = "An official, but experimental, AI-generated and AI-maintained Rust client for the Apify API (https://apify.com)."
license = "Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion examples/get_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! Run with: `APIFY_TOKEN=... cargo run --example get_account`

use apify_client::ApifyClient;
use chrono::Utc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
Expand All @@ -22,7 +23,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Usage for the billing cycle that contains a specific `YYYY-MM-DD` date — pass `Some(date)`
// to look up a particular cycle, or `None` for the current one. We derive the date from the
// current day (rather than hard-coding one) so the lookup always lands on a real cycle.
let date = chrono::Utc::now().format("%Y-%m-%d").to_string();
let date = Utc::now().format("%Y-%m-%d").to_string();
let dated_usage = client.me().monthly_usage_for_date(Some(&date)).await?;
if let Some(cycle) = dated_usage.get("usageCycle") {
println!("Usage cycle containing {date}: {cycle}");
Expand Down
23 changes: 23 additions & 0 deletions src/clients/run_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,29 @@ impl RunCollectionClient {
}

/// Lists runs with offset/limit pagination and optional status/started-time filtering.
///
/// Unlike other collections, run listing takes two arguments: the shared [`ListOptions`]
/// (offset/limit/desc) and a [`RunListOptions`] filter (status and start-time bounds).
///
/// # Example
/// ```no_run
/// use apify_client::{ApifyClient, ListOptions, RunListOptions};
///
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
/// let client = ApifyClient::new("my-api-token");
/// let runs = client
/// .runs()
/// .list(
/// ListOptions { limit: Some(10), desc: Some(true), ..Default::default() },
/// RunListOptions { status: vec!["SUCCEEDED".to_string()], ..Default::default() },
/// )
/// .await?;
/// for run in runs.items {
/// println!("{}", run.id);
/// }
/// # Ok(())
/// # }
/// ```
pub async fn list(
&self,
options: ListOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ pub const CLIENT_VERSION: &str = env!("CARGO_PKG_VERSION");
/// and verified against.
///
/// This corresponds to the `info.version` field of the Apify OpenAPI document.
pub const API_SPEC_VERSION: &str = "v2-2026-06-29T142258Z";
pub const API_SPEC_VERSION: &str = "v2-2026-06-30T091455Z";
Loading