Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • APIRequests

Index

Constructors

constructor

Methods

getBusLocation

  • getBusLocation(routeCode: string, ...params: any[]): Promise<null | IBusLocation[]>
  • Fetch the locations of all the buses on a route

    Parameters

    • routeCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | IBusLocation[]>

getClosestStops

  • getClosestStops(x: string, y: string, ...params: any[]): Promise<null | ISchedule>
  • Fetch the nearest stops around a specific geo-point

    Parameters

    • x: string

      latitude

    • y: string

      longitude

    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | ISchedule>

getDailySchedule

  • getDailySchedule(lineCode: string, ...params: any[]): Promise<null | ISchedule>
  • Fetch the daily schedule for a line When this schedule exists, it overrides the schedule fetched by getSchedLines

    Parameters

    • lineCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | ISchedule>

getSchedLines

  • getSchedLines(mlCode: string, sdcCode: string, lineCode: string, ...params: any[]): Promise<null | ISchedule>

getScheduleDaysMasterline

  • getScheduleDaysMasterline(lineCode: string, ...params: any[]): Promise<null | IScheduleDay[]>
  • Fetch the different types of schedules for a line

    Parameters

    • lineCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | IScheduleDay[]>

getStopArrivals

  • getStopArrivals(stopCode: string, ...params: any[]): Promise<null | IArrival[]>
  • Fetch all the bus arrivals at a specific stop

    Parameters

    • stopCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | IArrival[]>

webGetLines

  • webGetLines(...params: any[]): Promise<ILine[]>
  • Fetch all lines

    Parameters

    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<ILine[]>

webGetLinesWithMLInfo

  • Fetch all the lines along with their Masterline information It is mostly equivalent to webGetLines, but fetches some information useful for fetching schedules afterwards.

    Parameters

    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<ILineWithMLInfo[]>

webGetRoutes

  • webGetRoutes(lineCode: string, ...params: any[]): Promise<null | IRoute[]>
  • Fetch routes of a single line

    Parameters

    • lineCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | IRoute[]>

webGetRoutesDetailsAndStops

  • webGetRoutesDetailsAndStops(routeCode: string, ...params: any[]): Promise<null | IRouteDetailsAndStops>
  • Fetch the path of a route (geo-points) along with its stops (It's a combination of webRouteDetails and {@link @webGetStops})

    Parameters

    • routeCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | IRouteDetailsAndStops>

webGetStops

  • webGetStops(routeCode: string, ...params: any[]): Promise<null | IStop[]>
  • Fetch the stops of a route

    Parameters

    • routeCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | IStop[]>

webRouteDetails

  • webRouteDetails(routeCode: string, ...params: any[]): Promise<null | IRouteDetail[]>
  • Fetch the path of a route (geo-points)

    Parameters

    • routeCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | IRouteDetail[]>

webRoutesForStop

  • webRoutesForStop(stopCode: string, ...params: any[]): Promise<null | IRouteOfStop[]>
  • Fetch the routes passing through a stop

    Parameters

    • stopCode: string
    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<null | IRouteOfStop[]>

Generated using TypeDoc