db-vendo-client/p/db/readme.md

22 lines
848 B
Markdown
Raw Normal View History

2017-12-17 17:48:21 +01:00
# DB profile for `hafas-client`
[*Deutsche Bahn (DB)*](https://en.wikipedia.org/wiki/Deutsche_Bahn) is the largest German long-distance public transport company. This profile adds *DB*-specific customizations to `hafas-client`. Consider using [`db-hafas`](https://github.com/derhuerst/db-hafas#db-hafas), to always get the customized client right away.
2017-12-17 17:48:21 +01:00
## Usage
```js
const createClient = require('hafas-client')
const dbProfile = require('hafas-client/p/db')
// create a client with DB profile
2018-07-28 14:55:14 +02:00
const client = createClient(dbProfile, 'my-awesome-program')
2017-12-17 17:48:21 +01:00
```
## Customisations
- supports 1st and 2nd class with `journey()`
- supports [their loyalty cards](https://en.wikipedia.org/wiki/Deutsche_Bahn#Tickets) with `journey()`
- parses *DB*-specific products (such as *InterCity-Express*)
- exposes the cheapest ticket price for a `journey`