slow-zone
Version:
A client & wrapper for CTA 'L' arrival data
16 lines (15 loc) • 555 B
TypeScript
import { parseTrain } from "./parsers/train.js";
export type Arrival = ReturnType<typeof parseTrain>;
export declare const VERSION: string;
export default class SlowZone {
apiKey: string;
constructor(options: {
apiKey: string;
});
getArrivalsForStation(stationId: string | number, options?: {}): Promise<Arrival[]>;
getArrivalsForStop(stopId: string | number, options?: {}): Promise<Arrival[]>;
followTrain(runId: string | number): Promise<Arrival[]>;
private getArrivals;
private fetch;
private makeRequest;
}