mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
docs for DB profile
This commit is contained in:
parent
2ae8fd2ba0
commit
bcddc49049
2 changed files with 22 additions and 1 deletions
21
p/db/readme.md
Normal file
21
p/db/readme.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# 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`.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
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](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`
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
**A client for HAFAS public transport APIs**. Sort of like [public-transport-enabler](https://github.com/schildbach/public-transport-enabler), but with a smaller scope. It also [contains customisations](p) for the following transport networks:
|
||||
|
||||
- [Deutsche Bahn](https://en.wikipedia.org/wiki/Deutsche_Bahn) – [src at `p/db`](p/db/index.js)
|
||||
- [Deutsche Bahn](https://en.wikipedia.org/wiki/Deutsche_Bahn) - [docs](p/db/readme.md) – [src](p/db/index.js)
|
||||
- [Berlin public transport](https://en.wikipedia.org/wiki/Verkehrsverbund_Berlin-Brandenburg) - [docs](p/vbb/readme.md) – [src](p/vbb/index.js)
|
||||
|
||||
[](https://www.npmjs.com/package/hafas-client)
|
||||
|
|
Loading…
Add table
Reference in a new issue