mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-06-19 10:42:33 +03:00
Compare commits
4 commits
9975a6c9ac
...
14b80dbf33
Author | SHA1 | Date | |
---|---|---|---|
|
14b80dbf33 | ||
|
1927f98906 | ||
|
0ef3935a35 | ||
|
b04a671b50 |
4 changed files with 573 additions and 1528 deletions
2082
package-lock.json
generated
2082
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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 |
|
||||
|
|
Loading…
Add table
Reference in a new issue