journeys collection as an option

This commit is contained in:
Jannis R 2018-03-07 13:32:40 +01:00
parent 95833edd21
commit 0c3e3cb0cf
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
3 changed files with 3 additions and 1 deletions

View file

@ -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'},

View file

@ -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
} }

View file

@ -189,6 +189,7 @@ const vbbProfile = {
formatStation, formatStation,
formatProducts, formatProducts,
journeysNumF: false,
journeyLeg: true, journeyLeg: true,
radar: true radar: true
} }