Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"type" ignored in locations query #187

Open
robachmann opened this issue Feb 3, 2018 · 4 comments
Open

"type" ignored in locations query #187

robachmann opened this issue Feb 3, 2018 · 4 comments

Comments

@robachmann
Copy link

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.

@fabian
Copy link
Member

fabian commented Feb 5, 2018

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

@helbling
Copy link

helbling commented Feb 5, 2018

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

@robachmann
Copy link
Author

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.

@jonaswirth
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants