Closed wolfm89 closed 4 months ago
Coincidentally, @PaulSut recently asked about a very similar (the same?) use case in https://github.com/public-transport/hafas-client/issues/296. Check out https://github.com/public-transport/hafas-client/pull/310 for a potential solution.
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).
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 callingrefreshJourney()
on a schedule for that selected journey. The journey in the response always hasprice: null
included, even if the journey shows a price withjourneys()
.Any idea why this is happening? Or any suggestion how I can get the current price for a previously queried journey?