Closed Bcow7 closed 5 years ago
@Bcow7 Nice! I like the idea of making the iconclass
available!
However I'm a bit concerned transportation_types
on the station could be interpreted wrongly:
As it's an array a user of the Transport API might think all available transportation types of that station will be returned. But as it's based on the iconclass
from search.ch, only the main transportation type is returned.
How about using an attribute icon
on the station instead? This make it clear it's just for display and should not be used in any kind of transportation type filtering logic.
The mapping from sl-icon-type-
to a simpler value makes sense.
Hello @fabian!
I like the idea, so I committed the modifications you suggested!
By the way could you tell me how you handle so many requests because I saw that search.ch has a daily limit. Did you subscribe to any fee-based offer?
@Bcow7 Awesome, thanks! Merged and live now.
We have an agreement with search.ch to forward the client IP address, so the same daily limit also applies to transport.opendata.ch, but for each individual IP address: https://opendata.ch/2017/06/search-ch-rettet-transport-opendata-ch/
Hi @fabian,
I noticed that stations returned by search.ch API (
/completion
) have specific type and if you choose the wrong station ID some connections will be not displayed in StationBoard.As you can see in the following example, sometimes similar names don't return same type of transportation.
(gare means Bahnhof)
In this example Vevey, gare will return only bus connections.
To improve your very useful API, I added a field _transportationtypes in
/locations
response.e.g /v1/locations?query=Vevey
What do you think about that modification? I think it could be useful for other users...
Regards, Florent