Open RBeerDevelopment opened 1 year ago
This is tricky, because the VBB HAFAS API used by vbb-rest
…
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.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):
But hafas-client
already supports filtering by such "line IDs":
Let's wait until the VBB HAFAS API returns them, then we can implement this for vbb-rest
.
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.