db-vendo-client/p/db
Jannis R 16c3f01118
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.
2018-05-24 13:50:53 +02:00
..
example.js location method: docs 📝 2018-01-26 17:24:02 +01:00
index.js DB: 1.16 protocol, enable journeyLeg, 2.8.0 2018-05-24 13:50:53 +02:00
loyalty-cards.js DB profile 2017-11-12 23:51:41 +01:00
modes.js DB: tram mode should be train 🐛 2018-04-24 17:04:55 +02:00
readme.md docs: methods, usage examples, more related projects 2017-12-17 20:04:17 +01:00

DB profile for hafas-client

Deutsche Bahn (DB) is the largest German long-distance public transport company. This profile adds DB-specific customizations to hafas-client. Consider using db-hafas, to always get the customized client right away.

Usage

const createClient = require('hafas-client')
const dbProfile = require('hafas-client/p/db')

// create a client with DB profile
const client = createClient(dbProfile)

Customisations

  • supports 1st and 2nd class with journey()
  • supports their loyalty cards with journey()
  • parses DB-specific products (such as InterCity-Express)
  • exposes the cheapest ticket price for a journey