ribbit_client/lib.rs
1//! Ribbit protocol client for Cascette
2//!
3//! This crate provides an async TCP client for Blizzard's Ribbit protocol,
4//! which is used to retrieve version information, CDN configurations, and
5//! other metadata for Blizzard games.
6//!
7//! # Example
8//!
9//! ```no_run
10//! use ribbit_client::{RibbitClient, Region, Endpoint};
11//!
12//! #[tokio::main]
13//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
14//! // Create a client for the US region
15//! let client = RibbitClient::new(Region::US);
16//!
17//! // Request WoW version information
18//! let endpoint = Endpoint::ProductVersions("wow".to_string());
19//! let response = client.request(&endpoint).await?;
20//!
21//! Ok(())
22//! }
23//! ```
24
25#![warn(clippy::all)]
26#![warn(clippy::pedantic)]
27#![warn(missing_docs)]
28#![allow(clippy::module_name_repetitions)]
29
30pub mod certificate_fetcher;
31pub mod client;
32pub mod cms_parser;
33pub mod dns_cache;
34pub mod error;
35pub mod response_types;
36pub mod signature;
37pub mod signature_verify;
38pub mod types;
39
40pub use client::{Response, RibbitClient};
41pub use error::{Error, Result};
42pub use response_types::{
43 BgdlEntry, CdnEntry, ProductBgdlResponse, ProductCdnsResponse, ProductSummary,
44 ProductVersionsResponse, SummaryResponse, TypedResponse, VersionEntry,
45};
46pub use types::{Endpoint, ProtocolVersion, Region};