Added chrono as dep

This commit is contained in:
Jef Roosens 2021-03-11 21:12:55 +01:00
parent ba5d149a60
commit 5c62300e6e
Signed by: Jef Roosens
GPG key ID: B580B976584B5F30
3 changed files with 59 additions and 2 deletions

View file

@ -1,9 +1,32 @@
use chrono::NaiveDate;
/// Searches the Ivago API for streets in the given city
///
/// # Arguments
///
/// * `street` -name of the street
/// * `street` - name of the street
/// * `city` - city the street is in
pub fn search_streets(street: String, city: String) -> Vec<String> {
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()
}