mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
journeys: don't request nr of results by default 💥
This commit is contained in:
parent
272bf64e5e
commit
baff692b70
2 changed files with 3 additions and 3 deletions
|
@ -48,7 +48,7 @@ With `opt`, you can override the default options, which look like this:
|
|||
earlierThan: null, // ref to get journeys earlier than the last query
|
||||
laterThan: null, // ref to get journeys later than the last query
|
||||
|
||||
results: 5, // how many journeys?
|
||||
results: null, // number of journeys – `null` means "whatever HAFAS returns"
|
||||
via: null, // let journeys pass this station
|
||||
stopovers: false, // return stations on the way?
|
||||
transfers: -1, // Maximum nr of transfers. Default: Let HAFAS decide.
|
||||
|
|
4
index.js
4
index.js
|
@ -133,7 +133,7 @@ const createClient = (profile, userAgent, request = _request) => {
|
|||
}
|
||||
|
||||
opt = Object.assign({
|
||||
results: 5, // how many journeys?
|
||||
results: null, // number of journeys – `null` means "whatever HAFAS returns"
|
||||
via: null, // let journeys pass this station?
|
||||
stopovers: false, // return stations on the way?
|
||||
transfers: -1, // maximum of 5 transfers
|
||||
|
@ -208,7 +208,7 @@ const createClient = (profile, userAgent, request = _request) => {
|
|||
getPolyline: !!opt.polylines
|
||||
// todo: `getConGroups: false` what is this?
|
||||
}
|
||||
if (profile.journeysNumF) query.numF = opt.results
|
||||
if (profile.journeysNumF && opt.results !== null) query.numF = opt.results
|
||||
if (profile.journeysOutFrwd) query.outFrwd = outFrwd
|
||||
|
||||
return request(profile, userAgent, opt, {
|
||||
|
|
Loading…
Add table
Reference in a new issue