Skip to main content

Crate romm_api

Crate romm_api 

Source
Expand description

§romm-api

Shared HTTP client, API types, and domain logic for RomM frontends (CLI, TUI, Android).

§Quick Start

use romm_api::config::load_config;
use romm_api::client::RommClient;
use romm_api::error::RommError;

#[tokio::main]
async fn main() -> Result<(), RommError> {
    let config = load_config()?;
    let client = RommClient::new(&config, false)?;

    let version = client.rom_server_version_from_heartbeat().await;
    println!("Connected to RomM server version: {:?}", version);

    Ok(())
}

Re-exports§

pub use error::exit;

Modules§

client
HTTP client implementation for the RomM API. HTTP client wrapper around the ROMM API.
config
Configuration and authentication management. Configuration and authentication for the ROMM client.
core
Internal core logic and shared utilities. Core application logic and shared utilities.
endpoints
Type-safe API endpoint definitions.
error
Typed error hierarchy (ApiError, ConfigError, DownloadError, RommError). Typed error hierarchy for the romm-cli library.
feature_compat
Feature compatibility helpers based on OpenAPI endpoint availability.
log_redact
Redaction helpers for tracing output (no secrets in logs). Redaction helpers for tracing and debug output (Gap 6: secrets never in logs).
openapi
OpenAPI parsing and endpoint lookup helpers. Parse a subset of OpenAPI 3.x JSON into a flat endpoint list.
types
Shared data models and types.
update
Auto-update logic.