You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In many cases, queries for the next arrivals at a station are interested in all arrivals, not just those from a particular route. However, the current RPC argument structure for the visits_* family is (station, route, timestamp, count), meaning route is not a parameter that can be omitted.
To allow for both calls that request arrivals from a particular route and that don't, a better RPC definition is:
Note that the route parameter is optional, but is not the last parameter. The current WAMP library that timetable uses does not allow for optional parameters, nor does it allow registering multiple procedures under the same name. In other words, this structure is not possible with the current WAMP library, but is the ideal case and should be considered if the underlying WAMP library changes.
For now, however, a simple fix is to create two distinct procedures that take these different argument sets. They could be:
…rder.
`visits_between` seems to be the call that will be made most commonly, so testing with it is more accurate to real-world use.
Per #5, the argument order of the RPCs has been adjusted to have `route` as the next-to-last parameter. At the moment, only the route-agnostic RPC is implemented.
Per #6, `route` and a temporary `headsign` placeholder have been added to each visit in an RPC response. I'm not entirely sure that `headsign` is a rational field to include, as it is an optional GTFS field, and doesn't really provide any information that can't be gleaned from the route itself.
In many cases, queries for the next arrivals at a station are interested in all arrivals, not just those from a particular route. However, the current RPC argument structure for the
visits_*
family is(station, route, timestamp, count)
, meaningroute
is not a parameter that can be omitted.To allow for both calls that request arrivals from a particular route and that don't, a better RPC definition is:
Note that the
route
parameter is optional, but is not the last parameter. The current WAMP library that timetable uses does not allow for optional parameters, nor does it allow registering multiple procedures under the same name. In other words, this structure is not possible with the current WAMP library, but is the ideal case and should be considered if the underlying WAMP library changes.For now, however, a simple fix is to create two distinct procedures that take these different argument sets. They could be:
This should handle the structure for now, but should not be considered a final solution.
The text was updated successfully, but these errors were encountered: