mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
parent
78bbf9b66c
commit
92f1831c72
1 changed files with 11 additions and 1 deletions
|
@ -23,7 +23,6 @@ With `opt`, you can override the default options, which look like this:
|
|||
|
||||
```js
|
||||
{
|
||||
// todo: products
|
||||
when: new Date(),
|
||||
direction: null, // only show departures heading to this station
|
||||
line: null, // filter by line ID
|
||||
|
@ -41,6 +40,17 @@ With `opt`, you can override the default options, which look like this:
|
|||
}
|
||||
```
|
||||
|
||||
If you pass an object `opt.products`, its fields will partially override the default products defined in the profile. An example with the [BVG profile](../p/bvg):
|
||||
|
||||
```js
|
||||
const createClient = require('hafas-client')
|
||||
const vbbProfile = require('hafas-client/p/vbb')
|
||||
const client = createClient(vbbProfile, 'my-awesome-program')
|
||||
|
||||
// will query with these products: suburban, subway, bus, express, regional
|
||||
client.departures('900000024101', {products: {tram: false, ferry: false}})
|
||||
```
|
||||
|
||||
## Response
|
||||
|
||||
*Note:* As stated in the [*Friendly Public Transport Format* `1.2.0`](https://github.com/public-transport/friendly-public-transport-format/tree/1.2.0), the `when` field includes the current delay. The `delay` field, if present, expresses how much the former differs from the schedule.
|
||||
|
|
Loading…
Add table
Reference in a new issue