f1 0.2.0

Get historical and live Formula 1 (F1) data
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{historical::ErgastWeekend, Circuit, F1Error, Session};

#[derive(Clone, Debug, Default)]
pub struct Weekend {
    pub name: String,
    pub sessions: Vec<Session>,
    pub circuit: Circuit,
}

impl Weekend {
    pub fn new(year: i32, round: i32) -> Result<Self, F1Error> {
        Ok(ErgastWeekend::new(year, round)?.into())
    }
}