mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
19 lines
486 B
JavaScript
19 lines
486 B
JavaScript
'use strict'
|
|
|
|
const formatTripReq = ({opt}, id, lineName) => {
|
|
return {
|
|
cfg: {polyEnc: 'GPA'},
|
|
meth: 'JourneyDetails',
|
|
req: {
|
|
// todo: getTrainComposition
|
|
jid: id,
|
|
name: lineName,
|
|
// HAFAS apparently ignores the date in the trip ID and uses the `date` field.
|
|
// Thus, it will find a different trip if you pass the wrong date via `opt.when`.
|
|
// date: profile.formatDate(profile, opt.when),
|
|
getPolyline: !!opt.polyline
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = formatTripReq
|