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

Chore: Support new Bahn API #47

Open
jensschaefer opened this issue Jan 5, 2025 · 2 comments
Open

Chore: Support new Bahn API #47

jensschaefer opened this issue Jan 5, 2025 · 2 comments

Comments

@jensschaefer
Copy link

The current API is relying on an object being submitted

Curl Example

curl 'https://www.bahn.de/web/api/angebote/fahrplan' \
  -H 'accept: application/json' \
  -H 'content-type: application/json; charset=UTF-8' \
    --data-raw '${Object}'

Object

{"abfahrtsHalt":"A=1@O=Berlin Hbf@X=13369549@Y=52525589@U=80@L=8011160@B=1@p=1733178662@i=U×008065969@","anfrageZeitpunkt":"2025-01-11T10:28:53","ankunftsHalt":"A=1@O=Hannover Hbf@X=9741017@Y=52376764@U=80@L=8000152@B=1@p=1733178662@i=U×008013552@","ankunftSuche":"ABFAHRT","klasse":"KLASSE_2","produktgattungen":["ICE","EC_IC","IR","REGIONAL","SBAHN","BUS","SCHIFF","UBAHN","TRAM","ANRUFPFLICHTIG"],"reisende":[{"typ":"ERWACHSENER","ermaessigungen":[{"art":"KEINE_ERMAESSIGUNG","klasse":"KLASSENLOS"}],"alter":[],"anzahl":1}],"schnelleVerbindungen":true,"sitzplatzOnly":false,"bikeCarriage":false,"reservierungsKontingenteVorhanden":false,"nurDeutschlandTicketVerbindungen":false,"deutschlandTicketVorhanden":false}

This is a great project, and it would be a shame if it were to end. Could you please describe the changes that would need to be made to the current implementation to support the required request objects?

@juliuste
Copy link
Owner

Hey @jensschaefer,
thank you for bringing this up! First of all, I am sorry for not replying and/or taking care of the issue earlier, I had a bit too much stuff on my mind in the last few months (or years hehe). I think I have some capacity again to check and see what needs to be adapted (and maybe even do it myself), but I need a few days to check out the codebase again, as I haven't touched it in quite some while. Will give you an update within the next 1-2 weeks, hope that helps.
For the time being, I will put a banner notifying people that I'm aware of the issue and working on a fix.
Cheers 🙂

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

No branches or pull requests

3 participants