Open debfx opened 4 years ago
Thanks for reporting this, I'd definitely like to expose the info that the remark is something like a "warning"!
The easiest solution would be to add
HimWarn: 'warning'
tocodesByIcon
in parse/hint.js but I'm not sure if this would be appropriate to put it into thecode
field.
In type
, I wanted to try to answer the question "What is the remark about?". Having type: 'warning'
wouldn't tell me that the remark is about the status of a train/connection, even though the content of the remark might actually be.
But right now, hafas-client
doesn't parse the remarks in a meaningful way, and I'm planning to overhaul the remarks parsing anyways in order to handle the sheer variety of messages out there. See #5, #90 and #131.
PR welcome!
related: The Deutsche Bahn official Timetable API docs have codes on the last 2 pages.
The DB website shows some status remarks with a red exclamation icon instead of a gray one. However the hafas-client journeys() response doesn't expose this distinction.
Example:
Corresponding icon:
{"res":"HimWarn"}
hafas-client response:
The easiest solution would be to add
HimWarn: 'warning'
tocodesByIcon
in parse/hint.js but I'm not sure if this would be appropriate to put it into thecode
field.