mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
add dbbahnhof
This commit is contained in:
parent
883eb8c8de
commit
29aab87cdf
19 changed files with 1374 additions and 18 deletions
4
api.js
4
api.js
|
@ -3,6 +3,8 @@ import {profile as dbProfile} from './p/db/index.js';
|
|||
import {profile as dbnavProfile} from './p/dbnav/index.js';
|
||||
import {profile as dbwebProfile} from './p/dbweb/index.js';
|
||||
import {profile as dbrisProfile} from './p/dbris/index.js';
|
||||
import {profile as dbbahnhofProfile} from './p/dbbahnhof/index.js';
|
||||
import {profile as dbregioguideProfile} from './p/dbregioguide/index.js';
|
||||
import {mapRouteParsers} from './lib/api-parsers.js';
|
||||
import {createHafasRestApi as createApi} from 'hafas-rest-api';
|
||||
|
||||
|
@ -28,6 +30,8 @@ const profiles = {
|
|||
dbnav: dbnavProfile,
|
||||
dbweb: dbwebProfile,
|
||||
dbris: dbrisProfile,
|
||||
dbbahnhof: dbbahnhofProfile,
|
||||
dbregioguide: dbregioguideProfile,
|
||||
};
|
||||
|
||||
const start = async () => {
|
||||
|
|
|
@ -625,11 +625,14 @@
|
|||
"bestprice",
|
||||
"intervalle",
|
||||
"Intervalle",
|
||||
"tagesbest"
|
||||
"tagesbest",
|
||||
"dbbahnhof",
|
||||
"cancelation"
|
||||
],
|
||||
"ignorePaths": [
|
||||
"docs/dumps/**",
|
||||
"test/e2e/fixtures/**",
|
||||
"test/fixtures/**",
|
||||
"test/parse/remarks.js",
|
||||
"test/parse/dbnav-journey.js"
|
||||
],
|
||||
|
|
3
index.js
3
index.js
|
@ -99,6 +99,7 @@ const createClient = (profile, userAgent, opt = {}) => {
|
|||
// departures at related stations
|
||||
// e.g. those that belong together on the metro map.
|
||||
includeRelatedStations: true,
|
||||
moreStops: null, // also include departures/arrivals for array of up to nine additional station evaNumbers (not supported with dbnav and dbweb)
|
||||
}, opt);
|
||||
opt.when = new Date(opt.when || Date.now());
|
||||
if (Number.isNaN(Number(opt.when))) {
|
||||
|
@ -110,7 +111,7 @@ const createClient = (profile, userAgent, opt = {}) => {
|
|||
const {res} = await profile.request({profile, opt}, userAgent, req);
|
||||
|
||||
const ctx = {profile, opt, common, res};
|
||||
let results = (res[resultsField] || res.items || res.bahnhofstafelAbfahrtPositionen || res.bahnhofstafelAnkunftPositionen || res.entries)
|
||||
let results = (res[resultsField] || res.items || res.bahnhofstafelAbfahrtPositionen || res.bahnhofstafelAnkunftPositionen || res.entries.flat())
|
||||
.map(res => parse(ctx, res)); // TODO sort?, slice
|
||||
|
||||
if (!opt.includeRelatedStations) {
|
||||
|
|
|
@ -67,9 +67,9 @@ const checkIfResponseIsOk = (_) => {
|
|||
};
|
||||
};
|
||||
|
||||
if (body.fehlerNachricht) { // TODO better handling
|
||||
if (body.fehlerNachricht || body.errors) { // TODO better handling
|
||||
const {Error: HafasError, message, props} = getError(body);
|
||||
throw new HafasError(message, body.err, {...errProps, ...props});
|
||||
throw new HafasError(message, body.err || body.errors, {...errProps, ...props});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -105,6 +105,7 @@ const request = async (ctx, userAgent, reqData) => {
|
|||
if (reqOptions.query) {
|
||||
url += '?' + stringify(reqOptions.query, {arrayFormat: 'brackets', encodeValuesOnly: true});
|
||||
}
|
||||
console.log(url);
|
||||
const reqId = randomBytesHexString(6);
|
||||
const fetchReq = new Request(url, reqOptions);
|
||||
profile.logRequest(ctx, fetchReq, reqId);
|
||||
|
|
4
p/dbbahnhof/base.json
Normal file
4
p/dbbahnhof/base.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"boardEndpoint": "https://www.bahnhof.de/api/boards/",
|
||||
"defaultLanguage": "en"
|
||||
}
|
31
p/dbbahnhof/index.js
Normal file
31
p/dbbahnhof/index.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
import baseProfile from './base.json' with { type: 'json' };
|
||||
import {products} from '../../lib/products.js';
|
||||
import {formatStationBoardReq} from './station-board-req.js';
|
||||
|
||||
const profile = {
|
||||
...baseProfile,
|
||||
locale: 'de-DE',
|
||||
timezone: 'Europe/Berlin',
|
||||
|
||||
products,
|
||||
|
||||
formatStationBoardReq,
|
||||
|
||||
journeysOutFrwd: false,
|
||||
departuresGetPasslist: true,
|
||||
departuresStbFltrEquiv: true,
|
||||
trip: false,
|
||||
radar: false,
|
||||
refreshJourney: false,
|
||||
journeysFromTrip: false,
|
||||
refreshJourneyUseOutReconL: false,
|
||||
tripsByName: false,
|
||||
remarks: false,
|
||||
remarksGetPolyline: false,
|
||||
reachableFrom: false,
|
||||
lines: false,
|
||||
};
|
||||
|
||||
export {
|
||||
profile,
|
||||
};
|
30
p/dbbahnhof/station-board-req.js
Normal file
30
p/dbbahnhof/station-board-req.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
import {stringify} from 'qs';
|
||||
|
||||
const formatStationBoardReq = (ctx, station, type) => {
|
||||
const {profile, opt} = ctx;
|
||||
|
||||
if (opt.departure || opt.arrival) {
|
||||
throw new Error('opt.departure/opt.arrival is not supported for profile dbbahnhof, can only query for current time.');
|
||||
}
|
||||
const evaNumbers = [station];
|
||||
if (opt.moreStops) {
|
||||
evaNumbers.push(...opt.moreStops);
|
||||
}
|
||||
const query = {
|
||||
filterTransports: profile.formatProductsFilter(ctx, opt.products || {}, 'ris_alt'),
|
||||
evaNumbers: evaNumbers,
|
||||
duration: opt.duration,
|
||||
sortBy: 'TIME_SCHEDULE',
|
||||
locale: opt.language,
|
||||
};
|
||||
|
||||
return {
|
||||
endpoint: profile.boardEndpoint,
|
||||
path: type + '?' + stringify(query, {arrayFormat: 'repeat', encodeValuesOnly: true}),
|
||||
method: 'get',
|
||||
};
|
||||
};
|
||||
|
||||
export {
|
||||
formatStationBoardReq,
|
||||
};
|
|
@ -11,12 +11,12 @@ const createParseArrOrDep = (prefix) => {
|
|||
const cancelled = profile.parseCancelled(d);
|
||||
const res = {
|
||||
tripId: d.journeyID || d.journeyId || d.train?.journeyId || d.zuglaufId,
|
||||
stop: profile.parseLocation(ctx, d.station || d.abfrageOrt || {bahnhofsId: d.bahnhofsId}),
|
||||
stop: profile.parseLocation(ctx, d.station || d.abfrageOrt || d.stopPlace || {bahnhofsId: d.bahnhofsId}),
|
||||
...profile.parseWhen(
|
||||
ctx,
|
||||
null,
|
||||
d.timeSchedule || d.time || d.zeit || d.abgangsDatum || d.ankunftsDatum,
|
||||
d.timeType != 'SCHEDULE' ? d.timePredicted || d.time || d.ezZeit || d.ezAbgangsDatum || d.ezAnkunftsDatum : null,
|
||||
d.timeType != 'SCHEDULE' ? d.timePredicted || d.timeDelayed || d.time || d.ezZeit || d.ezAbgangsDatum || d.ezAnkunftsDatum : null,
|
||||
cancelled),
|
||||
...profile.parsePlatform(ctx, d.platformSchedule || d.platform || d.gleis, d.platformPredicted || d.platform || d.ezGleis, cancelled),
|
||||
// prognosisType: TODO
|
||||
|
@ -45,8 +45,8 @@ const createParseArrOrDep = (prefix) => {
|
|||
if (Array.isArray(d.ueber)) {
|
||||
stopovers = d.ueber
|
||||
.map(viaName => profile.parseStopover(ctx, {name: viaName}, null));
|
||||
} else if (Array.isArray(d.transport?.via)) {
|
||||
stopovers = (d.transport?.via)
|
||||
} else if (Array.isArray(d.transport?.via) || Array.isArray(d.viaStops)) {
|
||||
stopovers = (d.transport?.via || d.viaStops)
|
||||
.map(via => profile.parseStopover(ctx, via, null));
|
||||
}
|
||||
if (stopovers) {
|
||||
|
|
|
@ -2,20 +2,20 @@ import slugg from 'slugg';
|
|||
|
||||
const parseLine = (ctx, p) => {
|
||||
const profile = ctx.profile;
|
||||
const fahrtNr = p.verkehrsmittel?.nummer || p.transport?.number || p.train?.no || p.no || ((p.risZuglaufId || '') + '_').split('_')[1] || p.verkehrsmittelNummer || (p.verkehrmittel?.langText || p.verkehrsmittel?.langText || p.mitteltext || p.zugName || '').replace(/\D/g, '');
|
||||
const fahrtNr = p.verkehrsmittel?.nummer || p.transport?.number || p.train?.no || p.no || ((p.risZuglaufId || '') + '_').split('_')[1] || p.verkehrsmittelNummer || (p.verkehrmittel?.langText || p.verkehrsmittel?.langText || p.mitteltext || p.zugName || p.lineName || '').replace(/\D/g, '');
|
||||
const res = {
|
||||
type: 'line',
|
||||
id: slugg(p.verkehrsmittel?.langText || p.verkehrmittel?.langText || p.transport?.journeyDescription || p.risZuglaufId || p.train && p.train.category + ' ' + p.train.lineName + ' ' + p.train.no || p.no && p.name + ' ' + p.no || p.langtext || p.mitteltext || p.zugName), // TODO terrible
|
||||
id: slugg(p.verkehrsmittel?.langText || p.verkehrmittel?.langText || p.transport?.journeyDescription || p.risZuglaufId || p.train && p.train.category + ' ' + p.train.lineName + ' ' + p.train.no || p.no && p.name + ' ' + p.no || p.langtext || p.mitteltext || p.zugName || p.lineName), // TODO terrible
|
||||
fahrtNr: String(fahrtNr),
|
||||
name: p.verkehrsmittel?.name || p.verkehrsmittel?.langText || p.verkehrmittel?.name || p.verkehrmittel?.langText || p.zugName || p.transport && p.transport.category + ' ' + p.transport.line || p.train && p.train.category + ' ' + p.train.lineName || p.name || p.mitteltext || p.langtext,
|
||||
name: p.verkehrsmittel?.name || p.verkehrsmittel?.langText || p.verkehrmittel?.name || p.verkehrmittel?.langText || p.zugName || p.transport && p.transport.category + ' ' + p.transport.line || p.train && p.train.category + ' ' + p.train.lineName || p.name || p.mitteltext || p.langtext || p.lineName,
|
||||
public: true,
|
||||
};
|
||||
|
||||
const adminCode = p.administrationId || p.administration?.id || p.administration?.administrationID;
|
||||
const adminCode = p.administrationID || p.administrationId || p.administration?.id || p.administration?.administrationID;
|
||||
if (adminCode) {
|
||||
res.adminCode = adminCode;
|
||||
}
|
||||
res.productName = p.verkehrsmittel?.kurzText || p.verkehrmittel?.kurzText || p.transport?.category || p.train?.category || p.category || p.kurztext;
|
||||
res.productName = p.verkehrsmittel?.kurzText || p.verkehrmittel?.kurzText || p.transport?.category || p.train?.category || p.category || p.kurztext || p.lineName?.replace(/\d/g, '');
|
||||
const foundProduct = profile.products.find(pp => pp.vendo == p.verkehrsmittel?.produktGattung || pp.vendo == p.verkehrmittel?.produktGattung || pp.ris == p.transport?.type || pp.ris == p.train?.type || pp.ris == p.type || pp.ris_alt == p.train?.type || pp.ris_alt == p.type || pp.dbnav_short == p.produktGattung);
|
||||
res.mode = foundProduct?.mode;
|
||||
res.product = foundProduct?.id;
|
||||
|
|
|
@ -10,7 +10,12 @@ const parseRemarks = (ctx, ref) => {
|
|||
ref.himNotizen || [],
|
||||
ref.hims || [],
|
||||
ref.serviceNotiz && [ref.serviceNotiz] || [],
|
||||
ref.messages || [],
|
||||
ref.messages?.common || [],
|
||||
ref.messages?.delay || [],
|
||||
ref.messages?.cancelation || [],
|
||||
ref.messages?.destination || [],
|
||||
ref.messages?.via || [],
|
||||
Array.isArray(ref.messages) ? ref.messages : [],
|
||||
ref.meldungen || [],
|
||||
ref.meldungenAsObject || [],
|
||||
ref.attributNotizen || [],
|
||||
|
@ -28,12 +33,12 @@ const parseRemarks = (ctx, ref) => {
|
|||
if (remark.prioritaet || remark.prio || remark.type) {
|
||||
type = 'status';
|
||||
}
|
||||
if (!remark.priority && !remark.kategorie && remark.key || remark.disruptionID
|
||||
if (!remark.priority && !remark.kategorie && remark.key || remark.disruptionID || remark.important
|
||||
|| remark.prioritaet && remark.prioritaet == 'HOCH' || remark.prio && remark.prio == 'HOCH' || remark.priority && remark.priority < 100) {
|
||||
type = 'warning';
|
||||
}
|
||||
let res = {
|
||||
code: remark.code || remark.key || remark.id,
|
||||
code: remark.code || remark.key || remark.id || remark.type,
|
||||
summary: remark.nachrichtKurz || remark.value || remark.ueberschrift || remark.text || remark.shortText
|
||||
|| Object.values(remark.descriptions || {})
|
||||
.shift()?.textShort,
|
||||
|
|
29
test/dbbahnhof-departures.js
Normal file
29
test/dbbahnhof-departures.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
import tap from 'tap';
|
||||
|
||||
import {createClient} from '../index.js';
|
||||
import {profile as rawProfile} from '../p/dbbahnhof/index.js';
|
||||
import res from './fixtures/dbbahnhof-departures.json' with { type: 'json' };
|
||||
import {dbDepartures as expected} from './fixtures/dbbahnhof-departures.js';
|
||||
|
||||
const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false});
|
||||
const {profile} = client;
|
||||
|
||||
const opt = {
|
||||
direction: null,
|
||||
duration: 10,
|
||||
linesOfStops: true,
|
||||
remarks: true,
|
||||
stopovers: false,
|
||||
includeRelatedStations: true,
|
||||
when: '2019-08-19T20:30:00+02:00',
|
||||
products: {},
|
||||
};
|
||||
|
||||
tap.test('parses a bahnhof.de departure correctly', (t) => {
|
||||
const ctx = {profile, opt, common: null, res};
|
||||
const arrivals = res.entries.flat()
|
||||
.map(d => profile.parseArrival(ctx, d));
|
||||
|
||||
t.same(arrivals, expected);
|
||||
t.end();
|
||||
});
|
|
@ -1,7 +1,7 @@
|
|||
import tap from 'tap';
|
||||
|
||||
import {createClient} from '../index.js';
|
||||
import {profile as rawProfile} from '../p/dbweb/index.js';
|
||||
import {profile as rawProfile} from '../p/dbris/index.js';
|
||||
import res from './fixtures/dbris-arrivals.json' with { type: 'json' };
|
||||
import {dbArrivals as expected} from './fixtures/dbris-arrivals.js';
|
||||
|
||||
|
|
28
test/dbris-departures.js
Normal file
28
test/dbris-departures.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
import tap from 'tap';
|
||||
|
||||
import {createClient} from '../index.js';
|
||||
import {profile as rawProfile} from '../p/dbris/index.js';
|
||||
import res from './fixtures/dbris-departures.json' with { type: 'json' };
|
||||
import {dbDepartures as expected} from './fixtures/dbris-departures.js';
|
||||
|
||||
const client = createClient(rawProfile, 'public-transport/hafas-client:test', {enrichStations: false});
|
||||
const {profile} = client;
|
||||
|
||||
const opt = {
|
||||
direction: null,
|
||||
duration: 10,
|
||||
linesOfStops: true,
|
||||
remarks: true,
|
||||
stopovers: false,
|
||||
includeRelatedStations: true,
|
||||
when: '2019-08-19T20:30:00+02:00',
|
||||
products: {},
|
||||
};
|
||||
|
||||
tap.test('parses a RIS::Boards departure correctly', (t) => {
|
||||
const ctx = {profile, opt, common: null, res};
|
||||
const arrivals = res.departures.map(d => profile.parseArrival(ctx, d));
|
||||
|
||||
t.same(arrivals, expected);
|
||||
t.end();
|
||||
});
|
146
test/e2e/dbbahnhof.js
Normal file
146
test/e2e/dbbahnhof.js
Normal file
|
@ -0,0 +1,146 @@
|
|||
import tap from 'tap';
|
||||
import isRoughlyEqual from 'is-roughly-equal';
|
||||
|
||||
import {createWhen} from './lib/util.js';
|
||||
import {createClient} from '../../index.js';
|
||||
import {profile as dbProfile} from '../../p/dbregioguide/index.js';
|
||||
import {
|
||||
createValidateStation,
|
||||
createValidateTrip,
|
||||
} from './lib/validators.js';
|
||||
import {createValidateFptfWith as createValidate} from './lib/validate-fptf-with.js';
|
||||
import {testJourneysStationToStation} from './lib/journeys-station-to-station.js';
|
||||
import {testJourneysStationToAddress} from './lib/journeys-station-to-address.js';
|
||||
import {testJourneysStationToPoi} from './lib/journeys-station-to-poi.js';
|
||||
import {testEarlierLaterJourneys} from './lib/earlier-later-journeys.js';
|
||||
import {testLegCycleAlternatives} from './lib/leg-cycle-alternatives.js';
|
||||
import {testRefreshJourney} from './lib/refresh-journey.js';
|
||||
import {journeysFailsWithNoProduct} from './lib/journeys-fails-with-no-product.js';
|
||||
import {testDepartures} from './lib/departures.js';
|
||||
import {testArrivals} from './lib/arrivals.js';
|
||||
import {testJourneysWithDetour} from './lib/journeys-with-detour.js';
|
||||
|
||||
const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o);
|
||||
const minute = 60 * 1000;
|
||||
|
||||
const T_MOCK = 1747040400 * 1000; // 2025-05-12T08:00:00+01:00
|
||||
const when = createWhen(dbProfile.timezone, dbProfile.locale, T_MOCK);
|
||||
|
||||
const cfg = {
|
||||
when,
|
||||
stationCoordsOptional: true, // TODO
|
||||
products: dbProfile.products,
|
||||
minLatitude: 46.673100,
|
||||
maxLatitude: 55.030671,
|
||||
minLongitude: 6.896517,
|
||||
maxLongitude: 16.180237,
|
||||
};
|
||||
|
||||
const validate = createValidate(cfg);
|
||||
|
||||
const assertValidPrice = (t, p) => {
|
||||
t.ok(p);
|
||||
if (p.amount !== null) {
|
||||
t.equal(typeof p.amount, 'number');
|
||||
t.ok(p.amount > 0);
|
||||
}
|
||||
if (p.hint !== null) {
|
||||
t.equal(typeof p.hint, 'string');
|
||||
t.ok(p.hint);
|
||||
}
|
||||
};
|
||||
|
||||
const assertValidTickets = (test, tickets) => {
|
||||
test.ok(Array.isArray(tickets));
|
||||
for (let fare of tickets) {
|
||||
test.equal(typeof fare.name, 'string', 'Mandatory field "name" is missing or not a string');
|
||||
test.ok(fare.name);
|
||||
|
||||
test.ok(isObj(fare.priceObj), 'Mandatory field "priceObj" is missing or not an object');
|
||||
test.equal(typeof fare.priceObj.amount, 'number', 'Mandatory field "amount" in "priceObj" is missing or not a number');
|
||||
test.ok(fare.priceObj.amount > 0);
|
||||
if ('currency' in fare.priceObj) {
|
||||
test.equal(typeof fare.priceObj.currency, 'string');
|
||||
}
|
||||
|
||||
// Check optional fields
|
||||
if ('addData' in fare) {
|
||||
test.equal(typeof fare.addData, 'string');
|
||||
}
|
||||
if ('addDataTicketInfo' in fare) {
|
||||
test.equal(typeof fare.addDataTicketInfo, 'string');
|
||||
}
|
||||
if ('addDataTicketDetails' in fare) {
|
||||
test.equal(typeof fare.addDataTicketDetails, 'string');
|
||||
}
|
||||
if ('addDataTravelInfo' in fare) {
|
||||
test.equal(typeof fare.addDataTravelInfo, 'string');
|
||||
}
|
||||
if ('addDataTravelDetails' in fare) {
|
||||
test.equal(typeof fare.firstClass, 'boolean');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const client = createClient(dbProfile, 'public-transport/hafas-client:test', {enrichStations: false});
|
||||
|
||||
const berlinHbf = '8011160';
|
||||
const münchenHbf = '8000261';
|
||||
const jungfernheide = '8011167';
|
||||
const blnSchwedterStr = '732652';
|
||||
const westhafen = '8089116';
|
||||
const wedding = '8089131';
|
||||
const württembergallee = '731084';
|
||||
const regensburgHbf = '8000309';
|
||||
const blnOstbahnhof = '8010255';
|
||||
const blnTiergarten = '8089091';
|
||||
const blnJannowitzbrücke = '8089019';
|
||||
const potsdamHbf = '8012666';
|
||||
const berlinSüdkreuz = '8011113';
|
||||
const kölnHbf = '8000207';
|
||||
|
||||
|
||||
tap.test('departures at Berlin Schwedter Str.', async (t) => {
|
||||
const res = await client.departures(blnSchwedterStr, {
|
||||
duration: 5, when,
|
||||
});
|
||||
|
||||
await testDepartures({
|
||||
test: t,
|
||||
res,
|
||||
validate,
|
||||
id: blnSchwedterStr,
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
tap.test('departures with station object', async (t) => {
|
||||
const res = await client.departures({
|
||||
type: 'station',
|
||||
id: jungfernheide,
|
||||
name: 'Berlin Jungfernheide',
|
||||
location: {
|
||||
type: 'location',
|
||||
latitude: 1.23,
|
||||
longitude: 2.34,
|
||||
},
|
||||
}, {when});
|
||||
|
||||
validate(t, res, 'departuresResponse', 'res');
|
||||
t.end();
|
||||
});
|
||||
|
||||
tap.test('arrivals at Berlin Schwedter Str.', async (t) => {
|
||||
const res = await client.arrivals(blnSchwedterStr, {
|
||||
duration: 5, when,
|
||||
});
|
||||
|
||||
await testArrivals({
|
||||
test: t,
|
||||
res,
|
||||
validate,
|
||||
id: blnSchwedterStr,
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
492
test/fixtures/dbbahnhof-departures.js
vendored
Normal file
492
test/fixtures/dbbahnhof-departures.js
vendored
Normal file
|
@ -0,0 +1,492 @@
|
|||
const dbDepartures = [
|
||||
{
|
||||
tripId: '20250322-f6cd6d71-510f-378c-b825-fbb9380f5b03',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8000105',
|
||||
name: 'Frankfurt(Main)Hbf',
|
||||
},
|
||||
when: '2025-03-22T00:42:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:42:00+01:00',
|
||||
delay: 0,
|
||||
platform: '11',
|
||||
plannedPlatform: '11',
|
||||
direction: 'Fulda',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 'rb51',
|
||||
fahrtNr: '51',
|
||||
name: 'RB51',
|
||||
public: true,
|
||||
adminCode: '8005KG',
|
||||
productName: 'RB',
|
||||
mode: 'train',
|
||||
product: 'regional',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'bicycle-transport',
|
||||
summary: 'Limited bicycle transport possible',
|
||||
text: 'Limited bicycle transport possible',
|
||||
type: 'status',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000115',
|
||||
name: 'Fulda',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250321-69f912f7-2b47-3ffd-b00f-708e8c568f6b',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T00:43:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:42:00+01:00',
|
||||
delay: 60,
|
||||
platform: '103',
|
||||
plannedPlatform: '103',
|
||||
direction: 'Wiesbaden Hbf',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's1',
|
||||
fahrtNr: '1',
|
||||
name: 'S1',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'bicycle-transport',
|
||||
summary: 'Limited bicycle transport possible',
|
||||
text: 'Limited bicycle transport possible',
|
||||
type: 'status',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000250',
|
||||
name: 'Wiesbaden Hbf',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-fcf0de07-fc6e-3aeb-9757-3b08e6760c3f',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T00:44:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:44:00+01:00',
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: null,
|
||||
direction: 'Bad Soden(Taunus)',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 'sev',
|
||||
fahrtNr: '',
|
||||
name: 'SEV',
|
||||
public: true,
|
||||
adminCode: 'B4',
|
||||
productName: 'SEV',
|
||||
mode: 'train',
|
||||
product: 'regional',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'replacement-service',
|
||||
summary: 'Replacement bus for {{1}}',
|
||||
text: 'Replacement bus for {{1}}',
|
||||
type: 'status',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000752',
|
||||
name: 'Bad Soden(Taunus)',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250321-bff43415-303b-36ad-ae4e-8d9605fc3f1e',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: null,
|
||||
plannedWhen: '2025-03-22T00:44:00+01:00',
|
||||
prognosedWhen: null,
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: '102',
|
||||
prognosedPlatform: '102',
|
||||
direction: 'Offenbach(Main)Ost',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's8',
|
||||
fahrtNr: '8',
|
||||
name: 'S8',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'unplanned-info',
|
||||
summary: 'Defective signal box',
|
||||
text: 'Defective signal box',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'canceled-trip',
|
||||
summary: 'Trip cancelled',
|
||||
text: 'Trip cancelled',
|
||||
type: 'warning',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8004645',
|
||||
name: 'Offenbach(Main)Ost',
|
||||
},
|
||||
cancelled: true,
|
||||
},
|
||||
{
|
||||
tripId: '20250322-1423f343-0076-3f29-b1e8-004dc1f27068',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T00:47:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:47:00+01:00',
|
||||
delay: 0,
|
||||
platform: '101',
|
||||
plannedPlatform: '101',
|
||||
direction: 'Darmstadt Hbf',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's6',
|
||||
fahrtNr: '6',
|
||||
name: 'S6',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'bicycle-transport',
|
||||
summary: 'Limited bicycle transport possible',
|
||||
text: 'Limited bicycle transport possible',
|
||||
type: 'status',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000068',
|
||||
name: 'Darmstadt Hbf',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-f2c61208-75b1-3c19-a580-172988addf2c',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: null,
|
||||
plannedWhen: '2025-03-22T00:47:00+01:00',
|
||||
prognosedWhen: null,
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: '103',
|
||||
prognosedPlatform: '103',
|
||||
direction: 'Wiesbaden Hbf',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's8',
|
||||
fahrtNr: '8',
|
||||
name: 'S8',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'unplanned-info',
|
||||
summary: 'Defective signal box',
|
||||
text: 'Defective signal box',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'canceled-trip',
|
||||
summary: 'Trip cancelled',
|
||||
text: 'Trip cancelled',
|
||||
type: 'warning',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000250',
|
||||
name: 'Wiesbaden Hbf',
|
||||
},
|
||||
cancelled: true,
|
||||
},
|
||||
{
|
||||
tripId: '20250322-841901b7-7420-3890-8691-05c8cbbacdce',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T01:05:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:49:00+01:00',
|
||||
delay: 960,
|
||||
platform: '102',
|
||||
plannedPlatform: '102',
|
||||
direction: 'Rödermark-Ober Roden',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's1',
|
||||
fahrtNr: '1',
|
||||
name: 'S1',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'unplanned-info',
|
||||
summary: 'Repair on the turnout',
|
||||
text: 'Repair on the turnout',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'bicycle-transport',
|
||||
summary: 'Limited bicycle transport possible',
|
||||
text: 'Limited bicycle transport possible',
|
||||
type: 'status',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000285',
|
||||
name: 'Rödermark-Ober Roden',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-08673537-4773-3e90-afa3-ab467119a609',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '100010',
|
||||
name: 'Hauptbahnhof, Frankfurt a.M.',
|
||||
},
|
||||
when: '2025-03-22T00:50:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:50:00+01:00',
|
||||
delay: 0,
|
||||
platform: null,
|
||||
plannedPlatform: null,
|
||||
direction: 'Bockenheimer Warte, Frankfurt a.M.',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 'u4',
|
||||
fahrtNr: '4',
|
||||
name: 'U4',
|
||||
public: true,
|
||||
adminCode: 'rmv255',
|
||||
productName: 'U',
|
||||
mode: 'train',
|
||||
product: 'subway',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '101201',
|
||||
name: 'Bockenheimer Warte, Frankfurt a.M.',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-29a07ddd-969e-3660-ae2e-4d6c6af4a866',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8000105',
|
||||
name: 'Frankfurt(Main)Hbf',
|
||||
},
|
||||
when: null,
|
||||
plannedWhen: '2025-03-22T00:50:00+01:00',
|
||||
prognosedWhen: null,
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: '2',
|
||||
prognosedPlatform: '2',
|
||||
direction: 'Riedstadt-Goddelau',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's7',
|
||||
fahrtNr: '7',
|
||||
name: 'S7',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'unplanned-info',
|
||||
summary: 'Short-term unavailability of employees',
|
||||
text: 'Short-term unavailability of employees',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'canceled-trip',
|
||||
summary: 'Trip cancelled',
|
||||
text: 'Trip cancelled',
|
||||
type: 'warning',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000126',
|
||||
name: 'Riedstadt-Goddelau',
|
||||
},
|
||||
cancelled: true,
|
||||
},
|
||||
{
|
||||
tripId: '20250322-01575b72-00ad-36da-bc88-49410d87321a',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T00:52:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:52:00+01:00',
|
||||
delay: 0,
|
||||
platform: '103',
|
||||
plannedPlatform: '103',
|
||||
direction: 'Niedernhausen(Taunus)',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's2',
|
||||
fahrtNr: '2',
|
||||
name: 'S2',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'bicycle-transport',
|
||||
summary: 'Limited bicycle transport possible',
|
||||
text: 'Limited bicycle transport possible',
|
||||
type: 'status',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8004400',
|
||||
name: 'Niedernhausen(Taunus)',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-2b5b5913-2b2d-39da-b29d-2fff067ba6a2',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: null,
|
||||
plannedWhen: '2025-03-22T00:52:00+01:00',
|
||||
prognosedWhen: null,
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: '101',
|
||||
prognosedPlatform: '101',
|
||||
direction: 'Frankfurt(Main)Süd',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's4',
|
||||
fahrtNr: '4',
|
||||
name: 'S4',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: null,
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'unplanned-info',
|
||||
summary: 'Defective signal box',
|
||||
text: 'Defective signal box',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'canceled-trip',
|
||||
summary: 'Trip cancelled',
|
||||
text: 'Trip cancelled',
|
||||
type: 'warning',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8002041',
|
||||
name: 'Frankfurt(Main)Süd',
|
||||
},
|
||||
cancelled: true,
|
||||
},
|
||||
];
|
||||
|
||||
export {
|
||||
dbDepartures,
|
||||
};
|
1
test/fixtures/dbbahnhof-departures.json
vendored
Normal file
1
test/fixtures/dbbahnhof-departures.json
vendored
Normal file
File diff suppressed because one or more lines are too long
580
test/fixtures/dbris-departures.js
vendored
Normal file
580
test/fixtures/dbris-departures.js
vendored
Normal file
|
@ -0,0 +1,580 @@
|
|||
const dbDepartures = [
|
||||
{
|
||||
tripId: '20250321-69f912f7-2b47-3ffd-b00f-708e8c568f6b',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T00:43:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:42:00+01:00',
|
||||
delay: 60,
|
||||
platform: '103',
|
||||
plannedPlatform: '103',
|
||||
direction: 'Wiesbaden Hbf',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's-1',
|
||||
fahrtNr: '35182',
|
||||
name: 'S 1',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DB',
|
||||
name: 'DB Regio, S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: '43',
|
||||
summary: 'Verspätung eines vorausfahrenden Zuges',
|
||||
text: 'Verspätung eines vorausfahrenden Zuges',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'FK',
|
||||
summary: 'Fahrradmitnahme begrenzt möglich',
|
||||
text: 'Fahrradmitnahme begrenzt möglich',
|
||||
type: 'hint',
|
||||
},
|
||||
{
|
||||
code: 'EH',
|
||||
summary: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
text: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
type: 'hint',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000250',
|
||||
name: 'Wiesbaden Hbf',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-fcf0de07-fc6e-3aeb-9757-3b08e6760c3f',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T00:44:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:44:00+01:00',
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: null,
|
||||
direction: null,
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 'bus-sev-353821',
|
||||
fahrtNr: '353821',
|
||||
name: 'Bus SEV',
|
||||
public: true,
|
||||
adminCode: 'B4',
|
||||
productName: 'Bus',
|
||||
mode: 'train',
|
||||
product: 'regional',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: '---',
|
||||
name: 'Busse/SEV S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000752',
|
||||
name: 'Bad Soden(Taunus)',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250321-bff43415-303b-36ad-ae4e-8d9605fc3f1e',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: null,
|
||||
plannedWhen: '2025-03-22T00:44:00+01:00',
|
||||
prognosedWhen: null,
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: '102',
|
||||
prognosedPlatform: '102',
|
||||
direction: 'Offenbach(Main)Ost',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's-8',
|
||||
fahrtNr: '35883',
|
||||
name: 'S 8',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DB',
|
||||
name: 'DB Regio, S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: undefined,
|
||||
summary: 'S8: Kein Betrieb möglich. Grund: Erkrankung von Stellwerkspersonal. Dauer der Beeinträchtigung bis Betriebsschluss. Ersatzverkehr mit Bussen eingerichtet. Andere Verkehrsmittel mit einbeziehen. Reiseverbindung frühzeitig prüfen.',
|
||||
text: 'Auf der S8 ist kein Betrieb möglich. Der Grund ist eine Erkrankung von Stellwerkspersonal. Dauer der Beeinträchtigung bis Betriebsschluss. Wir haben für Sie einen Ersatzverkehr mit 8 Bussen der Firma Holiday-Reisen GmbH zwischen Wiesbaden Hbf und Frankfurt(M) Flughafen Regionalbf eingerichtet. Außerdem haben wir für Sie ab ca. 01:00 Uhr einen Ersatzverkehr mit 4 Bussen der Firma Holiday-Reisen GmbH zwischen Hanau Hbf und Offenbach(Main)Ost eingerichtet. Beziehen Sie auch andere Verkehrsmittel mit ein, um an Ihr Reiseziel zu gelangen. Bitte informieren Sie sich frühzeitig über Ihre geplanten Verbindungen und wählen Sie gegebenenfalls eine frühere Zugverbindung, um Ihre Anschlüsse an Ihren Umsteigebahnhöfen erreichen zu können.',
|
||||
type: 'warning',
|
||||
},
|
||||
{
|
||||
code: '40',
|
||||
summary: 'defektes Stellwerk',
|
||||
text: 'defektes Stellwerk',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'CUSTOMER_TEXT',
|
||||
summary: 'Auf der S8 und S9 kommt es zwischen Wiesbaden Hbf - Frankfurt(M) Flughafen Regionalbf - Frankfurt(Main)Hbf - Offenbach(Main)Ost in den Nächten bis zum 22.03.25 zu geänderten Fahrtzeiten, einzelnen Umleitungen, Teil- und Zugausfällen. Der Grund sind Bauarbeiten. Auf dem jeweils ausfallenden Abschnitt haben wir für Sie einen Ersatzverkehr mit Bussen eingerichtet. Die Mitnahme von Fahrrädern im Bus ist ausgeschlossen. Bitte informieren Sie sich frühzeitig über Ihre geplanten Verbindungen und wählen Sie gegebenenfalls eine frühere Zugverbindung, um Ihre Anschlüsse an Ihren Umsteigebahnhöfen erreichen zu können. Die Fahrplanänderungen zu dieser Baumaßnahme sind in die Online-Fahrplanauskünfte eingearbeitet.',
|
||||
text: 'Auf der S8 und S9 kommt es zwischen Wiesbaden Hbf - Frankfurt(M) Flughafen Regionalbf - Frankfurt(Main)Hbf - Offenbach(Main)Ost in den Nächten bis zum 22.03.25 zu geänderten Fahrtzeiten, einzelnen Umleitungen, Teil- und Zugausfällen. Der Grund sind Bauarbeiten. Auf dem jeweils ausfallenden Abschnitt haben wir für Sie einen Ersatzverkehr mit Bussen eingerichtet. Die Mitnahme von Fahrrädern im Bus ist ausgeschlossen. Bitte informieren Sie sich frühzeitig über Ihre geplanten Verbindungen und wählen Sie gegebenenfalls eine frühere Zugverbindung, um Ihre Anschlüsse an Ihren Umsteigebahnhöfen erreichen zu können. Die Fahrplanänderungen zu dieser Baumaßnahme sind in die Online-Fahrplanauskünfte eingearbeitet.',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'FK',
|
||||
summary: 'Fahrradmitnahme begrenzt möglich',
|
||||
text: 'Fahrradmitnahme begrenzt möglich',
|
||||
type: 'hint',
|
||||
},
|
||||
{
|
||||
code: 'EH',
|
||||
summary: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
text: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
type: 'hint',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8004645',
|
||||
name: 'Offenbach(Main)Ost',
|
||||
},
|
||||
cancelled: true,
|
||||
},
|
||||
{
|
||||
tripId: '20250322-f2c61208-75b1-3c19-a580-172988addf2c',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: null,
|
||||
plannedWhen: '2025-03-22T00:47:00+01:00',
|
||||
prognosedWhen: null,
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: '103',
|
||||
prognosedPlatform: '103',
|
||||
direction: 'Wiesbaden Hbf',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's-8',
|
||||
fahrtNr: '35884',
|
||||
name: 'S 8',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DB',
|
||||
name: 'DB Regio, S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: undefined,
|
||||
summary: 'S8: Kein Betrieb möglich. Grund: Erkrankung von Stellwerkspersonal. Dauer der Beeinträchtigung bis Betriebsschluss. Ersatzverkehr mit Bussen eingerichtet. Andere Verkehrsmittel mit einbeziehen. Reiseverbindung frühzeitig prüfen.',
|
||||
text: 'Auf der S8 ist kein Betrieb möglich. Der Grund ist eine Erkrankung von Stellwerkspersonal. Dauer der Beeinträchtigung bis Betriebsschluss. Wir haben für Sie einen Ersatzverkehr mit 8 Bussen der Firma Holiday-Reisen GmbH zwischen Wiesbaden Hbf und Frankfurt(M) Flughafen Regionalbf eingerichtet. Außerdem haben wir für Sie ab ca. 01:00 Uhr einen Ersatzverkehr mit 4 Bussen der Firma Holiday-Reisen GmbH zwischen Hanau Hbf und Offenbach(Main)Ost eingerichtet. Beziehen Sie auch andere Verkehrsmittel mit ein, um an Ihr Reiseziel zu gelangen. Bitte informieren Sie sich frühzeitig über Ihre geplanten Verbindungen und wählen Sie gegebenenfalls eine frühere Zugverbindung, um Ihre Anschlüsse an Ihren Umsteigebahnhöfen erreichen zu können.',
|
||||
type: 'warning',
|
||||
},
|
||||
{
|
||||
code: '40',
|
||||
summary: 'defektes Stellwerk',
|
||||
text: 'defektes Stellwerk',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'CUSTOMER_TEXT',
|
||||
summary: 'Die Halte Frankfurt(Main)-Gateway Gardens, Frankfurt(M) Flughafen Regionalbf und Kelsterbach entfallen. Bitte prüfen Sie Ihre Reiseverbindung kurz vor der Abfahrt des Zuges.',
|
||||
text: 'Die Halte Frankfurt(Main)-Gateway Gardens, Frankfurt(M) Flughafen Regionalbf und Kelsterbach entfallen. Bitte prüfen Sie Ihre Reiseverbindung kurz vor der Abfahrt des Zuges.',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'CUSTOMER_TEXT',
|
||||
summary: 'Auf der S8 und S9 kommt es zwischen Wiesbaden Hbf - Frankfurt(M) Flughafen Regionalbf - Frankfurt(Main)Hbf - Offenbach(Main)Ost in den Nächten bis zum 22.03.25 zu geänderten Fahrtzeiten, einzelnen Umleitungen, Teil- und Zugausfällen. Der Grund sind Bauarbeiten. Auf dem jeweils ausfallenden Abschnitt haben wir für Sie einen Ersatzverkehr mit Bussen eingerichtet. Die Mitnahme von Fahrrädern im Bus ist ausgeschlossen. Bitte informieren Sie sich frühzeitig über Ihre geplanten Verbindungen und wählen Sie gegebenenfalls eine frühere Zugverbindung, um Ihre Anschlüsse an Ihren Umsteigebahnhöfen erreichen zu können. Die Fahrplanänderungen zu dieser Baumaßnahme sind in die Online-Fahrplanauskünfte eingearbeitet.',
|
||||
text: 'Auf der S8 und S9 kommt es zwischen Wiesbaden Hbf - Frankfurt(M) Flughafen Regionalbf - Frankfurt(Main)Hbf - Offenbach(Main)Ost in den Nächten bis zum 22.03.25 zu geänderten Fahrtzeiten, einzelnen Umleitungen, Teil- und Zugausfällen. Der Grund sind Bauarbeiten. Auf dem jeweils ausfallenden Abschnitt haben wir für Sie einen Ersatzverkehr mit Bussen eingerichtet. Die Mitnahme von Fahrrädern im Bus ist ausgeschlossen. Bitte informieren Sie sich frühzeitig über Ihre geplanten Verbindungen und wählen Sie gegebenenfalls eine frühere Zugverbindung, um Ihre Anschlüsse an Ihren Umsteigebahnhöfen erreichen zu können. Die Fahrplanänderungen zu dieser Baumaßnahme sind in die Online-Fahrplanauskünfte eingearbeitet.',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'FK',
|
||||
summary: 'Fahrradmitnahme begrenzt möglich',
|
||||
text: 'Fahrradmitnahme begrenzt möglich',
|
||||
type: 'hint',
|
||||
},
|
||||
{
|
||||
code: 'EH',
|
||||
summary: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
text: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
type: 'hint',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000250',
|
||||
name: 'Wiesbaden Hbf',
|
||||
},
|
||||
cancelled: true,
|
||||
},
|
||||
{
|
||||
tripId: '20250322-1423f343-0076-3f29-b1e8-004dc1f27068',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T00:47:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:47:00+01:00',
|
||||
delay: 0,
|
||||
platform: '101',
|
||||
plannedPlatform: '101',
|
||||
direction: 'Darmstadt Hbf',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's-6',
|
||||
fahrtNr: '36683',
|
||||
name: 'S 6',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DB',
|
||||
name: 'DB Regio, S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'FK',
|
||||
summary: 'Fahrradmitnahme begrenzt möglich',
|
||||
text: 'Fahrradmitnahme begrenzt möglich',
|
||||
type: 'hint',
|
||||
},
|
||||
{
|
||||
code: 'EH',
|
||||
summary: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
text: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
type: 'hint',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000068',
|
||||
name: 'Darmstadt Hbf',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-841901b7-7420-3890-8691-05c8cbbacdce',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T01:05:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:49:00+01:00',
|
||||
delay: 960,
|
||||
platform: '102',
|
||||
plannedPlatform: '102',
|
||||
direction: 'Rödermark-Ober Roden',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's-1',
|
||||
fahrtNr: '35185',
|
||||
name: 'S 1',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DB',
|
||||
name: 'DB Regio, S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: '64',
|
||||
summary: 'Reparatur an einer Weiche',
|
||||
text: 'Reparatur an einer Weiche',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'FK',
|
||||
summary: 'Fahrradmitnahme begrenzt möglich',
|
||||
text: 'Fahrradmitnahme begrenzt möglich',
|
||||
type: 'hint',
|
||||
},
|
||||
{
|
||||
code: 'EH',
|
||||
summary: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
text: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
type: 'hint',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000285',
|
||||
name: 'Rödermark-Ober Roden',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-08673537-4773-3e90-afa3-ab467119a609',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '100010',
|
||||
name: 'Hauptbahnhof, Frankfurt a.M.',
|
||||
},
|
||||
when: '2025-03-22T00:50:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:50:00+01:00',
|
||||
delay: 0,
|
||||
platform: null,
|
||||
plannedPlatform: null,
|
||||
direction: 'Bockenheimer Warte, Frankfurt a.M.',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 'u-4',
|
||||
fahrtNr: '1954',
|
||||
name: 'U 4',
|
||||
public: true,
|
||||
adminCode: 'rmv255',
|
||||
productName: 'U',
|
||||
mode: 'train',
|
||||
product: 'subway',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DPN',
|
||||
name: 'Nahreisezug',
|
||||
},
|
||||
},
|
||||
remarks: [],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '101201',
|
||||
name: 'Bockenheimer Warte, Frankfurt a.M.',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-29a07ddd-969e-3660-ae2e-4d6c6af4a866',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8000105',
|
||||
name: 'Frankfurt(Main)Hbf',
|
||||
},
|
||||
when: null,
|
||||
plannedWhen: '2025-03-22T00:50:00+01:00',
|
||||
prognosedWhen: null,
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: '2',
|
||||
prognosedPlatform: '2',
|
||||
direction: 'Riedstadt-Goddelau',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's-7',
|
||||
fahrtNr: '35787',
|
||||
name: 'S 7',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DB',
|
||||
name: 'DB Regio, S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: undefined,
|
||||
summary: 'S7: Kein Betrieb möglich. Grund: Kurzfristige Erkrankung von Personal. Am 21.03.25/22.03.25 von 18:00 Uhr bis voraussichtlich 03:00 Uhr. Alternative Reisemöglichkeit: RE70. Die Züge halten zusätzlich in Riedstadt-Wolfskehlen - Groß Gerau-Dornheim - Zeppelinheim. Reiseverbindung frühzeitig prüfen.',
|
||||
text: 'Auf der S7 ist kein Betrieb möglich. Der Grund ist eine kurzfristige Erkrankung von Personal. Die Beeinträchtigung ist am 21.03.25/22.03.25 von 18:00 Uhr bis voraussichtlich 03:00 Uhr. Alternative Reisemöglichkeit: RE70. Die Züge halten zusätzlich für Sie in Riedstadt-Wolfskehlen - Groß Gerau-Dornheim - Zeppelinheim zum Ein- und Ausstieg. Bitte informieren Sie sich frühzeitig über Ihre geplanten Verbindungen und wählen Sie gegebenenfalls eine frühere Zugverbindung, um Ihre Anschlüsse an Ihren Umsteigebahnhöfen erreichen zu können.',
|
||||
type: 'warning',
|
||||
},
|
||||
{
|
||||
code: '49',
|
||||
summary: 'kurzfristiger Personalausfall',
|
||||
text: 'kurzfristiger Personalausfall',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'FK',
|
||||
summary: 'Fahrradmitnahme begrenzt möglich',
|
||||
text: 'Fahrradmitnahme begrenzt möglich',
|
||||
type: 'hint',
|
||||
},
|
||||
{
|
||||
code: 'EH',
|
||||
summary: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
text: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
type: 'hint',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8000126',
|
||||
name: 'Riedstadt-Goddelau',
|
||||
},
|
||||
cancelled: true,
|
||||
},
|
||||
{
|
||||
tripId: '20250322-01575b72-00ad-36da-bc88-49410d87321a',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: '2025-03-22T00:52:00+01:00',
|
||||
plannedWhen: '2025-03-22T00:52:00+01:00',
|
||||
delay: 0,
|
||||
platform: '103',
|
||||
plannedPlatform: '103',
|
||||
direction: 'Niedernhausen(Taunus)',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's-2',
|
||||
fahrtNr: '35284',
|
||||
name: 'S 2',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DB',
|
||||
name: 'DB Regio, S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: 'FK',
|
||||
summary: 'Fahrradmitnahme begrenzt möglich',
|
||||
text: 'Fahrradmitnahme begrenzt möglich',
|
||||
type: 'hint',
|
||||
},
|
||||
{
|
||||
code: 'EH',
|
||||
summary: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
text: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
type: 'hint',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8004400',
|
||||
name: 'Niedernhausen(Taunus)',
|
||||
},
|
||||
},
|
||||
{
|
||||
tripId: '20250322-2b5b5913-2b2d-39da-b29d-2fff067ba6a2',
|
||||
stop: {
|
||||
type: 'station',
|
||||
id: '8098105',
|
||||
name: 'Frankfurt Hbf (tief)',
|
||||
},
|
||||
when: null,
|
||||
plannedWhen: '2025-03-22T00:52:00+01:00',
|
||||
prognosedWhen: null,
|
||||
delay: null,
|
||||
platform: null,
|
||||
plannedPlatform: '101',
|
||||
prognosedPlatform: '101',
|
||||
direction: 'Frankfurt(Main)Süd',
|
||||
provenance: null,
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 's-4',
|
||||
fahrtNr: '35483',
|
||||
name: 'S 4',
|
||||
public: true,
|
||||
adminCode: '800528',
|
||||
productName: 'S',
|
||||
mode: 'train',
|
||||
product: 'suburban',
|
||||
operator: {
|
||||
type: 'operator',
|
||||
id: 'DB',
|
||||
name: 'DB Regio, S-Bahn Rhein-Main',
|
||||
},
|
||||
},
|
||||
remarks: [
|
||||
{
|
||||
code: undefined,
|
||||
summary: 'S3 und S4: Kein Betrieb möglich. Am 21./22.03.25 von 20:00 Uhr bis voraussichtlich 04:00 Uhr. Grund: Erkrankung von Stellwerkspersonal. Ersatzverkehr mit Bussen eingerichtet. Reiseverbindung frühzeitig prüfen.',
|
||||
text: 'Auf der S3 und S4 ist kein Betrieb möglich. Die Beeinträchtigung ist am 21./22.03.25 von 20:00 Uhr bis voraussichtlich 04:00 Uhr. Der Grund ist eine Erkrankung von Stellwerkspersonal. Wir haben für Sie einen Ersatzverkehr mit 8 Bussen der Firma Holiday-Reisen GmbH zwischen Frankfurt(Main)Hbf und Bad Soden(Taunus) eingerichtet. Außerdem haben wir für Sie einen Ersatzverkehr mit 7 Bussen der Firma Holiday-Reisen GmbH zwischen Frankfurt(Main)Hbf und Kronberg(Taunus) eingerichtet. Bitte informieren Sie sich frühzeitig über Ihre geplanten Verbindungen und wählen Sie gegebenenfalls eine frühere Zugverbindung, um Ihre Anschlüsse an Ihren Umsteigebahnhöfen erreichen zu können.',
|
||||
type: 'warning',
|
||||
},
|
||||
{
|
||||
code: '40',
|
||||
summary: 'defektes Stellwerk',
|
||||
text: 'defektes Stellwerk',
|
||||
type: 'status',
|
||||
},
|
||||
{
|
||||
code: 'FK',
|
||||
summary: 'Fahrradmitnahme begrenzt möglich',
|
||||
text: 'Fahrradmitnahme begrenzt möglich',
|
||||
type: 'hint',
|
||||
},
|
||||
{
|
||||
code: 'EH',
|
||||
summary: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
text: 'Fahrzeuggebundene Einstiegshilfe vorhanden',
|
||||
type: 'hint',
|
||||
},
|
||||
],
|
||||
origin: null,
|
||||
destination: {
|
||||
type: 'station',
|
||||
id: '8002041',
|
||||
name: 'Frankfurt(Main)Süd',
|
||||
},
|
||||
cancelled: true,
|
||||
},
|
||||
];
|
||||
|
||||
export {
|
||||
dbDepartures,
|
||||
};
|
1
test/fixtures/dbris-departures.json
vendored
Normal file
1
test/fixtures/dbris-departures.json
vendored
Normal file
File diff suppressed because one or more lines are too long
2
test/fixtures/dbweb-departures.js
vendored
2
test/fixtures/dbweb-departures.js
vendored
|
@ -1290,7 +1290,7 @@ const dbwebDepartures = [
|
|||
},
|
||||
remarks: [
|
||||
{
|
||||
code: undefined,
|
||||
code: 'HALT_AUSFALL',
|
||||
summary: 'Halt entfällt',
|
||||
text: 'Halt entfällt',
|
||||
type: 'warning',
|
||||
|
|
Loading…
Add table
Reference in a new issue