mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
ÖBB: change ver to 1.33 🐛, enable remarks(), update client info
fixes #213
This commit is contained in:
parent
92f1831c72
commit
7025d3bc01
2 changed files with 12 additions and 10 deletions
|
@ -10,17 +10,18 @@ const _parseMovement = require('../../parse/movement')
|
||||||
const products = require('./products')
|
const products = require('./products')
|
||||||
|
|
||||||
const transformReqBody = (ctx, body) => {
|
const transformReqBody = (ctx, body) => {
|
||||||
// todo: necessary headers?
|
|
||||||
body.client = {
|
body.client = {
|
||||||
type: 'IPA',
|
type: 'IPH',
|
||||||
id: 'OEBB',
|
id: 'OEBB',
|
||||||
v: '6000500',
|
v: '6030600',
|
||||||
name: 'oebbIPAD_ADHOC',
|
name: 'oebbPROD-ADHOC',
|
||||||
os: 'iOS 10.3.3'
|
os: 'iOS 14.3',
|
||||||
|
}
|
||||||
|
body.ver = '1.33'
|
||||||
|
body.auth = {
|
||||||
|
type: 'AID',
|
||||||
|
aid: 'OWDL4fE4ixNiPBBm',
|
||||||
}
|
}
|
||||||
// todo: https://gist.github.com/anonymous/a5fc856bc80ae7364721943243f934f4#file-haf_config_base-properties-L33 shows 1.16
|
|
||||||
body.ver = '1.16'
|
|
||||||
body.auth = {aid: 'OWDL4fE4ixNiPBBm'}
|
|
||||||
body.lang = 'de'
|
body.lang = 'de'
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
@ -71,10 +72,12 @@ const oebbProfile = {
|
||||||
parseLocation: parseHook(_parseLocation, fixWeirdPOIs),
|
parseLocation: parseHook(_parseLocation, fixWeirdPOIs),
|
||||||
parseMovement: parseHook(_parseMovement, fixMovement),
|
parseMovement: parseHook(_parseMovement, fixMovement),
|
||||||
|
|
||||||
|
departuresGetPasslist: false,
|
||||||
|
departuresStbFltrEquiv: false,
|
||||||
|
refreshJourneyUseOutReconL: true,
|
||||||
trip: true,
|
trip: true,
|
||||||
radar: true,
|
radar: true,
|
||||||
reachableFrom: true,
|
reachableFrom: true,
|
||||||
remarks: false, // seems like ver >= 1.20 is required
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = oebbProfile
|
module.exports = oebbProfile
|
||||||
|
|
|
@ -252,7 +252,6 @@ test('departures at Wien Leibenfrostgasse', async (t) => {
|
||||||
|
|
||||||
const deps = await client.departures(wienLeibenfrostgasse, {
|
const deps = await client.departures(wienLeibenfrostgasse, {
|
||||||
duration: 15, when,
|
duration: 15, when,
|
||||||
stopovers: true
|
|
||||||
})
|
})
|
||||||
|
|
||||||
validate(t, deps, 'departures', 'departures')
|
validate(t, deps, 'departures', 'departures')
|
||||||
|
|
Loading…
Add table
Reference in a new issue