mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
refactor
This commit is contained in:
parent
b20cf1060a
commit
883eb8c8de
8 changed files with 29 additions and 12 deletions
|
@ -2,10 +2,6 @@ import {request} from '../lib/request.js';
|
|||
import {products} from '../lib/products.js';
|
||||
import {ageGroup, ageGroupFromAge, ageGroupLabel} from './age-group.js';
|
||||
|
||||
import {formatStationBoardReq} from '../format/station-board-req.js';
|
||||
import {formatTripReq} from '../format/trip-req.js';
|
||||
import {formatNearbyReq} from '../format/nearby-req.js';
|
||||
|
||||
import {parseDateTime} from '../parse/date-time.js';
|
||||
import {parsePlatform} from '../parse/platform.js';
|
||||
import {parseProducts} from '../parse/products.js';
|
||||
|
@ -61,13 +57,13 @@ const defaultProfile = {
|
|||
logRequest,
|
||||
logResponse,
|
||||
|
||||
formatStationBoardReq,
|
||||
formatLocationsReq: notImplemented,
|
||||
formatStopReq: notImplemented,
|
||||
formatTripReq,
|
||||
formatNearbyReq,
|
||||
formatJourneysReq: notImplemented,
|
||||
formatRefreshJourneyReq: notImplemented,
|
||||
formatTripReq: notImplemented,
|
||||
formatNearbyReq: notImplemented,
|
||||
formatLocationsReq: notImplemented,
|
||||
formatStopReq: notImplemented,
|
||||
formatStationBoardReq: notImplemented,
|
||||
transformJourneysQuery: id,
|
||||
|
||||
parseDateTime,
|
||||
|
|
|
@ -30,6 +30,7 @@ const tripEndpoint_dbnav = dbnavBase.tripEndpoint;
|
|||
const tripEndpoint_dbregioguide = dbregioguideBase.tripEndpoint;
|
||||
|
||||
// arrivals(), departures()
|
||||
import {formatStationBoardReq} from '../dbregioguide/station-board-req.js';
|
||||
const {boardEndpoint} = dbregioguideBase;
|
||||
|
||||
const profile = {
|
||||
|
@ -56,6 +57,7 @@ const profile = {
|
|||
formatTripReq,
|
||||
tripEndpoint_dbnav, tripEndpoint_dbregioguide,
|
||||
|
||||
formatStationBoardReq,
|
||||
boardEndpoint,
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import baseProfile from './base.json' with { type: 'json' };
|
||||
import {products} from '../../lib/products.js';
|
||||
import {formatTripReq} from './trip-req.js';
|
||||
import {formatStationBoardReq} from './station-board-req.js';
|
||||
|
||||
const profile = {
|
||||
...baseProfile,
|
||||
|
@ -9,6 +10,21 @@ const profile = {
|
|||
|
||||
products,
|
||||
formatTripReq,
|
||||
formatStationBoardReq,
|
||||
|
||||
journeysOutFrwd: false,
|
||||
departuresGetPasslist: false,
|
||||
departuresStbFltrEquiv: true,
|
||||
trip: false,
|
||||
radar: false,
|
||||
refreshJourney: false,
|
||||
journeysFromTrip: false,
|
||||
refreshJourneyUseOutReconL: false,
|
||||
tripsByName: false,
|
||||
remarks: false,
|
||||
remarksGetPolyline: false,
|
||||
reachableFrom: false,
|
||||
lines: false,
|
||||
};
|
||||
|
||||
export {
|
||||
|
|
|
@ -9,10 +9,9 @@ const profile = {
|
|||
|
||||
products,
|
||||
|
||||
|
||||
formatStationBoardReq,
|
||||
|
||||
journeysOutFrwd: true,
|
||||
journeysOutFrwd: false,
|
||||
departuresGetPasslist: true,
|
||||
departuresStbFltrEquiv: true,
|
||||
trip: false,
|
||||
|
|
|
@ -4,6 +4,8 @@ import {formatJourneysReq, formatRefreshJourneyReq} from './journeys-req.js';
|
|||
import {formatLocationFilter} from './location-filter.js';
|
||||
import {formatLocationsReq} from './locations-req.js';
|
||||
import {formatStationBoardReq} from './station-board-req.js';
|
||||
import {formatTripReq} from './trip-req.js';
|
||||
import {formatNearbyReq} from './nearby-req.js';
|
||||
|
||||
const profile = {
|
||||
...baseProfile,
|
||||
|
@ -14,9 +16,11 @@ const profile = {
|
|||
|
||||
formatJourneysReq,
|
||||
formatRefreshJourneyReq,
|
||||
formatTripReq,
|
||||
formatNearbyReq,
|
||||
formatLocationsReq,
|
||||
formatLocationFilter,
|
||||
formatStationBoardReq,
|
||||
formatLocationFilter,
|
||||
|
||||
departuresGetPasslist: true,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue