the-odds-api 0.1.1

A Rust SDK for The Odds API - sports odds and scores
Documentation
//! # The Odds API Rust SDK
//!
//! A comprehensive Rust SDK for [The Odds API](https://the-odds-api.com/), providing
//! access to sports betting odds, scores, and related data from bookmakers worldwide.
//!
//! ## Features
//!
//! - Full coverage of The Odds API v4 endpoints
//! - Strongly-typed request parameters and responses
//! - Builder pattern for flexible request configuration
//! - Async/await support with `reqwest`
//! - API usage tracking via response headers
//! - Comprehensive error handling
//!
//! ## Quick Start
//!
//! ```no_run
//! use the_odds_api::{TheOddsApiClient, Region, Market};
//!
//! #[tokio::main]
//! async fn main() -> the_odds_api::Result<()> {
//!     // Create a client with your API key
//!     let client = TheOddsApiClient::new("your-api-key");
//!
//!     // Get all in-season sports
//!     let sports = client.get_sports().await?;
//!     println!("Found {} sports", sports.data.len());
//!
//!     // Get NFL odds from US bookmakers
//!     let odds = client
//!         .get_odds("americanfootball_nfl")
//!         .regions(&[Region::Us])
//!         .markets(&[Market::H2h, Market::Spreads])
//!         .send()
//!         .await?;
//!
//!     // Check API usage
//!     println!("Requests remaining: {:?}", odds.usage.requests_remaining);
//!
//!     Ok(())
//! }
//! ```
//!
//! ## Endpoints
//!
//! | Endpoint | Method | Quota Cost |
//! |----------|--------|------------|
//! | Sports | `get_sports()` | Free |
//! | Events | `get_events(sport)` | Free |
//! | Odds | `get_odds(sport)` | markets × regions |
//! | Scores | `get_scores(sport)` | 1 (or 2 with `days_from`) |
//! | Event Odds | `get_event_odds(sport, event_id)` | markets × regions |
//! | Event Markets | `get_event_markets(sport, event_id)` | 1 |
//! | Participants | `get_participants(sport)` | 1 |
//! | Historical Odds | `get_historical_odds(sport)` | 10 × markets × regions |
//! | Historical Events | `get_historical_events(sport)` | 1 |
//! | Historical Event Odds | `get_historical_event_odds(sport, event_id)` | markets × regions |
//!
//! ## Configuration
//!
//! Use the builder pattern for advanced configuration:
//!
//! ```no_run
//! use the_odds_api::TheOddsApiClient;
//!
//! let client = TheOddsApiClient::builder("your-api-key")
//!     .use_ipv6()  // Use IPv6 endpoint
//!     .build();
//! ```

mod client;
mod error;
mod models;
mod types;

pub use client::*;
pub use error::{Error, Result};
pub use models::*;
pub use types::*;