-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Cancelled trips #19
Comments
AFAIK my API doesn't support it yet. There's more information about how to tell if a trip has been canceled in public-transport/hafas-client#2 and I'm currently rewriting the package that queries the VBB API. So you have to be patient for now. 😉 |
Thank you. It is possible that delay = None is a hint for a cancelled trip? |
it may also mean that there's currently no realtime info available, so no, not reliably. |
In public-transport/vbb-hafas@6bf3531, i have set up logging to collect possible values for |
Note to myself: |
Found it! It is |
Nice! That is useful. I‘m gonna integrate it in my MagicMirror module. |
Sry, with the next release after the one I just released. 😛 |
My rewrite (which will likely become |
The changes should be live at |
I‘ll look into it! Thanks a lot. |
When I do a simple departure request
Is the new "cancelled" key only available when a trip is cancelled? |
Yup. Wasn't sure what's the best way to specify this. Because there are many keys that are not being used all the time, I implemented |
IMHO: I think that is an important information for everyone. One should be able to see it at a glance. I strongly suggest to show the key all the time. Furthemore I found nothing in the API Docs. Did I miss something? As you said, there are only a few cancelled trips a day. It is (for me) quite challenging to test an application without it. |
Fair point! You're welcome do discuss this with us over at public-transport/friendly-public-transport-format#27 Regarding testing: Yeah, this is extremely annoying. I have the same problem all the time. Currently, my tests mainly check if the parsed response looks reasonable, but they can't tell if the values are actually correct. For now, I've refrained to mock the API for two reasons: a) It's significantly more work to constantly adapt the mock and b) because I don't test against the real API anymore, which might change underneath at any time. |
Despite the general question I'm happy to discuss with you in the other thread, I've found a cancelled trip without the cancelled key: Information auf mobile.bahn,de S 85 >> Berlin-Waidmannslust The API result is:
|
Interesting. When I first loaded the departures page for Please check against the VBB website in the future, as |
The departure from Wittenau at 07:32 this morning with line S26 was cancelled. The result from the API was:
The VBB-Website shows the following:
The URL was
|
Another answer from the API without the "cancelled trip" key:
|
Will look into this, thanks! |
I had only added the |
I will close this for now. Please reopen if this issue still persists. |
FYI the discussion has been taken further in #26 and then in public-transport/friendly-public-transport-format#27. Our decision:
|
This has been published as |
First of all: Thank you for your service.
I'm trying to build a display which shows the next departure at my favorite S-Bahn station. Your API is a great help to realize it.
Regarding the output I have a question:
How can I recognize that a trip has been canceled?
Example:
Response from http://mobile.bahn.de/:
S 85 >> Berlin-Schöneweide (S)
10:08 Fahrt fällt aus, Gl. 2
Response from the API:
{'direction': 'S Schöneweide', 'station': {'products': {'suburban': True, 'regional': False, 'express': False, 'tram': False, 'bus': False, 'ferry': False, 'subway': False}, 'name': 'S+U Wittenau', 'coordinates': {'longitude': 13.335479, 'latitude': 52.596388}, 'id': '900000096101', 'type': 'station'}, 'remarks': [None, None], 'trip': 43004, 'line': {'class': 1, 'productCode': 0, 'nr': 85, 'productName': 'S-5', 'name': 'S85', 'symbol': 'S', 'product': 'suburban', 'express': False, 'metro': False, 'night': False, 'id': 's85', 'type': 'line', 'mode': 'train'}, 'ref': '1|43004|2|86|5122017', 'when': '2017-12-05T10:08:00+01:00', 'delay': None}
Thanks in advance!
The text was updated successfully, but these errors were encountered: