From 8b87868fba03777201a6508fb56e9128cd8da96b Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 21 Nov 2018 19:54:59 +0100 Subject: [PATCH] adapt docs & examples to bad0af8 :memo: --- docs/readme.md | 2 +- docs/{station.md => stop.md} | 10 +++++----- p/bvg/example.js | 2 +- p/cmta/example.js | 2 +- p/db/example.js | 2 +- p/insa/example.js | 2 +- p/nahsh/example.js | 2 +- p/oebb/example.js | 2 +- p/sbahn-muenchen/example.js | 2 +- p/vbb/example.js | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) rename docs/{station.md => stop.md} (84%) diff --git a/docs/readme.md b/docs/readme.md index 06da9acc..bf5bcf70 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -6,7 +6,7 @@ - [`departures(station, [opt])`](departures.md) – query the next departures at a station - [`arrivals(station, [opt])`](arrivals.md) – query the next arrivals at a station - [`locations(query, [opt])`](locations.md) – find stations, POIs and addresses -- [`station(id, [opt])`](station.md) – get details about a station +- [`stop(id, [opt])`](stop.md) – get details about a stop/station - [`nearby(location, [opt])`](nearby.md) – show stations & POIs around - [`radar(north, west, south, east, [opt])`](radar.md) – find all vehicles currently in a certain area - [`reachableFrom(address, [opt])`](reachable-from.md) – get all stations reachable from an address within `n` minutes diff --git a/docs/station.md b/docs/stop.md similarity index 84% rename from docs/station.md rename to docs/stop.md index 831d6ff9..4a349e68 100644 --- a/docs/station.md +++ b/docs/stop.md @@ -1,12 +1,12 @@ -# `station(id, [opt])` +# `stop(id, [opt])` `id` must be in one of these formats: ```js -// a station ID, in a format compatible with the profile you use +// a stop/station ID, in a format compatible with the profile you use '900000123456' -// an FPTF `station` object +// an FPTF `stop`/`station` object { type: 'station', id: '900000123456', @@ -23,7 +23,7 @@ With `opt`, you can override the default options, which look like this: ```js { - stationLines: false, // parse & expose lines of the station? + stationLines: false, // parse & expose lines of the stop/station? language: 'en' // language to get results in } ``` @@ -38,7 +38,7 @@ const vbbProfile = require('hafas-client/p/vbb') const client = createClient(vbbProfile, 'my-awesome-program') -client.station('900000042101') // U Spichernstr. +client.stop('900000042101') // U Spichernstr. .then(console.log) .catch(console.error) ``` diff --git a/p/bvg/example.js b/p/bvg/example.js index a7756044..779a7e1b 100644 --- a/p/bvg/example.js +++ b/p/bvg/example.js @@ -10,7 +10,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // client.departures('900000013102', {duration: 1}) // client.arrivals('900000013102', {duration: 10, stationLines: true}) // client.locations('Alexanderplatz', {results: 2}) -// client.station('900000042101', {stationLines: true}) // Spichernstr +// client.stop('900000042101', {stationLines: true}) // Spichernstr // client.nearby({ // type: 'location', // latitude: 52.5137344, diff --git a/p/cmta/example.js b/p/cmta/example.js index 1a77100a..dfce9e9a 100644 --- a/p/cmta/example.js +++ b/p/cmta/example.js @@ -10,7 +10,7 @@ client.journeys('000002370', '000005919', {results: 1, polylines: true}) // client.departures('000002370', {duration: 1}) // client.arrivals('000002370', {duration: 10, stationLines: true}) // client.locations('Westgate', {results: 2}) -// client.station('000005534') // Downtown light rail station +// client.stop('000005534') // Downtown light rail station // client.nearby({ // type: 'location', // latitude: 30.266222, diff --git a/p/db/example.js b/p/db/example.js index 60e2e28d..380e01a6 100644 --- a/p/db/example.js +++ b/p/db/example.js @@ -11,7 +11,7 @@ client.journeys('8011167', '8000261', {results: 1, tickets: true}) // client.arrivals('8011167', {duration: 10, stationLines: true}) // client.locations('Berlin Jungfernheide') // client.locations('Atze Musiktheater', {poi: true, addressses: false, fuzzy: false}) -// client.station('8000309') // Regensburg Hbf +// client.stop('8000309') // Regensburg Hbf // client.nearby({ // type: 'location', // latitude: 52.4751309, diff --git a/p/insa/example.js b/p/insa/example.js index 9af0cc76..4901dcc5 100644 --- a/p/insa/example.js +++ b/p/insa/example.js @@ -11,7 +11,7 @@ client.journeys('008010226', '008013456', {results: 1}) // client.arrivals('8010226', {duration: 10, stationLines: true}) // client.locations('Magdeburg Hbf', {results: 2}) // client.locations('Kunstmuseum Kloster Unser Lieben Frauen Magdeburg', {results: 2}) -// client.station('008010226') // Magdeburg-Neustadt +// client.stop('008010226') // Magdeburg-Neustadt // client.nearby({ // type: 'location', // latitude: 52.148842, diff --git a/p/nahsh/example.js b/p/nahsh/example.js index 9a684c4c..ef873e31 100644 --- a/p/nahsh/example.js +++ b/p/nahsh/example.js @@ -11,7 +11,7 @@ client.journeys('8000103', '8000199', {results: 10, tickets: true}) // client.arrivals('8000199', {duration: 5, stationLines: true}) // client.trip('1|30161|5|100|14032018', 'Bus 52') // client.locations('Schleswig', {results: 1}) -// client.station('706990') // Kiel Holunderbusch +// client.stop('706990') // Kiel Holunderbusch // client.nearby({ // type: 'location', // latitude: 54.295691, diff --git a/p/oebb/example.js b/p/oebb/example.js index 196ac0b8..baf59a80 100644 --- a/p/oebb/example.js +++ b/p/oebb/example.js @@ -10,7 +10,7 @@ client.journeys('1291501', '8100002', {results: 1}) // client.departures('8100002', {duration: 1}) // client.arrivals('8100002', {duration: 10, stationLines: true}) // client.locations('Salzburg', {results: 2}) -// client.station('8100173') // Graz Hbf +// client.stop('8100173') // Graz Hbf // client.nearby({ // type: 'location', // latitude: 47.812851, diff --git a/p/sbahn-muenchen/example.js b/p/sbahn-muenchen/example.js index 924c6eab..d6bb46d2 100644 --- a/p/sbahn-muenchen/example.js +++ b/p/sbahn-muenchen/example.js @@ -10,7 +10,7 @@ const client = createClient(vbbProfile, 'hafas-client-example') client.departures('8004154', {duration: 5}) // client.arrivals('8004154', {duration: 10, stationLines: true}) // client.locations('mittersendling', {results: 5}) -// client.station('8004154', {stationLines: true}) // Mittersendling +// client.stop('8004154', {stationLines: true}) // Mittersendling // client.nearby({ // type: 'location', // latitude: 48.153858, diff --git a/p/vbb/example.js b/p/vbb/example.js index a7756044..779a7e1b 100644 --- a/p/vbb/example.js +++ b/p/vbb/example.js @@ -10,7 +10,7 @@ client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // client.departures('900000013102', {duration: 1}) // client.arrivals('900000013102', {duration: 10, stationLines: true}) // client.locations('Alexanderplatz', {results: 2}) -// client.station('900000042101', {stationLines: true}) // Spichernstr +// client.stop('900000042101', {stationLines: true}) // Spichernstr // client.nearby({ // type: 'location', // latitude: 52.5137344,