UNPKG

tfl-api-wrapper

Version:

A Node JS wrapper for the Transport for London API

31 lines (30 loc) 1.78 kB
import TfLAPI from './tfl'; import * as ITrackerNet from './interfaces/trackerNet'; import TrackerNetLines from './enums/trackerNet/lines'; import TrackerNetStations from './enums/trackerNet/stations'; declare type ValueOf<T> = T[keyof T]; export default class TrackerNet extends TfLAPI { constructor(config: string); /** * This will return train prediction information for a nominated line within 100 minute range * @param line A line to get predictions from e.g. "C" */ getPredictionSummary(line: TrackerNetLines | ValueOf<TrackerNetLines>): Promise<ITrackerNet.getPredictionSummary.Root>; /** * Get detailed train prediction information for a nominated station on a nominated line within 100 minute range. * @param line A line to get predictions from e.g. "C" * @param stationCode A line to get predictions from e.g. "BNK" */ getPredictionDetailed(line: TrackerNetLines | ValueOf<TrackerNetLines>, stationCode: TrackerNetStations | ValueOf<TrackerNetStations>): Promise<ITrackerNet.getPredictionDetailed.Root>; /** * Get the status of all lines on the network indicating any delays, disruptions or suspensions on the lines. * @param incidentsOnly An indication of whether only lines that have incidents should be returned. Default: false */ getAllLinesStatus(incidentsOnly?: boolean): Promise<ITrackerNet.getAllLinesStatus.Root>; /** * Get the status of all stations on the network indicating any disruptions or closures of stations. * @param incidentsOnly Get station status information for stations with incidents only. Default: false */ getAllStationStatus(incidentsOnly?: boolean): Promise<ITrackerNet.getAllStationStatus.Root>; } export {};