db-vendo-client
Version:
Client for bahn.de public transport APIs.
18 lines (15 loc) • 317 B
JavaScript
const formatLocationsReq = (ctx, query) => {
const {profile, opt} = ctx;
return {
endpoint: profile.locationsEndpoint,
query: {
typ: profile.formatLocationFilter(opt.stops, opt.addresses, opt.poi),
suchbegriff: query,
limit: opt.results,
},
method: 'get',
};
};
export {
formatLocationsReq,
};