mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
DB readme: document loyaltyCard option 📝
[ci skip]
This commit is contained in:
parent
51bd438681
commit
215fce004b
1 changed files with 10 additions and 0 deletions
|
@ -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()`
|
- supports [their loyalty cards](https://en.wikipedia.org/wiki/Deutsche_Bahn#Tickets) with `journey()`
|
||||||
- parses *DB*-specific products (such as *InterCity-Express*)
|
- parses *DB*-specific products (such as *InterCity-Express*)
|
||||||
- exposes the cheapest ticket price for a `journey`
|
- 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}
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue