Compare commits

...

4 commits

Author SHA1 Message Date
Traines
14b80dbf33 update deps
[skip ci]
2025-03-14 17:28:14 +00:00
Traines
1927f98906 fix station enrichment 2025-03-14 17:19:48 +00:00
Traines
0ef3935a35 update db-hafas-stations, bump version 2025-03-14 16:57:38 +00:00
Traines
b04a671b50 improve duration explanation 2025-03-14 16:57:02 +00:00
4 changed files with 573 additions and 1528 deletions

2082
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"name": "db-vendo-client",
"description": "Client for bahn.de public transport APIs.",
"version": "6.6.1",
"version": "6.6.2",
"type": "module",
"main": "index.js",
"files": [
@ -60,7 +60,7 @@
"dependencies": {
"content-type": "^1.0.5",
"cross-fetch": "^4.1.0",
"db-hafas-stations": "^1.0.0",
"db-hafas-stations": "^1.1.0",
"gps-distance": "0.0.4",
"https-proxy-agent": "^7.0.6",
"luxon": "^3.5.0",

View file

@ -7,7 +7,7 @@ const ADDRESS = 'ADR';
const leadingZeros = /^0+/;
const parseLocation = (ctx, l) => {
const {profile, common} = ctx;
const {profile} = ctx;
if (!l) {
return null;
@ -53,16 +53,6 @@ const parseLocation = (ctx, l) => {
return stop;
}
if (name && common?.locations?.[name] && res.id === null) {
delete res.type;
delete res.id;
return {
...common.locations[name],
...res,
};
}
res.name = name;
res = profile.enrichStation(ctx, res);
@ -87,6 +77,7 @@ const enrichStation = (ctx, stop, locations) => {
...rich,
...stop,
};
delete stop.lines;
}
return stop;
};

View file

@ -26,7 +26,7 @@ Depending on the configured profile, db-vendo-client will use multiple different
| | `db` Profile | `dbnav` Profile | `dbweb` Profile
| ------------- | ------------- | ------------- | ------------- |
| no API key required | ✅ | ✅ | ✅ |
| max duration boards | 12h | 1h | 1h |
| duration for boards | up to 12h | always 1h | always 1h |
| remarks | not for boards | for boards only most important remarks | all remarks on boards and journeys |
| cancelled trips | contained with cancelled flag in journeys, not contained in boards | contained with cancelled flag | contained with cancelled flag |
| tickets | only for `refreshJourney()`, mutually exclusive with polylines | only for `refreshJourney()`, mutually exclusive with polylines | only for `refreshJourney()`, mutually exclusive with polylines |