You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the /stops/:id/departures and the /stops/:id/arrivals only take the direction and the duration as filter arguments.
However, sometimes it would also be interesting (or easier) to filter by a specific line (eg. ?line=u5) or do this in addition to the existing filters.
The text was updated successfully, but these errors were encountered:
This is tricky, because the VBB HAFAS API used by vbb-rest…
…doesn't necessarily support a "line ID" that matches what people would intuitively call a "line" (e.g. S8, M8 or X1). – Instead, a "line" seems to be a group of trips grouped under a name in the schedule data that HAFAS has been fed with; So wether the "lines" make sense seems to depend on the structure of VBB internal schedule data.
…currently doesn't return those HAFAS "line IDs", even though e.g. the Deutsche Bahn HAFAS API does.
Also, even if the VBB HAFAS API returned proper line IDs, hafas-client wouldn't parse & expose them (just as id with fallback to slugg(name), which is not usable for filtering):
In any case, having this filtering by "line ID" in hafas-rest-api would be beneficial for all HAFAS APIs that return them – specifically, db-rest would gain this functionality. If you want to implement this, please submit a Pull Request! 🙌
Currently the /stops/:id/departures and the /stops/:id/arrivals only take the direction and the duration as filter arguments.
However, sometimes it would also be interesting (or easier) to filter by a specific line (eg. ?line=u5) or do this in addition to the existing filters.
The text was updated successfully, but these errors were encountered: