DB: 1.16 protocol, enable journeyLeg, 2.8.0

Although `journeyLeg()` can be unreliable for DB (#49), I enabled
it here. This is not a breaking change because, previously, you
were not able to use `journeyLeg()` in the first place. Let's hope
that it works for people. 🙈

By changing to the 1.16 protocol, we support the `polyline` option
of `journeyLeg()` as well.
This commit is contained in:
Jannis R 2018-05-24 13:48:42 +02:00
parent 908d53189a
commit 16c3f01118
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 5 additions and 3 deletions

View file

@ -15,7 +15,7 @@ const formatBitmask = createFormatBitmask(modes)
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
@ -145,7 +145,9 @@ const dbProfile = {
parseJourney: createParseJourney, parseJourney: createParseJourney,
formatStation, formatStation,
formatProducts formatProducts,
journeyLeg: true // todo: #49
} }
module.exports = dbProfile module.exports = dbProfile

View file

@ -1,7 +1,7 @@
{ {
"name": "hafas-client", "name": "hafas-client",
"description": "JavaScript client for HAFAS public transport APIs.", "description": "JavaScript client for HAFAS public transport APIs.",
"version": "2.7.5", "version": "2.8.0",
"main": "index.js", "main": "index.js",
"files": [ "files": [
"index.js", "index.js",