mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
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:
parent
90519cff68
commit
1551943fdb
1 changed files with 6 additions and 2 deletions
8
index.js
8
index.js
|
@ -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) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue