db-vendo-client/format/trip-req.js

19 lines
451 B
JavaScript
Raw Normal View History

const formatTripReq = ({opt}, id) => {
2019-10-31 20:08:56 +01:00
return {
cfg: {polyEnc: 'GPA'},
meth: 'JourneyDetails',
req: {
// todo: getTrainComposition
jid: id,
// 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: Boolean(opt.polyline),
},
};
};
2019-10-31 20:08:56 +01:00
2022-05-07 16:17:37 +02:00
export {
formatTripReq,
};