Find a file
2024-12-07 18:29:16 +00:00
.github CI: don't lint more than once 💚 2024-09-25 21:56:15 +02:00
format /locations, /locations/nearby, fixes 2024-12-07 18:29:16 +00:00
lib /locations, /locations/nearby, fixes 2024-12-07 18:29:16 +00:00
p /locations, /locations/nearby, fixes 2024-12-07 18:29:16 +00:00
parse initial db-vendo with /journeys (wip) 2024-12-07 16:17:16 +00:00
test initial db-vendo with /journeys (wip) 2024-12-07 16:17:16 +00:00
.editorconfig Node 6+, cleanup 2016-12-14 00:22:02 +01:00
.eslintrc.json linting: add rules based on @stylistic/eslint-plugin 2024-02-10 16:49:38 +01:00
.gitignore tap@18 2023-09-27 19:58:49 +03:00
api.js initial db-vendo with /journeys (wip) 2024-12-07 16:17:16 +00:00
contributing.md contributing.md: link to testing docs 📝 2023-12-07 00:54:56 +01:00
index.js /locations, /locations/nearby, fixes 2024-12-07 18:29:16 +00:00
license.md readme: link to Travel-Status-DE-HAFAS 📝 2024-01-18 15:27:29 +01:00
package.json initial db-vendo with /journeys (wip) 2024-12-07 16:17:16 +00:00
readme.md initial db-vendo with /journeys (wip) 2024-12-07 16:17:16 +00:00
retry.js apply linting rules 2024-02-10 16:50:12 +01:00
throttle.js apply linting rules 2024-02-10 16:50:12 +01:00

db-vendo-client

A client for the new "vendo" bahn.de APIs, a drop-in replacement for hafas-client.

ISC-licensed support Jannis via GitHub Sponsors

This is a very early version. What works:

  • rudimentary /journeys including lowest prices

What doesn't work (yet):

  • /journeys details like scheduledDays, stop/station groups, tickets, some line details (see TODO's scattered around the code)...
  • all other endpoints

Also consult the relevant documentation of hafas-client (but beware of the limited functionality of db-vendo-client).

Background

After DB has switched to the new "vendo" platform for bahn.de and DB Navigator, the old HAFAS api (see hafas-client) seems to become less and less reliable (server unreachable, missing prices, etc.) This project aims to enable easy switching to the new APIs. However, not all information will be available from the new APIs.

Strictly speaking, permission is necessary to use this library with the bahn.de APIs.

Usage

See an example in api.js. It shows how you can use db-vendo-client together with hafas-rest-api in order to run a FPTF API server.

There are community-maintained TypeScript typings available as @types/hafas-client.

API

API documentation

Contributing

If you have a question, found a bug or want to propose a feature, please open an Issue.

This project needs help! Check the list of "help wanted" Issues.

If you're contributing code, please read the contribution guidelines.