cherry-pick 16c3f01: DB: 1.16 protocol, journeyLeg, fix polylines 🐛

This commit is contained in:
Jannis R 2018-05-24 14:06:35 +02:00
parent 00b1eb387c
commit e479619387
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -10,7 +10,7 @@ const formatLoyaltyCard = require('./loyalty-cards').format
const transformReqBody = (body) => { const transformReqBody = (body) => {
body.client = {id: 'DB', v: '16040000', type: 'IPH', name: 'DB Navigator'} body.client = {id: 'DB', v: '16040000', type: 'IPH', name: 'DB Navigator'}
body.ext = 'DB.R15.12.a' body.ext = 'DB.R15.12.a'
body.ver = '1.15' body.ver = '1.16'
body.auth = {type: 'AID', aid: 'n91dB8Z77MLdoR0K'} body.auth = {type: 'AID', aid: 'n91dB8Z77MLdoR0K'}
return body return body
@ -34,8 +34,8 @@ const transformJourneysQuery = (query, opt) => {
return query return query
} }
const createParseJourney = (profile, stations, lines, remarks) => { const createParseJourney = (profile, stations, lines, remarks, polylines) => {
const parseJourney = _createParseJourney(profile, stations, lines, remarks) const parseJourney = _createParseJourney(profile, stations, lines, remarks, polylines)
// todo: j.sotRating, j.conSubscr, j.isSotCon, j.showARSLink, k.sotCtxt // todo: j.sotRating, j.conSubscr, j.isSotCon, j.showARSLink, k.sotCtxt
// todo: j.conSubscr, j.showARSLink, j.useableTime // todo: j.conSubscr, j.showARSLink, j.useableTime
@ -96,7 +96,9 @@ const dbProfile = {
// todo: parseLocation // todo: parseLocation
parseJourney: createParseJourney, parseJourney: createParseJourney,
formatStation formatStation,
journeyLeg: true // todo: #49
} }
module.exports = dbProfile module.exports = dbProfile