api-railway
Version:
Api wrapper for api.railwayapi.site
16 lines (15 loc) • 648 B
TypeScript
import { Client } from "./index.js";
import type { ScheduleRow, TrainNumber } from "./types.js";
export default class Schedules {
private readonly baseUrl;
private readonly headers;
constructor(client: Client);
getScheduleParts(trainNumber: TrainNumber, fullSchedule?: boolean): {
url: string;
headers?: Record<string, string>;
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
params: Record<string, string>;
body: BodyInit | null;
};
getSchedule(trainNumber: TrainNumber, fullSchedule?: boolean): Promise<[Error] | [undefined, import("./types.js").ApiError | ScheduleRow[]]>;
}