Repository metrics
- Stars
- (353 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Both the Deutsche Bahn (DB) website as well as their app have a feature called "best price search" or "Bestpreissuche", which works just like the regular journeys() (TripSearch in HAFAS), except that it returns the lowest-price journeys for each time bracket.
The details of this BestPriceSearch call are documented at https://github.com/juliuste/db-prices/issues/33#issuecomment-1538776446 . It's response data looks like the one of a TripSearch call, but it also has a field res.outDaySegL that groups the journeys in res.outConL[] into time brackets.
Not sure how this functionality should be exposed:
- We could let
journeys()always parse & expose a grouping/bracketing of journeys as soon as the HAFAS response contains it. A DB-specificopt.bestPriceSearchoption would useBestPriceSearchandoutTime: "000000". - Within the DB profile, we could implement it as an entirely separate
hafas-clientmethod. It would have to share much of the logic withjourneys(). Currently, we don't have a mechanism to let profiles add methods though.
pyhafas equivalent Issue: https://github.com/FahrplanDatenGarten/pyhafas/issues/26