option: departures/arrivals at related stations

With default `true`
- because it seems to be the sensible default configuration
- to stay backwards-compatible
This commit is contained in:
Jannis R 2018-07-10 18:59:54 +02:00
parent 90519cff68
commit 1551943fdb
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -35,7 +35,10 @@ const createClient = (profile, request = _request) => {
direction: null, // only show departures heading to this station direction: null, // only show departures heading to this station
duration: 10, // show departures for the next n minutes duration: 10, // show departures for the next n minutes
stationLines: false, // parse & expose lines of the station? stationLines: false, // parse & expose lines of the station?
remarks: true // parse & expose hints & warnings? remarks: true, // parse & expose hints & warnings?
// departures at related stations
// e.g. those that belong together on the metro map.
includeRelatedStations: true
}, opt) }, opt)
opt.when = new Date(opt.when || Date.now()) opt.when = new Date(opt.when || Date.now())
if (Number.isNaN(+opt.when)) throw new Error('opt.when is invalid') if (Number.isNaN(+opt.when)) throw new Error('opt.when is invalid')
@ -52,7 +55,8 @@ const createClient = (profile, request = _request) => {
dirLoc: dir, dirLoc: dir,
jnyFltrL: [products], jnyFltrL: [products],
dur: opt.duration, dur: opt.duration,
getPasslist: false // todo: what is this? getPasslist: false, // todo: what is this?
stbFltrEquiv: !opt.includeRelatedStations
} }
}) })
.then((d) => { .then((d) => {