odds-api 0.1.0

Official Rust SDK for odds-api.net
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use odds_api::{query_params, OddsApiClient};

#[tokio::main]
async fn main() -> odds_api::Result<()> {
    let client = OddsApiClient::from_env()?;
    let params = query_params([("sport", "rugby-league"), ("league", "NRL")]);

    let events = client.search_events(Some(&params)).await?;
    println!("{events:#}");

    Ok(())
}