ttc-api
Version:
A fully typed Tbilisi Transport Company API Wrapper
54 lines (51 loc) • 1.54 kB
TypeScript
import { Locale, BusStop, Bus, LatLng, BusPlan, BusLocation, BusArrival } from './types.js';
declare const ttc: {
setLocale: typeof setLocale;
stops: typeof stops;
stop: typeof stop;
routes: typeof routes;
plan: typeof plan;
busPolyline: typeof busPolyline;
locations: typeof locations;
stopRoutes: typeof stopRoutes;
busRoutes: typeof busRoutes;
arrivalTimes: typeof arrivalTimes;
};
declare function setLocale(locale: Locale): void;
declare function stops(params?: {
locale?: Locale;
}): Promise<BusStop[]>;
declare function stop(stopId: string): Promise<BusStop>;
declare function routes(params?: {
locale?: Locale;
}): Promise<Bus[]>;
declare function plan({ from, to, locale, }: {
from: LatLng;
to: LatLng;
locale?: Locale;
}): Promise<BusPlan>;
declare function busPolyline({ busId, forward, }: {
busId: string;
forward?: boolean;
}): Promise<{
encodedValue: string;
}>;
declare function locations({ busId, forward, }: {
busId: string;
forward?: boolean;
}): Promise<BusLocation[]>;
declare function stopRoutes({ stopId, locale, }: {
stopId: string;
locale?: Locale;
}): Promise<Bus[]>;
declare function busRoutes({ busId, forward, locale, }: {
busId: string;
forward?: boolean;
locale?: Locale;
}): Promise<BusStop[]>;
declare function arrivalTimes({ stopId, locale, ignoreScheduledArrivalTimes, }: {
stopId: string;
locale?: Locale;
ignoreScheduledArrivalTimes?: boolean;
}): Promise<BusArrival[]>;
export { ttc };