diff --git a/format/refresh-journey-req.js b/format/refresh-journey-req.js index 5dd1c426..3fdf8ff1 100644 --- a/format/refresh-journey-req.js +++ b/format/refresh-journey-req.js @@ -4,15 +4,21 @@ const formatRefreshJourneyReq = (ctx, refreshToken) => { // eslint-disable-next-line no-unused-vars const {profile, opt} = ctx + const req = { + getIST: true, // todo: make an option + getPasslist: !!opt.stopovers, + getPolyline: !!opt.polylines, + getTariff: !!opt.tickets + } + if (profile.refreshJourneyUseOutReconL) { + req.outReconL = [{ctx: refreshToken}] + } else { + req.ctxRecon = refreshToken + } + return { meth: 'Reconstruction', - req: { - ctxRecon: refreshToken, - getIST: true, // todo: make an option - getPasslist: !!opt.stopovers, - getPolyline: !!opt.polylines, - getTariff: !!opt.tickets - } + req, } } diff --git a/lib/default-profile.js b/lib/default-profile.js index af0c427f..33f6d743 100644 --- a/lib/default-profile.js +++ b/lib/default-profile.js @@ -108,6 +108,8 @@ const defaultProfile = { trip: false, radar: false, refreshJourney: true, + // refreshJourney(): use `outReconL[]` instead of `ctxRecon`? + refreshJourneyUseOutReconL: false, tripsByName: true, remarks: true, lines: true, diff --git a/p/mobil-nrw/index.js b/p/mobil-nrw/index.js index ef4f71d6..737adcd4 100644 --- a/p/mobil-nrw/index.js +++ b/p/mobil-nrw/index.js @@ -34,6 +34,7 @@ const cflProfile = { trip: true, radar: true, reachableFrom: true, + refreshJourneyUseOutReconL: true, remarks: true, }