Transport icon indicating copy to clipboard operation
Transport copied to clipboard

"type" ignored in locations query

Open robachmann opened this issue 7 years ago • 4 comments

I'm trying to get a list of stations but it seems that all location types are returned instead:

doc: http://transport.opendata.ch/docs.html#locations request: http://transport.opendata.ch/v1/locations?query=Z%C3%BCrich-Bahnhofstrasse&type=station response:

...
{"id":null,"name":"UBS Switzerland AG Bahnhofstrasse, Z\u00fcrich, Bahnhofstr. 72","score":null,"coordinate":{"type":"WGS84","x":null,"y":null},"distance":null}
...

I would expect to receive a list with only stations in it, no pois or addresses.

robachmann avatar Feb 03 '18 07:02 robachmann

Correct, the type parameter is currently not supported, there's no matching parameter on https://timetable.search.ch/api/help#stationboard.

fabian avatar Feb 05 '18 08:02 fabian

Use the official list if you're not interested in autocompletion: https://opentransportdata.swiss/de/dataset/didok

helbling avatar Feb 05 '18 17:02 helbling

Thanks, Christian. That list helped a lot and I'm able to query the connections endpoint successfully. @fabian, if you don't plan to support the type query, you're free to close this issue.

Thank you both very much.

robachmann avatar Feb 20 '18 13:02 robachmann

Is it planned to support this parameter anytime in the near future? If not maybe you could remove it from the documentation as it currently implies the parameter is working as expected.

jonaswirth avatar Feb 17 '20 19:02 jonaswirth