airlabs-api 0.0.2

airlabs.co API data types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

impl FlightRequest {
    pub fn iata(token: impl ToString, code: impl ToString) -> Self {
        let api_key = token.to_string();
        let code = FlightCode::Iata(code.to_string());
        Self { api_key, code }
    }

    pub fn icao(token: impl ToString, code: impl ToString) -> Self {
        let api_key = token.to_string();
        let code = FlightCode::Icao(code.to_string());
        Self { api_key, code }
    }
}