Skip to main content

usesend_api/
lib.rs

1//! Low-level API client for the [useSend](https://usesend.com) email service.
2//!
3//! This crate provides typed request/response models and a raw HTTP client
4//! for every useSend API endpoint. For a higher-level, more ergonomic interface,
5//! see the [`usesend`](https://crates.io/crates/usesend) crate.
6//!
7//! # Quick Start
8//!
9//! ```no_run
10//! use usesend_api::UseSendApiClient;
11//!
12//! # async fn example() -> usesend_api::ApiResult<()> {
13//! let client = UseSendApiClient::new("us_api_key");
14//! let domains = client.domains.list().await?;
15//! println!("Found {} domains", domains.len());
16//! # Ok(())
17//! # }
18//! ```
19
20pub mod services;
21pub mod types;
22
23mod client;
24mod config;
25mod error;
26mod retry;
27
28pub use client::UseSendApiClient;
29pub use config::Config;
30pub use error::{ApiError, ApiResult};
31pub use retry::{RetryOptions, send_with_retry};
32pub use services::{CampaignsSvc, ContactBooksSvc, ContactsSvc, DomainsSvc, EmailsSvc};