OpendataCH / Transport

Swiss public transport API
http://transport.opendata.ch/
MIT License
241 stars 50 forks source link

Limit for connections not working ? #128

Closed ghost closed 8 years ago

ghost commented 8 years ago

I've been trying to get only one connection from a city (e.g. Aarau ) to another (e.g. Aarberg ) and even after passing the limit parameter to the request URL there are more than 10 connections returned . Am I doing something wrong ? This is the request URL I tried to use http://transport.opendata.ch/v1/connections?from=Aarau&to=Aarberg&limit=1 . Am I using the parameter incorrectly ? The documentation for the parameter is pretty vague as it doesn't say how to request less connections all it says is this. capture

fabian commented 8 years ago

Two connections are returned because they depart at the same time (14:46).

This is as documented.

Unfortunately at the moment there's no way to avoid this in the Transport API, you will have to further filter the connections on the client.

Closing as duplicate of https://github.com/OpendataCH/Transport/issues/51