ffrelay_api/
lib.rs

1//! # ffrelay-api
2//!
3//! A Rust API client library for [Firefox Relay](https://relay.firefox.com),
4//! Mozilla's email forwarding service that helps protect your privacy by creating
5//! email aliases that forward to your real email address.
6//!
7//! ## Features
8//!
9//! - Create random or custom domain email aliases
10//! - List all your email relays
11//! - Delete email relays
12//! - Retrieve profile information
13//! - Support for both standard relays and domain relays
14//!
15//! ## Quick Start
16//!
17//! ```no_run
18//! use ffrelay_api::api::FFRelayApi;
19//! use ffrelay_api::types::FirefoxEmailRelayRequest;
20//!
21//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
22//! // Initialize the API client with your Firefox Relay token
23//! let api = FFRelayApi::new("your-api-token-here");
24//!
25//! // Create a new random email relay
26//! let request = FirefoxEmailRelayRequest::builder()
27//!     .description("My new relay".to_string())
28//!     .build();
29//! let email = api.create(request).await?;
30//! println!("Created relay: {}", email);
31//!
32//! // List all relays
33//! let relays = api.list().await?;
34//! for relay in relays {
35//!     println!("{}: {}", relay.id, relay.full_address);
36//! }
37//! # Ok(())
38//! # }
39//! ```
40//!
41//! ## Getting Your API Token
42//!
43//! 1. Go to [Firefox Relay](https://relay.firefox.com)
44//! 2. Sign in with your Firefox Account
45//! 3. Navigate to the API settings to generate your token
46
47pub mod api;
48pub mod error;
49pub mod types;