Methods
-
<inner> getTrip( db, id, date, callback )
-
Description
Get the Trip (with Route, Service and StopTimes) specified by the Trip ID from the passed database
Parameters
Name Type Description db
RightTrackDB The Right Track DB to query
id
string Trip ID
date
int The date (yyyymmdd) that the Trip operates on
callback
function Callback function
Name Type Attributes Description error
Error Database Query Error
trip
Trip <optional> The selected Trip
Details
-
<inner> getTripByShortName( db, shortName, date, callback )
-
Description
Get the Trip specified by the Trip short name that operates on the specified date
Parameters
Name Type Description db
RightTrackDB The Right Track DB to query
shortName
string Trip short name
date
int Date Integer (yyyymmdd)
callback
function Callback function
Name Type Attributes Description error
Error Database Query Error
trip
Trip <optional> The selected Trip
Details
-
<inner> getTripByDeparture( db, originId, destinationId, departure, callback )
-
Description
Find the Trip that leaves the specified origin Stop for the specified destination Stop at the departure time specified by the DateTime
Parameters
Name Type Description db
RightTrackDB The Right Track DB to query
originId
string Origin Stop ID
destinationId
string Destination Stop ID
departure
DateTime DateTime of trip departure
callback
function Callback function
Name Type Attributes Description error
Error Database Query Error
trip
Trip <optional> The selected Trip
Details
-
<inner> getTripsByDate( db, date [, opts ], callback )
-
Description
Get all Trips effectively running on the specified date
Parameters
Name Type Attributes Description db
RightTrackDB The Right Track DB to query
date
int Date in YYYYMMDD format
opts
Object <optional> Query Options
Name Type Attributes Description routeId
string <optional> GTFS Route ID - get Trips that run on this Route
stopId
string <optional> GTFS Stop ID - get Trips that stop at this Stop
callback
function Callback function
Name Type Attributes Description error
Error Database Query Error
trips
Array.<Trip> <optional> List of Trips
Details