#f1 #racing #formula1 #async-client #eargast

yanked eargast-rs

An async client for getting Formula 1 schedules, qualifying, and race results powered by the Eargast API

0.1.0 Jun 25, 2022
0.0.1 Jun 25, 2022

#4 in #formula1

MIT license

15KB
321 lines

Eargast-rs: your one stop shop for Formula 1 (F1) results and schedules

This project introduces an Eargast struct which can be used to query the Eargast API.

It currently supports getting:

  • race schedules
  • qualifying results
  • race results

All three can be queried for either the current season or any past season.

Example usage

Get the last race's results

let client = Eargast::new()?;
let race_results = client
    .race_results(None, None)
    .await?;

Get the race schedule for 2020

let client = Eargast::new()?;
let races = client
    .race_schedule(Some("2020"))
    .await?;

Get the qualifying results of the season opener in 2019

let client = Eargast::new()?;
let races = client
    .qualifying_results(Some(1), Some("2019"))
    .await?;

Dependencies

~4–16MB
~237K SLoC