public-transport / transport.rest

Information about the *.transport.rest APIs.
https://transport.rest/
34 stars 4 forks source link

db-rest stations search: fall back to HAFAS #1

Open HMABUHABIB opened 4 years ago

HMABUHABIB commented 4 years ago

I'm not able to get the train station id for the local train station it's working https://2.db.transport.rest/stations?query=bielefeld Not working https://2.db.transport.rest/stations?query=bielefeld Lohmannshof it was working last week can you please check it

derhuerst commented 4 years ago

db-stations, the underlying data source for the stations search, doesn't contain it anymore:

npm install db-stations
cat node_modules/db-stations/full.ndjson | jq .name | grep -i bielefeld
Bielefeld Ost
Bielefeld Hbf
Brake (b Bielefeld)
Steinhagen (Westf) Bielefelder Straße
Bielefeld-Senne

db-stations only contains DB-operated stations, while their DB HAFAS endpoint knows many other stations operated by other providers. In the mentioned case the API should fall back to the HAFAS endpoint to find it.

derhuerst commented 4 years ago

cc @juliuste, In case he's taking of this anyways…