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

refreshJourney never fills price #311

Closed
wolfm89 opened this issue Jan 1, 2024 · 2 comments · Fixed by #310
Closed

refreshJourney never fills price #311

wolfm89 opened this issue Jan 1, 2024 · 2 comments · Fixed by #310

Comments

@wolfm89
Copy link

wolfm89 commented Jan 1, 2024

Hi! I am using the hafas-client lib for a while now and been loving it so far.

I am trying to build a price monitoring platform. So I am using journeys() to find specific journeys with the Deutsche Bahn profile. The price is include for all supported journeys. Then I am storing the refresh token and calling refreshJourney() on a schedule for that selected journey.
The journey in the response always has price: null included, even if the journey shows a price with journeys().

Any idea why this is happening? Or any suggestion how I can get the current price for a previously queried journey?

@derhuerst
Copy link
Member

Coincidentally, @PaulSut recently asked about a very similar (the same?) use case in #296. Check out #310 for a potential solution.

@PaulSut
Copy link
Contributor

PaulSut commented Jan 4, 2024

Yes I think it should solve your issue :)
If a price is included in journeys, you will can receive tickets with refreshJourney. Those contain the available tickets and prices (Supersparpreis, Flexpreis, ...) for your query (make sure to provide age, firstClass, loyaltyCard to refreshJourney).

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

Successfully merging a pull request may close this issue.

3 participants