mta-gtfs-realtime
v0.0.1
Published
Realtime GTFS data for MTA
Downloads
30
Maintainers
Readme
MTA GTFS Realtime
This is a basic client to interact with the MTA GTFS feed(s).
import { GTFSClient, TransitType } from 'mta-gtfs-realtime';
const client = new GTFSClient({});
client.poll({
agency: 'MTA NYCT', // should correspond with the internal GTFS agency IDs (MTA NYCT for subway/bus, LI for LIRR, and 1 for MNR),
transitType: TransitType.RAPID_TRANSIT, // define the transit type to poll
routes: ['a'], // optional - defines the routes to poll for - only relevant for subway
});