diff --git a/docs/departures.md b/docs/departures.md index 32058896..bbd8b931 100644 --- a/docs/departures.md +++ b/docs/departures.md @@ -27,7 +27,7 @@ With `opt`, you can override the default options, which look like this: when: new Date(), direction: null, // only show departures heading to this station duration: 10, // show departures for the next n minutes - stationLines: false, // parse & expose lines of the station? + linesOfStops: false, // parse & expose lines at the stop/station? remarks: true, // parse & expose hints & warnings? stopovers: false, // fetch & parse previous/next stopovers? // departures at related stations diff --git a/docs/locations.md b/docs/locations.md index 000164bd..8f0f7508 100644 --- a/docs/locations.md +++ b/docs/locations.md @@ -11,7 +11,7 @@ With `opt`, you can override the default options, which look like this: , stops: true // return stops/stations? , addresses: true , poi: true // points of interest - , stationLines: false // parse & expose lines of the station? + , linesOfStops: false // parse & expose lines at each stop/station? , language: 'en' // language to get results in } ``` diff --git a/docs/nearby.md b/docs/nearby.md index a732e93d..eb9ce2eb 100644 --- a/docs/nearby.md +++ b/docs/nearby.md @@ -12,7 +12,7 @@ With `opt`, you can override the default options, which look like this: distance: null, // maximum walking distance in meters poi: false, // return points of interest? stops: true, // return stops/stations? - stationLines: false, // parse & expose lines of the station? + linesOfStops: false, // parse & expose lines at each stop/station? language: 'en' // language to get results in } ``` diff --git a/docs/stop.md b/docs/stop.md index 097f2e7e..01206803 100644 --- a/docs/stop.md +++ b/docs/stop.md @@ -23,7 +23,7 @@ With `opt`, you can override the default options, which look like this: ```js { - stationLines: false, // parse & expose lines of the stop/station? + linesOfStops: false, // parse & expose lines at the stop/station? language: 'en' // language to get results in } ``` diff --git a/index.js b/index.js index dd491acb..4717c954 100644 --- a/index.js +++ b/index.js @@ -59,7 +59,7 @@ const createClient = (profile, userAgent, request = _request) => { opt = Object.assign({ direction: null, // only show departures heading to this station duration: 10, // show departures for the next n minutes - stationLines: false, // parse & expose lines of the station? + linesOfStops: false, // parse & expose lines at the stop/station? remarks: true, // parse & expose hints & warnings? stopovers: false, // fetch & parse previous/next stopovers? // departures at related stations @@ -300,7 +300,7 @@ const createClient = (profile, userAgent, request = _request) => { stops: true, // return stops/stations? addresses: true, poi: true, // points of interest - stationLines: false // parse & expose lines of the station? + linesOfStops: false // parse & expose lines at each stop/station? }, opt) const f = profile.formatLocationFilter(opt.stops, opt.addresses, opt.poi) @@ -329,7 +329,7 @@ const createClient = (profile, userAgent, request = _request) => { else throw new Error('stop must be an object or a string.') opt = Object.assign({ - stationLines: false // parse & expose lines of the stop/station? + linesOfStops: false // parse & expose lines at the stop/station? }, opt) return request(profile, userAgent, opt, { meth: 'LocDetails', @@ -354,7 +354,7 @@ const createClient = (profile, userAgent, request = _request) => { distance: null, // maximum walking distance in meters poi: false, // return points of interest? stops: true, // return stops/stations? - stationLines: false // parse & expose lines of the station? + linesOfStops: false // parse & expose lines at each stop/station? }, opt) return request(profile, userAgent, opt, { diff --git a/p/bvg/example.js b/p/bvg/example.js index 43096c10..0049af23 100644 --- a/p/bvg/example.js +++ b/p/bvg/example.js @@ -8,9 +8,9 @@ const client = createClient(vbbProfile, 'hafas-client-example') // Hauptbahnhof to Charlottenburg client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // client.departures('900000013102', {duration: 1}) -// client.arrivals('900000013102', {duration: 10, stationLines: true}) +// client.arrivals('900000013102', {duration: 10, linesOfStops: true}) // client.locations('Alexanderplatz', {results: 2}) -// client.stop('900000042101', {stationLines: true}) // Spichernstr +// client.stop('900000042101', {linesOfStops: true}) // Spichernstr // client.nearby({ // type: 'location', // latitude: 52.5137344, diff --git a/p/cmta/example.js b/p/cmta/example.js index 0906dc09..5fa32208 100644 --- a/p/cmta/example.js +++ b/p/cmta/example.js @@ -8,7 +8,7 @@ const client = createClient(cmtaProfile, 'hafas-client-example') // Broadie Oaks to Domain client.journeys('000002370', '000005919', {results: 1, polylines: true}) // client.departures('000002370', {duration: 1}) -// client.arrivals('000002370', {duration: 10, stationLines: true}) +// client.arrivals('000002370', {duration: 10, linesOfStops: true}) // client.locations('Westgate', {results: 2}) // client.stop('000005534') // Downtown light rail station // client.nearby({ diff --git a/p/db/example.js b/p/db/example.js index 380e01a6..93977b69 100644 --- a/p/db/example.js +++ b/p/db/example.js @@ -8,7 +8,7 @@ const client = createClient(dbProfile, 'hafas-client-example') // Berlin Jungfernheide to München Hbf client.journeys('8011167', '8000261', {results: 1, tickets: true}) // client.departures('8011167', {duration: 1}) -// client.arrivals('8011167', {duration: 10, stationLines: true}) +// client.arrivals('8011167', {duration: 10, linesOfStops: true}) // client.locations('Berlin Jungfernheide') // client.locations('Atze Musiktheater', {poi: true, addressses: false, fuzzy: false}) // client.stop('8000309') // Regensburg Hbf diff --git a/p/insa/example.js b/p/insa/example.js index 7f18b769..45c0c20a 100644 --- a/p/insa/example.js +++ b/p/insa/example.js @@ -8,7 +8,7 @@ const client = createClient(insaProfile, 'hafas-client-example') // from Magdeburg-Neustadt to Magdeburg-Buckau client.journeys('008010226', '008013456', {results: 1}) // client.departures('008010226', { duration: 5 }) -// client.arrivals('8010226', {duration: 10, stationLines: true}) +// client.arrivals('8010226', {duration: 10, linesOfStops: true}) // client.locations('Magdeburg Hbf', {results: 2}) // client.locations('Kunstmuseum Kloster Unser Lieben Frauen Magdeburg', {results: 2}) // client.stop('008010226') // Magdeburg-Neustadt diff --git a/p/nahsh/example.js b/p/nahsh/example.js index ef873e31..051f9632 100644 --- a/p/nahsh/example.js +++ b/p/nahsh/example.js @@ -8,7 +8,7 @@ const client = createClient(nahshProfile, 'hafas-client-example') // Flensburg Hbf to Kiel Hbf client.journeys('8000103', '8000199', {results: 10, tickets: true}) // client.departures('8000199', {duration: 10}) -// client.arrivals('8000199', {duration: 5, stationLines: true}) +// client.arrivals('8000199', {duration: 5, linesOfStops: true}) // client.trip('1|30161|5|100|14032018', 'Bus 52') // client.locations('Schleswig', {results: 1}) // client.stop('706990') // Kiel Holunderbusch diff --git a/p/oebb/example.js b/p/oebb/example.js index baf59a80..e06c6bdb 100644 --- a/p/oebb/example.js +++ b/p/oebb/example.js @@ -8,7 +8,7 @@ const client = createClient(oebbProfile, 'hafas-client-example') // Wien Westbahnhof to Salzburg Hbf client.journeys('1291501', '8100002', {results: 1}) // client.departures('8100002', {duration: 1}) -// client.arrivals('8100002', {duration: 10, stationLines: true}) +// client.arrivals('8100002', {duration: 10, linesOfStops: true}) // client.locations('Salzburg', {results: 2}) // client.stop('8100173') // Graz Hbf // client.nearby({ diff --git a/p/saarfahrplan/example.js b/p/saarfahrplan/example.js index c25bb088..58970061 100644 --- a/p/saarfahrplan/example.js +++ b/p/saarfahrplan/example.js @@ -17,7 +17,7 @@ client.journeys('15541', '10609', {results: 1}) // }) // client.departures('15541', {duration: 1}) -// client.arrivals('15541', {duration: 10, stationLines: true}) +// client.arrivals('15541', {duration: 10, linesOfStops: true}) // client.locations('uhlandstr', {results: 2}) // client.station('10609') // Uhlandstr., Saarbrücken // client.nearby({ diff --git a/p/sbahn-muenchen/example.js b/p/sbahn-muenchen/example.js index a70faac8..a1e210c2 100644 --- a/p/sbahn-muenchen/example.js +++ b/p/sbahn-muenchen/example.js @@ -8,9 +8,9 @@ const client = createClient(vbbProfile, 'hafas-client-example') // Mittersendling to Charlottenburg // client.journeys('8004154', '0621790', {results: 1, polylines: true}) client.departures('8004154', {duration: 5}) -// client.arrivals('8004154', {duration: 10, stationLines: true}) +// client.arrivals('8004154', {duration: 10, linesOfStops: true}) // client.locations('mittersendling', {results: 5}) -// client.stop('8004154', {stationLines: true}) // Mittersendling +// client.stop('8004154', {linesOfStops: true}) // Mittersendling // client.nearby({ // type: 'location', // latitude: 48.153858, diff --git a/p/vbb/example.js b/p/vbb/example.js index 43096c10..0049af23 100644 --- a/p/vbb/example.js +++ b/p/vbb/example.js @@ -8,9 +8,9 @@ const client = createClient(vbbProfile, 'hafas-client-example') // Hauptbahnhof to Charlottenburg client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // client.departures('900000013102', {duration: 1}) -// client.arrivals('900000013102', {duration: 10, stationLines: true}) +// client.arrivals('900000013102', {duration: 10, linesOfStops: true}) // client.locations('Alexanderplatz', {results: 2}) -// client.stop('900000042101', {stationLines: true}) // Spichernstr +// client.stop('900000042101', {linesOfStops: true}) // Spichernstr // client.nearby({ // type: 'location', // latitude: 52.5137344, diff --git a/parse/location.js b/parse/location.js index 200a90c1..c1e8a128 100644 --- a/parse/location.js +++ b/parse/location.js @@ -25,7 +25,7 @@ const parseLocation = (profile, opt, {lines}, l) => { if ('pCls' in l) stop.products = profile.parseProducts(l.pCls) if ( - opt.stationLines && + opt.linesOfStops && Array.isArray(l.pRefL) && Array.isArray(lines) ) {