mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
profile-based whitelist for walkingSpeed
This commit is contained in:
parent
0c145d352b
commit
9a89cd0dc8
2 changed files with 9 additions and 5 deletions
7
index.js
7
index.js
|
@ -182,11 +182,14 @@ const createClient = (profile, userAgent, request = _request) => {
|
|||
if (!['slow','normal','fast'].includes(opt.walkingSpeed)) {
|
||||
throw new Error('opt.walkingSpeed must be one of these values: "slow", "normal", "fast".')
|
||||
}
|
||||
const gisFltrL = [{
|
||||
const gisFltrL = []
|
||||
if (profile.journeysWalkingSpeed) {
|
||||
gisFltrL.push({
|
||||
meta: 'foot_speed_' + opt.walkingSpeed,
|
||||
mode: 'FB',
|
||||
type: 'M'
|
||||
}]
|
||||
})
|
||||
}
|
||||
|
||||
// With protocol version `1.16`, the VBB endpoint *used to* fail with
|
||||
// `CGI_READ_FAILED` if you pass `numF`, the parameter for the number
|
||||
|
|
|
@ -142,6 +142,7 @@ const vbbProfile = {
|
|||
formatStation,
|
||||
|
||||
journeysNumF: true,
|
||||
journeysWalkingSpeed: true,
|
||||
trip: true,
|
||||
radar: true,
|
||||
reachableFrom: true
|
||||
|
|
Loading…
Add table
Reference in a new issue