Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • APIHelpers

Index

Constructors

constructor

Properties

Private api

Methods

findLine

  • findLine(lineID: string, withML?: false, ...params: any[]): Promise<undefined | ILine>
  • findLine(lineID: string, withML: true, ...params: any[]): Promise<undefined | ILineWithMLInfo>
  • Searches a specific line according to its name (LineID)

    Parameters

    • lineID: string

      The name of the line (eg: '140', 'A3' etc.)

    • Optional withML: false

      Change the fetch function to webGetLinesWithMLInfo to fetch lines with Masterline data.

    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<undefined | ILine>

  • Parameters

    • lineID: string
    • withML: true
    • Rest ...params: any[]

    Returns Promise<undefined | ILineWithMLInfo>

findStop

  • findStop(stopName: string, routeCodes: string[], ...params: any[]): Promise<{ RouteStopOrder: string; StopAmea: string; StopCode: string; StopDescr: string; StopDescrEng: string; StopHeading: string; StopID: string; StopLat: string; StopLng: string; StopStreet: null | string; StopStreetEng: null | string; StopType: string; routes: string[] }[]>
  • Performs a fuzzy search to find the closest stop names (StopDescr) on multiple routes.

    Parameters

    • stopName: string

      The name of the stop

    • routeCodes: string[]

      The various routeCodes to search for a specific stop

    • Rest ...params: any[]

      Params to pass at the underlying requestFunction

    Returns Promise<{ RouteStopOrder: string; StopAmea: string; StopCode: string; StopDescr: string; StopDescrEng: string; StopHeading: string; StopID: string; StopLat: string; StopLng: string; StopStreet: null | string; StopStreetEng: null | string; StopType: string; routes: string[] }[]>

getDirectionsOfLine

  • getDirectionsOfLine(lineCode: string, ...params: any[]): Promise<{ directions: IDirection[]; isCycle: boolean }>
  • Fetches the directions of a line (IDirection) Uses the webGetRoutes API call.

    Parameters

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

      Params to pass at the underlying requestFunction

    Returns Promise<{ directions: IDirection[]; isCycle: boolean }>

getLinesOfStop

  • getLinesOfStop(stopCode: string, ...params: any[]): Promise<null | ILineOfStop[]>
  • Fetches the different lines passing through a stop

    Parameters

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

      Params to pass at the underlying requestFunction

    Returns Promise<null | ILineOfStop[]>

Generated using TypeDoc