Skip to main content

Crate wc_data

Crate wc_data 

Source
Expand description

Data layer for the World Cup 2026 TUI.

This crate is provider-agnostic: a normalized domain model describes competitions, matches, standings, brackets, and live match detail, and a set of backends (backends) translate a specific upstream API into that model. Callers select a backend at runtime through the Provider enum (see provider), so the TUI never depends on any single data source.

Backends currently implemented:

  • ESPN (default): free, no API key, live data.
  • API-Football (api-sports.io): richer stats; requires an API key.
  • football-data.org: simple; requires an API key; limited live detail.

Re-exports§

pub use error::DataError;
pub use error::Result;
pub use provider::Provider;
pub use provider::ProviderConfig;
pub use provider::ProviderKind;
pub use provider::ScoreProvider;
pub use transport::Http;

Modules§

backends
Provider backends.
domain
Normalized, provider-agnostic domain model for the World Cup.
error
Error and result types shared across the data layer.
provider
The provider abstraction: a uniform ScoreProvider interface plus a runtime-selectable Provider enum.
transport
Shared HTTP transport used by all backends.