mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
journeys collection as an option
This commit is contained in:
parent
95833edd21
commit
0c3e3cb0cf
3 changed files with 3 additions and 1 deletions
2
index.js
2
index.js
|
@ -113,7 +113,6 @@ const createClient = (profile, request = _request) => {
|
||||||
outDate: profile.formatDate(profile, when),
|
outDate: profile.formatDate(profile, when),
|
||||||
outTime: profile.formatTime(profile, when),
|
outTime: profile.formatTime(profile, when),
|
||||||
ctxScr: journeysRef,
|
ctxScr: journeysRef,
|
||||||
// numF: opt.results,
|
|
||||||
getPasslist: !!opt.passedStations,
|
getPasslist: !!opt.passedStations,
|
||||||
maxChg: opt.transfers,
|
maxChg: opt.transfers,
|
||||||
minChgTime: opt.transferTime,
|
minChgTime: opt.transferTime,
|
||||||
|
@ -129,6 +128,7 @@ const createClient = (profile, request = _request) => {
|
||||||
getIV: false, // todo: walk & bike as alternatives?
|
getIV: false, // todo: walk & bike as alternatives?
|
||||||
getPolyline: false // todo: shape for displaying on a map?
|
getPolyline: false // todo: shape for displaying on a map?
|
||||||
}
|
}
|
||||||
|
if (profile.journeysNumF) query.numF = opt.results
|
||||||
|
|
||||||
return request(profile, {
|
return request(profile, {
|
||||||
cfg: {polyEnc: 'GPA'},
|
cfg: {polyEnc: 'GPA'},
|
||||||
|
|
|
@ -59,6 +59,7 @@ const defaultProfile = {
|
||||||
formatRectangle,
|
formatRectangle,
|
||||||
filters,
|
filters,
|
||||||
|
|
||||||
|
journeysNumF: true, // `journeys()` method: support for `numF` field
|
||||||
journeyLeg: false,
|
journeyLeg: false,
|
||||||
radar: false
|
radar: false
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,6 +189,7 @@ const vbbProfile = {
|
||||||
formatStation,
|
formatStation,
|
||||||
formatProducts,
|
formatProducts,
|
||||||
|
|
||||||
|
journeysNumF: false,
|
||||||
journeyLeg: true,
|
journeyLeg: true,
|
||||||
radar: true
|
radar: true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue