Open Colum31 opened 2 years ago
I will look at this once I'm back at my computer, probably on Tuesday.
If you want to dig into this in the meantime, the logic for this is in vbb-stations-autocomplete.
This happens because vbb-rest#5
uses an outdated version of vbb-stations
(^4
), which contains a list of all VBB stations. For now, I suggest using the /locations?query=…
route, which uses HAFAS underneath instead of vbb-stations
:
curl 'https://v5.vbb.transport.rest/locations?query=mehringd&addresses=false&poi=false&results=3' -s | jq
[
{
"type": "stop",
"id": "900000017101",
"stationDHID": "de:11000:900017101",
"name": "U Mehringdamm",
"location": {
"type": "location",
"id": "900017101",
"latitude": 52.49357,
"longitude": 13.388138
},
"products": {
"suburban": false,
"subway": true,
"tram": false,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
},
// …
]
When I try to query a station by the name, the API always returns an empty response.
To reproduce (the example in the documentation):
Best regards Daniel