fej/src/ivago/controller.rs

33 lines
731 B
Rust
Raw Normal View History

2021-03-11 21:12:55 +01:00
use chrono::NaiveDate;
/// Searches the Ivago API for streets in the given city
///
/// # Arguments
///
2021-03-11 21:12:55 +01:00
/// * `street` - name of the street
/// * `city` - city the street is in
2021-03-11 21:12:55 +01:00
pub fn search_streets(street: String, city: Option<String>) -> Vec<String> {
Vec::new()
}
/// Represents a pickup time instance. All fields are a direct map of the
/// original API
pub struct PickupTime {
date: NaiveDate,
label: String,
classes: Vec<String>,
url: String
}
/// Return the known pickup times for the given street and/or city
///
/// # Arguments
///
/// * `street` - name of the street
/// * `city` - city the street is in
pub fn get_pickup_times(street: String, city: String) -> Vec<PickupTime> {
Vec::new()
}