Specific Next Departures

Version Number

2.0.0

Description

Specific Next Departures returns the times for the next departures at a prescribed stop for a specific mode, line and direction. For example, if the stop is Camberwell Station, Specific Next Departures returns only the times for one line running in one direction (for example, the Belgrave line running towards the city).

Request URL

base URL /v2/mode/%@/line/%@/stop/%@/directionid/%@/departures/all/limit/%@?for_utc=%@ &devid=%@&signature=%@

Parameters

Response

Returns a collection of JSON timetable "values" that have a "platform" and "run" object embedded within them. The "platform" objects have a "stop" and "direction" object in them, and the "direction" object has a "line" object within it. For more information on the data structures, check out the JSON object structure.

Timetable "values" have the following attributes:

:

"run" objects have the following attributes:

"platform" objects have the following attributes:

"stop" objects have these attributes:

"direction" objects have the following attributes:

"Line" objects have the following attributes:

Example use case

Janelle's next enhancement for the tourist app is to let tourists choose which departure times they see for any given stop, by selecting the line and direction. This will mean that if a stop or station has multiple routes or lines stopping there (for example, Flinders Street Station), the tourist won't be bombarded with a confusing list of departure times for multiple lines. Building on the other APIs, Janelle uses the Specific Next Departures API to do this.

supplescroll:lucid theme