The API for DelayMap 3.0.0.
- Make sure you have
protoc
installed - Cargo run --release
All endpoints accept the url parameter language
for the following languages:
- English (
language=en
, default) - Dutch (
language=nl
) - French (
language=fr
) - German (
language=de
)
Returns a list of DelayMapTrain
with the following structures:
struct DelayMapStopTime {
id: String;
name: String,
lat: Option<f64>,
lon: Option<f64>,
arrival_delay: i32, // In seconds
arrival_timestamp: u32, // In seconds after midnight
departure_delay: i32, // In seconds
departure_timestamp: u32, // In seconds after midnight
stop_id: String,
}
struct DelayMapTrain {
name: String,
stops: Vec<DelayMapStopTime>,
stop_index: usize,
is_stopped: bool,
estimated_lat: f64,
estimated_lon: f64,
}
Returns a list of DelayMapWorks
with the following structures:
struct DelayMapStop {
name: String,
lat: Option<f64>,
lon: Option<f64>,
stop_id: String,
}
struct DelayMapURL {
url: String,
label: String,
}
struct DelayMapWorks {
id: String,
name: String,
message: String,
impacted_station: Option<DelayMapStop>,
start_date: String,
end_date: String,
start_time: String,
end_time: String,
urls: Vec<DelayMapURL>,
}