From 3e672eeabd3a5b6b5d0ac9dadf7aee3b67f5abfa Mon Sep 17 00:00:00 2001 From: Jannis R Date: Mon, 25 Jun 2018 11:33:26 +0200 Subject: [PATCH] stopover.type, stopover.station -> stopover.stop :boom: To be compatible with `friendly-public-transport-format@1.1.1`. --- docs/journeys.md | 6 +++--- parse/stopover.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/journeys.md b/docs/journeys.md index 7a9e9131..81b74e24 100644 --- a/docs/journeys.md +++ b/docs/journeys.md @@ -160,7 +160,7 @@ The response may look like this: }, direction: 'S Potsdam Hauptbahnhof', stopovers: [ { - station: { + stop: { type: 'station', id: '900000003201', name: 'S+U Berlin Hauptbahnhof', @@ -171,7 +171,7 @@ The response may look like this: departure: null, cancelled: true }, { - station: { + stop: { type: 'station', id: '900000003102', name: 'S Bellevue', @@ -181,7 +181,7 @@ The response may look like this: arrival: '2017-12-17T19:09:00.000+01:00', departure: '2017-12-17T19:09:00.000+01:00' }, /* … */ { - station: { + stop: { type: 'station', id: '900000024101', name: 'S Charlottenburg', diff --git a/parse/stopover.js b/parse/stopover.js index 0264c321..763b27e8 100644 --- a/parse/stopover.js +++ b/parse/stopover.js @@ -3,7 +3,8 @@ const createParseStopover = (profile, stations, lines, remarks, date) => { const parseStopover = (st) => { const res = { - station: stations[parseInt(st.locX)] || null, + type: 'stopover', + stop: stations[parseInt(st.locX)] || null, arrival: null, arrivalDelay: null, arrivalPlatform: st.aPlatfR || st.aPlatfS || null,