From 665bed9f79ae2e4fe85c324308870ca920dd82bb Mon Sep 17 00:00:00 2001 From: Jannis R Date: Mon, 4 Jun 2018 19:00:19 +0200 Subject: [PATCH] rename location(id) -> station(id) :boom: see #17 for reasons closes #17 --- index.js | 4 ++-- p/db/example.js | 2 +- p/insa/example.js | 2 +- p/nahsh/example.js | 2 +- p/oebb/example.js | 2 +- p/vbb/example.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 1db64568..4826e28d 100644 --- a/index.js +++ b/index.js @@ -221,7 +221,7 @@ const createClient = (profile, request = _request) => { }) } - const location = (station) => { + const station = (station) => { if ('object' === typeof station) station = profile.formatStation(station.id) else if ('string' === typeof station) station = profile.formatStation(station) else throw new Error('station must be an object or a string.') @@ -368,7 +368,7 @@ const createClient = (profile, request = _request) => { }) } - const client = {departures, journeys, locations, location, nearby} + const client = {departures, journeys, locations, station, nearby} if (profile.journeyLeg) client.journeyLeg = journeyLeg if (profile.radar) client.radar = radar Object.defineProperty(client, 'profile', {value: profile}) diff --git a/p/db/example.js b/p/db/example.js index f740bea9..f9fe23e6 100644 --- a/p/db/example.js +++ b/p/db/example.js @@ -10,7 +10,7 @@ client.journeys('8011167', '8000261', {results: 1, tickets: true}) // client.departures('8011167', {duration: 1}) // client.locations('Berlin Jungfernheide') // client.locations('Atze Musiktheater', {poi: true, addressses: false, fuzzy: false}) -// client.location('8000309') // Regensburg Hbf +// client.station('8000309') // Regensburg Hbf // client.nearby(52.4751309, 13.3656537, {results: 1}) .then((data) => { diff --git a/p/insa/example.js b/p/insa/example.js index 8cbe8679..2260f34b 100644 --- a/p/insa/example.js +++ b/p/insa/example.js @@ -10,7 +10,7 @@ client.journeys('008010226', '008013456', {results: 1}) // client.departures('008010226', { duration: 5 }) // client.locations('Magdeburg Hbf', {results: 2}) // client.locations('Kunstmuseum Kloster Unser Lieben Frauen Magdeburg', {results: 2}) -// client.location('008010226') // Magdeburg-Neustadt +// client.station('008010226') // Magdeburg-Neustadt // client.nearby({ // type: 'location', // latitude: 52.148842, diff --git a/p/nahsh/example.js b/p/nahsh/example.js index ada76608..f3ec6237 100644 --- a/p/nahsh/example.js +++ b/p/nahsh/example.js @@ -10,7 +10,7 @@ client.journeys('8000103', '8000199', {results: 10, tickets: true}) // client.departures('8000199', {duration: 10}) // client.journeyLeg('1|30161|5|100|14032018', 'Bus 52') // client.locations('Schleswig', {results: 1}) -// client.location('706990') // Kiel Holunderbusch +// client.station('706990') // Kiel Holunderbusch // client.nearby({type: 'location', latitude: 54.295691, longitude: 10.116424}, {distance: 60}) // client.radar(54.4, 10.0, 54.2, 10.2, {results: 10}) diff --git a/p/oebb/example.js b/p/oebb/example.js index 2dcccf39..4f780f66 100644 --- a/p/oebb/example.js +++ b/p/oebb/example.js @@ -9,7 +9,7 @@ const client = createClient(oebbProfile) client.journeys('1291501', '8100002', {results: 1}) // client.departures('8100002', {duration: 1}) // client.locations('Salzburg', {results: 2}) -// client.location('8100173') // Graz Hbf +// client.station('8100173') // Graz Hbf // client.nearby(47.812851, 13.045604, {distance: 60}) // client.radar({ // north: 47.827203, diff --git a/p/vbb/example.js b/p/vbb/example.js index 82563af6..1234692a 100644 --- a/p/vbb/example.js +++ b/p/vbb/example.js @@ -9,7 +9,7 @@ const client = createClient(vbbProfile) client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // client.departures('900000013102', {duration: 1}) // client.locations('Alexanderplatz', {results: 2}) -// client.location('900000042101') // Spichernstr +// client.station('900000042101') // Spichernstr // client.nearby(52.5137344, 13.4744798, {distance: 60}) // client.radar({ // north: 52.52411,