From 0c3e3cb0cfdd28d9b317a28ab76301e2412ad103 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 7 Mar 2018 13:32:40 +0100 Subject: [PATCH] journeys collection as an option --- index.js | 2 +- lib/default-profile.js | 1 + p/vbb/index.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 4861c6b4..158d0151 100644 --- a/index.js +++ b/index.js @@ -113,7 +113,6 @@ const createClient = (profile, request = _request) => { outDate: profile.formatDate(profile, when), outTime: profile.formatTime(profile, when), ctxScr: journeysRef, - // numF: opt.results, getPasslist: !!opt.passedStations, maxChg: opt.transfers, minChgTime: opt.transferTime, @@ -129,6 +128,7 @@ const createClient = (profile, request = _request) => { getIV: false, // todo: walk & bike as alternatives? getPolyline: false // todo: shape for displaying on a map? } + if (profile.journeysNumF) query.numF = opt.results return request(profile, { cfg: {polyEnc: 'GPA'}, diff --git a/lib/default-profile.js b/lib/default-profile.js index 7abcf60d..cf8493d8 100644 --- a/lib/default-profile.js +++ b/lib/default-profile.js @@ -59,6 +59,7 @@ const defaultProfile = { formatRectangle, filters, + journeysNumF: true, // `journeys()` method: support for `numF` field journeyLeg: false, radar: false } diff --git a/p/vbb/index.js b/p/vbb/index.js index 8ec996a2..307ba0f4 100644 --- a/p/vbb/index.js +++ b/p/vbb/index.js @@ -189,6 +189,7 @@ const vbbProfile = { formatStation, formatProducts, + journeysNumF: false, journeyLeg: true, radar: true }