asanaclient 0.1.1

Rust SDK for the Asana API
Documentation
//! Rust SDK for the Asana API.
//!
//! This crate provides a strongly-typed client for interacting with the
//! [Asana REST API](https://developers.asana.com/reference/rest-api-reference).
//!
//! # Authentication
//!
//! The client authenticates using a Personal Access Token (PAT) via the
//! `ASANA_TOKEN` environment variable.
//!
//! # Example
//!
//! ```rust,no_run
//! use asanaclient::Client;
//!
//! # async fn example() -> Result<(), asanaclient::Error> {
//! let client = Client::from_env()?;
//!
//! // List workspaces
//! let workspaces = client.workspaces().list().await?;
//!
//! for workspace in workspaces {
//!     println!("{}: {}", workspace.gid, workspace.name);
//! }
//! # Ok(())
//! # }
//! ```

mod client;
mod error;

pub mod api;
pub mod types;

// Re-export the main client and error types.
pub use client::Client;
pub use error::Error;

// Re-export commonly used API types.
pub use api::{
    FavoritesData, FetchFavoritesOptions, PortfolioWithItems, ProjectWithContext,
    TaskContextOptions, TaskWithContext,
};

// Re-export core data types.
pub use types::{
    CustomFieldValue, EnumOption, Event, EventChange, EventsResponse, EventsSyncReset,
    FavoriteItem, Gid, Job, Portfolio, Project, ProjectTemplate, ResourceRef, Section, StatusColor,
    Story, Tag, Task, User, Workspace,
};

/// Result type alias using the crate's error type.
pub type Result<T> = std::result::Result<T, Error>;