From fbc21f45c86704eda8de21ad62b63e935d702d93 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 18 Sep 2024 19:01:18 +0200 Subject: API: Add departure and arrival platform Closes #164 --- lib/Travelynx.pm | 2 ++ templates/api_documentation.html.ep | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 846e865..f8ace80 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1902,6 +1902,7 @@ sub startup { uic => $status->{dep_eva}, longitude => $status->{dep_lon}, latitude => $status->{dep_lat}, + platform => $status->{dep_platform}, scheduledTime => $status->{sched_departure} ? $status->{sched_departure}->epoch : undef, @@ -1915,6 +1916,7 @@ sub startup { uic => $status->{arr_eva}, longitude => $status->{arr_lon}, latitude => $status->{arr_lat}, + platform => $status->{arr_platform}, scheduledTime => $status->{sched_arrival} ? $status->{sched_arrival}->epoch : undef, diff --git a/templates/api_documentation.html.ep b/templates/api_documentation.html.ep index d8fc66f..4453286 100644 --- a/templates/api_documentation.html.ep +++ b/templates/api_documentation.html.ep @@ -41,6 +41,7 @@ "uic" : 8000098,
"latitude" : 51.451355,
"longitude" : 7.014793,
+ "platform" : "12", (ggf. null)
"scheduledTime": 1556083680,
"realTime": 1556083680
},
@@ -50,6 +51,7 @@ "uic" : 8001896,
"latitude" : 51.422853,
"longitude" : 7.023296,
+ "platform" : "2", (ggf. null)
"scheduledTime": 1556083980, (ggf. null)
"realTime": 1556083980 (ggf. null)
},
-- cgit v1.2.3