Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 634 Bytes

README.md

File metadata and controls

32 lines (21 loc) · 634 Bytes

mlbstats-rs

Client for using the MLB Stats API.

Description

Async client for accessing the MLB Stats API. This library is alpha quality and there is no public documentation for the MLB API, expect bugs. Contributions welcome.

Usage

Example

use mlbstats::client::Client;
use chrono::NaiveDate;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
    let client = Client::new();

    let schedule = client.schedule(None, None, None::<NaiveDate>, None).await?;

    for date in schedule.dates {
        for game in date.games {
            println!("{:?}", game);
        }
    }

    Ok(())
}