db-vendo-client/p/zvv/index.js

38 lines
822 B
JavaScript
Raw Normal View History

2020-07-20 17:35:32 +02:00
'use strict'
const products = require('./products')
const transformReqBody = (ctx, body) => {
body.client = {type: 'IPH', id: 'ZVV', name: 'zvvPROD-STORE', v: '6000400'}
body.ext = 'ZVV.2'
body.ver = '1.24'
body.auth = {type: 'AID', aid: 'TLRUqdDPF7ttB824Yoy2BN8mk'}
return body
}
const zvvProfile = {
locale: 'de-CH',
timezone: 'Europe/Zurich',
endpoint: 'https://online.fahrplan.zvv.ch/bin/mgate.exe',
// https://runkit.com/derhuerst/hafas-decrypt-encrypted-mac-salt
salt: Buffer.from('jCcZ864meuAbqGZ', 'utf-8'),
addMicMac: true,
transformReqBody,
products,
departuresGetPasslist: false,
departuresStbFltrEquiv: false,
trip: true,
radar: true,
// todo: fails with "Parser error: root.svcReqL.svcReqL.req(ctxRecon)"
refreshJourney: false,
reachableFrom: true,
}
module.exports = zvvProfile