Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

journeys(): Canceled journeys are missing in API response (DB) #328

Open
Krystex opened this issue Nov 10, 2024 · 0 comments
Open

journeys(): Canceled journeys are missing in API response (DB) #328

Krystex opened this issue Nov 10, 2024 · 0 comments

Comments

@Krystex
Copy link

Krystex commented Nov 10, 2024

Hi all ✋
First of all thanks to the creator and maintainer for this projects, it's immensely helpful!

The problem I encountered: When comparing the results of https://www.bahn.de/ or DB Navigator and hafas-client, somehow canceled journeys are omitted in the API response:

image
const res = await client.journeys('8010085', '8011160', {results: 10, transfers: 0, tickets: true})
for (const journey of res.journeys) {
  const leg = journey.legs[0]
  console.log(`${leg.plannedDeparture} ${leg.line.name}`)
}

results in:

2024-11-10T16:54:00+01:00 EC 172
2024-11-10T18:54:00+01:00 EC 170
2024-11-10T19:54:00+01:00 RJ 256
2024-11-10T20:30:00+01:00 ES 452
2024-11-11T06:00:00+01:00 NJ 456
2024-11-11T06:22:00+01:00 FLX 1230

Am I missing a flag or is the API response malformed?

NOTE: If you read this, the journeys probably don't exist anymore. You can find canceled trips over the DB Verkehrsmeldungen Page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant