romm_api/lib.rs
1//! # romm-api
2//!
3//! Shared HTTP client, API types, and domain logic for RomM frontends (CLI, TUI, Android).
4//!
5//! ## Quick Start
6//!
7//! ```no_run
8//! use romm_api::config::load_config;
9//! use romm_api::client::RommClient;
10//! use romm_api::error::RommError;
11//!
12//! #[tokio::main]
13//! async fn main() -> Result<(), RommError> {
14//! let config = load_config()?;
15//! let client = RommClient::new(&config, false)?;
16//!
17//! let version = client.rom_server_version_from_heartbeat().await;
18//! println!("Connected to RomM server version: {:?}", version);
19//!
20//! Ok(())
21//! }
22//! ```
23
24/// HTTP client implementation for the RomM API.
25pub mod client;
26/// Configuration and authentication management.
27pub mod config;
28/// Internal core logic and shared utilities.
29pub mod core;
30/// Type-safe API endpoint definitions.
31pub mod endpoints;
32/// Typed error hierarchy (`ApiError`, `ConfigError`, `DownloadError`, `RommError`).
33pub mod error;
34/// Redaction helpers for tracing output (no secrets in logs).
35pub mod log_redact;
36pub use error::exit;
37/// Feature compatibility helpers based on OpenAPI endpoint availability.
38pub mod feature_compat;
39/// OpenAPI parsing and endpoint lookup helpers.
40pub mod openapi;
41/// Shared data models and types.
42pub mod types;
43/// Auto-update logic.
44pub mod update;