From d44ec05a1d94aca279b2bea8c210efd87047ae72 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Mon, 16 Jul 2018 12:39:13 +0200 Subject: [PATCH] adapt markup in docs to current code :memo: --- docs/departures.md | 22 +++++----- docs/journeys.md | 102 ++++++++++++++++++++++++++++----------------- docs/locations.md | 4 +- docs/station.md | 24 ++++++----- 4 files changed, 89 insertions(+), 63 deletions(-) diff --git a/docs/departures.md b/docs/departures.md index 02fe5b37..07212022 100644 --- a/docs/departures.md +++ b/docs/departures.md @@ -61,7 +61,6 @@ The response may look like this: ```js [ { tripId: '1|31431|28|86|17122017', - trip: 31431, stop: { type: 'station', id: '900000024101', @@ -86,10 +85,10 @@ The response may look like this: line: { type: 'line', id: '18299', - name: 'S9', - public: true, mode: 'train', product: 'suburban', + public: true, + name: 'S9', symbol: 'S', nr: 9, metro: false, @@ -102,21 +101,21 @@ The response may look like this: name: 'S-Bahn Berlin GmbH' } }, - direction: 'S Spandau' + direction: 'S Spandau', + trip: 31431 }, { tripId: '1|30977|8|86|17122017', - trip: 30977, - station: { /* … */ }, + stop: { /* … */ }, when: null, delay: null, cancelled: true, line: { type: 'line', id: '16441', - name: 'S5', - public: true, mode: 'train', product: 'suburban', + public: true, + name: 'S5', symbol: 'S', nr: 5, metro: false, @@ -125,7 +124,8 @@ The response may look like this: productCode: 0, operator: { /* … */ } }, - direction: 'S Westkreuz' + direction: 'S Westkreuz', + trip: 30977 }, { tripId: '1|28671|4|86|17122017', trip: 28671, @@ -135,10 +135,10 @@ The response may look like this: line: { type: 'line', id: '19494', - name: 'U7', - public: true, mode: 'train', product: 'subway', + public: true, + name: 'U7', symbol: 'U', nr: 7, metro: false, diff --git a/docs/journeys.md b/docs/journeys.md index ccddad55..2fa65400 100644 --- a/docs/journeys.md +++ b/docs/journeys.md @@ -99,7 +99,7 @@ The response may look like this: [ { legs: [ { - id: '1|31041|35|86|17122017', + id: '1|32615|6|86|10072018', origin: { type: 'station', id: '900000003201', @@ -119,30 +119,23 @@ The response may look like this: regional: true } }, - departure: '2017-12-17T19:07:00.000+01:00', - departurePlatform: '16', destination: { type: 'station', - id: '900000024101', - name: 'S Charlottenburg', + id: '900000100004', + name: 'S+U Jannowitzbrücke', location: { type: 'location', latitude: 52.504806, longitude: 13.303846 }, - products: { - suburban: true, - subway: false, - tram: false, - bus: true, - ferry: false, - express: false, - regional: true - } + products: { /* … */ } }, - arrival: '2017-12-17T19:47:00.000+01:00', - arrivalPlatform: '8', - arrivalDelay: 30, + departure: '2018-07-10T23:54:00.000+02:00', + departureDelay: 60, + departurePlatform: '15', + arrival: '2018-07-11T00:02:00.000+02:00', + arrivalDelay: 60, + arrivalPlatform: '3', line: { type: 'line', id: '16845', @@ -150,19 +143,19 @@ The response may look like this: public: true, mode: 'train', product: 'suburban', + operator: { + type: 'operator', + id: 's-bahn-berlin-gmbh', + name: 'S-Bahn Berlin GmbH' + }, symbol: 'S', nr: 7, metro: false, express: false, night: false, - productCode: 0, - operator: { - type: 'operator', - id: 's-bahn-berlin-gmbh', - name: 'S-Bahn Berlin GmbH' - } + productCode: 0 }, - direction: 'S Potsdam Hauptbahnhof', + direction: 'S Ahrensfelde', stopovers: [ { stop: { type: 'station', @@ -173,32 +166,63 @@ The response may look like this: }, arrival: null, departure: null, - cancelled: true + cancelled: true, + remarks: [ + {type: 'hint', code: 'bf', text: 'barrier-free'}, + {type: 'hint', code: 'FB', text: 'Bicycle conveyance'} + ] }, { stop: { type: 'station', - id: '900000003102', - name: 'S Bellevue', + id: '900000100001', + name: 'S+U Friedrichstr.', location: { /* … */ }, products: { /* … */ } }, - arrival: '2017-12-17T19:09:00.000+01:00', - arrivalPlatform: '1', - departure: '2017-12-17T19:09:00.000+01:00', - departurePlatform: '1' - }, /* … */ { - stop: { + arrival: '2018-07-10T23:56:00.000+02:00', + arrivalDelay: 60, + arrivalPlatform: null, + departure: '2018-07-10T23:57:00.000+02:00', + departureDelay: 60, + departurePlatform: null, + remarks: [ /* … */ ] + }, + /* … */ + { type: 'station', - id: '900000024101', - name: 'S Charlottenburg', + id: '900000100004', + name: 'S+U Jannowitzbrücke', location: { /* … */ }, products: { /* … */ } }, - arrival: '2017-12-17T19:17:00.000+01:00', - arrivalPlatform: '5', - departure: '2017-12-17T19:17:00.000+01:00', - departurePlatform: '5' + arrival: '2018-07-11T00:02:00.000+02:00', + arrivalDelay: 60, + arrivalPlatform: null, + departure: '2018-07-11T00:02:00.000+02:00', + departureDelay: null, + departurePlatform: null, + remarks: [ /* … */ ] } ] + }, { + origin: { + type: 'station', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { /* … */ }, + products: { /* … */ } + }, + destination: { + type: 'station', + id: '900000100008', + name: 'U Heinrich-Heine-Str.', + location: { /* … */ }, + products: { /* … */ } + }, + departure: '2018-07-11T00:01:00.000+02:00', + arrival: '2018-07-11T00:10:00.000+02:00', + mode: 'walking', + public: true, + distance: 558 } ] }, earlierRef: '…', // use with the `earlierThan` option diff --git a/docs/locations.md b/docs/locations.md index 3abdc58e..9d8cfd65 100644 --- a/docs/locations.md +++ b/docs/locations.md @@ -54,14 +54,14 @@ The response may look like this: } }, { // point of interest type: 'location', - name: 'Berlin, Holiday Inn Centre Alexanderplatz****', id: '900980709', + name: 'Berlin, Holiday Inn Centre Alexanderplatz****', latitude: 52.523549, longitude: 13.418441 }, { // point of interest type: 'location', - name: 'Berlin, Hotel Agon am Alexanderplatz', id: '900980176', + name: 'Berlin, Hotel Agon am Alexanderplatz', latitude: 52.524556, longitude: 13.420266 } ] diff --git a/docs/station.md b/docs/station.md index b329245f..d31feb6f 100644 --- a/docs/station.md +++ b/docs/station.md @@ -66,24 +66,26 @@ The response may look like this: lines: [ { type: 'line', id: 'u1', - name: 'U1', - public: true, - class: 2, - product: 'subway', mode: 'train', + product: 'subway', + public: true, + name: 'U1', + class: 2, symbol: 'U', nr: 1, metro: false, express: false, - night: false }, - // … - { type: 'line', + night: false + }, + // … + { + type: 'line', id: 'n9', - name: 'N9', - public: true, - class: 8, - product: 'bus', mode: 'bus', + product: 'bus', + public: true, + name: 'N9', + class: 8, symbol: 'N', nr: 9, metro: false,