UNPKG

tfl-api-wrapper

Version:

A Node JS wrapper for the Transport for London API

44 lines (43 loc) 1.69 kB
import TfL from './interfaces/tfl'; import TfLAPI from './tfl'; export default class Road extends TfLAPI { constructor(config: string); /** * Get all roads managed by TfL */ getAll(): Promise<Array<TfL['RoadCorridor']>>; /** * Get the road with the specified ID (Eg. A1) * @param ids ID(s) of the road(s) */ getByID(ids: Array<string>): Promise<Array<TfL['RoadCorridor']>>; /** * Gets the specified roads with the status aggregated over the date range specified, or now until the end of today if no dates are passed * @param ids * @param startDate * @param endDate */ getStatusByID(ids: Array<string>, startDate?: Date, endDate?: Date): Promise<Array<TfL['RoadCorridor']>>; /** * Gets a list of disrupted streets * @param startDate * @param endDate */ getAllStreetDisruption(startDate: Date, endDate: Date): Promise<Array<TfL['RoadDisruption']>>; /** * Gets a list of active disruptions filtered by disruption Ids. * @param ids * @param stripContent When true, removes every property/node * except for id, point, severity, severityDescription, * startDate, endDate, corridor details, location and comments. */ getAllDisruptionsByID(ids: Array<string>, stripContent?: boolean): Promise<Array<TfL['RoadDisruption']>>; /** * Gets a list of valid RoadDisruption categories */ getCategories(): Promise<Array<string>>; /** * Gets a list of valid RoadDisruption severity codes */ getSeverities(): Promise<Array<TfL['StatusSeverity']>>; }