mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
minor readme/documentation tweaks 📝
- stop(): add `remarks: true` default - journeys(): more intuitive options order - readme: fix build status badge
This commit is contained in:
parent
e02a20b1de
commit
b302ba75d2
3 changed files with 10 additions and 9 deletions
|
@ -55,6 +55,9 @@ With `opt`, you can override the default options, which look like this:
|
||||||
transferTime: 0, // minimum time for a single transfer in minutes
|
transferTime: 0, // minimum time for a single transfer in minutes
|
||||||
accessibility: 'none', // 'none', 'partial' or 'complete'
|
accessibility: 'none', // 'none', 'partial' or 'complete'
|
||||||
bike: false, // only bike-friendly journeys
|
bike: false, // only bike-friendly journeys
|
||||||
|
walkingSpeed: 'normal', // 'slow', 'normal', 'fast'
|
||||||
|
// Consider walking to nearby stations at the beginning of a journey?
|
||||||
|
startWithWalking: true,
|
||||||
products: {
|
products: {
|
||||||
// these entries may vary from profile to profile
|
// these entries may vary from profile to profile
|
||||||
suburban: true,
|
suburban: true,
|
||||||
|
@ -68,11 +71,8 @@ With `opt`, you can override the default options, which look like this:
|
||||||
tickets: false, // return tickets? only available with some profiles
|
tickets: false, // return tickets? only available with some profiles
|
||||||
polylines: false, // return a shape for each leg?
|
polylines: false, // return a shape for each leg?
|
||||||
remarks: true, // parse & expose hints & warnings?
|
remarks: true, // parse & expose hints & warnings?
|
||||||
// Consider walking to nearby stations at the beginning of a journey?
|
scheduledDays: false, // parse which days each journey is valid on
|
||||||
walkingSpeed: 'normal', // 'slow', 'normal', 'fast'
|
|
||||||
startWithWalking: true,
|
|
||||||
language: 'en', // language to get results in
|
language: 'en', // language to get results in
|
||||||
scheduledDays: false // parse which days each journey is valid on
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
9
index.js
9
index.js
|
@ -121,12 +121,12 @@ const createClient = (profile, userAgent, opt = {}) => {
|
||||||
// todo: does this work with every endpoint?
|
// todo: does this work with every endpoint?
|
||||||
accessibility: 'none', // 'none', 'partial' or 'complete'
|
accessibility: 'none', // 'none', 'partial' or 'complete'
|
||||||
bike: false, // only bike-friendly journeys
|
bike: false, // only bike-friendly journeys
|
||||||
tickets: false, // return tickets?
|
|
||||||
polylines: false, // return leg shapes?
|
|
||||||
remarks: true, // parse & expose hints & warnings?
|
|
||||||
walkingSpeed: 'normal', // 'slow', 'normal', 'fast'
|
walkingSpeed: 'normal', // 'slow', 'normal', 'fast'
|
||||||
// Consider walking to nearby stations at the beginning of a journey?
|
// Consider walking to nearby stations at the beginning of a journey?
|
||||||
startWithWalking: true,
|
startWithWalking: true,
|
||||||
|
tickets: false, // return tickets?
|
||||||
|
polylines: false, // return leg shapes?
|
||||||
|
remarks: true, // parse & expose hints & warnings?
|
||||||
scheduledDays: false
|
scheduledDays: false
|
||||||
}, opt)
|
}, opt)
|
||||||
if (opt.via) opt.via = profile.formatLocation(profile, opt.via, 'opt.via')
|
if (opt.via) opt.via = profile.formatLocation(profile, opt.via, 'opt.via')
|
||||||
|
@ -299,7 +299,8 @@ const createClient = (profile, userAgent, opt = {}) => {
|
||||||
else throw new TypeError('stop must be an object or a string.')
|
else throw new TypeError('stop must be an object or a string.')
|
||||||
|
|
||||||
opt = Object.assign({
|
opt = Object.assign({
|
||||||
linesOfStops: false // parse & expose lines at the stop/station?
|
linesOfStops: false, // parse & expose lines at the stop/station?
|
||||||
|
remarks: true, // parse & expose hints & warnings?
|
||||||
}, opt)
|
}, opt)
|
||||||
|
|
||||||
const req = profile.formatStopReq({profile, opt}, stop)
|
const req = profile.formatStopReq({profile, opt}, stop)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**A client for the "mobile APIs" of [HAFAS](https://de.wikipedia.org/wiki/HAFAS) public transport management systems**.
|
**A client for the "mobile APIs" of [HAFAS](https://de.wikipedia.org/wiki/HAFAS) public transport management systems**.
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/hafas-client)
|
[](https://www.npmjs.com/package/hafas-client)
|
||||||
[](https://travis-ci.org/public-transport/hafas-client)
|
[](https://travis-ci.org/public-transport/hafas-client)
|
||||||

|

|
||||||
[](https://gitter.im/public-transport/Lobby)
|
[](https://gitter.im/public-transport/Lobby)
|
||||||
[](https://github.com/sponsors/derhuerst)
|
[](https://github.com/sponsors/derhuerst)
|
||||||
|
|
Loading…
Add table
Reference in a new issue