Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default
    • Line

Index

Constructors

  • new Line(config: string): Line
  • Parameters

    • config: string

    Returns Line

Properties

appKey: string

Methods

  • getAllByModes(modes: string[]):
  • Gets all lines that serve the given modes

    Parameters

    • modes: string[]

      An array of modes e.g. tube, tram

    Returns

  • getAllStopPoints(line: string):
  • Gets a list of the stations that serve the given line id

    Parameters

    • line: string

    Returns

  • getAllValidRoutes(serviceTypes?: string):
  • Get all valid routes for all lines, including the name and id of the originating and terminating stops for each route.

    Parameters

    • Optional serviceTypes: string

      A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified

    Returns

  • getArrivalsByNaptan(ids: string[], NaptanID: string, direction?: string, destinationStationId?: string):
  • Get the list of arrival predictions for given line ids based at the given stop

    Parameters

    • ids: string[]

      list of line ids e.g. ['victoria','circle','N133']

    • NaptanID: string

      Id of stop to get arrival predictions for (station naptan code e.g. 940GZZLUASL)

    • direction: string = 'all'

      Optional. The direction of travel. Can be inbound or outbound or all. Default: all

    • Optional destinationStationId: string

      Optional. Id of destination stop

    Returns

  • getDisruptionCategories():
  • Gets a list of all disruption types

    Returns

  • getDistruptionsByID(ids: string[]):
  • Get disruptions for the given line ids

    Parameters

    • ids: string[]

      list of line ids e.g. ['victoria','circle','N133']

    Returns

  • getModes():
  • getServiceTypes():
  • getSeverityCodes():
  • getStatusByLine(lines: string[], detail?: boolean, startDate?: Date, endDate?: Date):
  • Gets the line status of for given line ids e.g Minor Delays

    Parameters

    • lines: string[]

      A list of line ids e.g. victoria, circle, N133

    • detail: boolean = false

      Include details of the disruptions that are causing the line status including the affected stops and routes

    • Optional startDate: Date
    • Optional endDate: Date

    Returns

  • getStatusByModes(modes: string[], detail?: boolean, severityLevel?: string):
  • Gets the line status of for all lines for the given modes

    Parameters

    • modes: string[]

      A comma-separated list of modes to filter by. e.g. tube,dlr

    • Optional detail: boolean

      Include details of the disruptions that are causing the line status including the affected stops and routes

    • Optional severityLevel: string

      If specified, ensures that only those line status(es) are returned within the lines that have disruptions with the matching severity level

    Returns

  • getTimetableFromStation(line: string, NaPTANID: string, direction?: string):
  • Gets the inbound timetable for a specified station on the give line

    Parameters

    • line: string

      Id of the line e.g. 'victoria'

    • NaPTANID: string
    • Optional direction: string

      What direction you want the timetable for. Leave blank for outbound or 'inbound'

    Returns

  • getTimetableFromTo(line: string, from: string, to: string):
  • Gets the timetable for a specified station on the give line with specified destination

    Parameters

    • line: string
    • from: string
    • to: string

    Returns

Generated using TypeDoc