freestuffapi/lib.rs
1#![warn(missing_docs)]
2
3//! Client for the freestuffbot.xyz API.
4//!
5//! Main interface is through the [`Client`] struct, which is constructed using
6//! [`Client::builder()`].
7//!
8//! An API key can be gotten from <https://freestuffbot.xyz>.
9//!
10//! # Usage
11//! ```no_run
12//! # use freestuffapi::Client;
13//! # #[tokio::main]
14//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
15//! let api_key = "secret api key";
16//! let client = Client::builder()
17//! .key(&api_key)
18//! .build()?;
19//! client.ping().await?;
20//! # Ok(())
21//! # }
22//! ```
23
24pub mod api;
25#[cfg(feature = "client")]
26pub mod client;
27#[cfg(feature = "client")]
28pub use client::Client;