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

40 lines
882 B
JavaScript
Raw Normal View History

2018-11-12 13:45:29 +01:00
'use strict'
const products = require('./products')
const transformReqBody = (ctx, body) => {
body.client = {
type: 'IPH',
id: 'INVG',
name: 'invgPROD-APPSTORE-LIVE',
v: '1040000'
}
body.ver = '1.16'
body.auth = {type: 'AID', aid: 'GITvwi3BGOmTQ2a5'}
return body
}
const invgProfile = {
locale: 'de-DE',
timezone: 'Europe/Berlin',
endpoint: 'https://fpa.invg.de/bin/mgate.exe',
// https://github.com/public-transport/hafas-client/issues/93#issuecomment-437594291
// https://runkit.com/derhuerst/hafas-decrypt-encrypted-mac-salt
// https://gist.github.com/derhuerst/840c72ad19065f6c55657cf1bc7aa52a#file-config-txt-L23-L24
salt: Buffer.from('ERxotxpwFT7uYRsI', 'utf8'),
addMicMac: true,
transformReqBody,
products,
trip: true,
radar: true,
2020-09-16 17:21:59 +02:00
refreshJourney: true,
remarks: false, // seems like ver >= 1.20 is required
2018-11-12 13:45:29 +01:00
}
module.exports = invgProfile