DB readme: document loyaltyCard option 📝

[ci skip]
This commit is contained in:
Jannis R 2018-12-12 16:36:24 +01:00
parent 51bd438681
commit 215fce004b
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -19,3 +19,13 @@ const client = createClient(dbProfile, 'my-awesome-program')
- 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`
## Using the `loyaltyCard` option
```js
const {data: loyaltyCards} = require('hafas-client/p/db/loyalty-cards')
hafas.journeys(from, to, {
loyaltyCard: {type: data.BAHNCARD, discount: 25}
})
```