1.9.0 • Published 1 year ago

ny-mta-api v1.9.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

MTA API

A simple Node JS Wrapper to interact with the NYC MTA transit system's API using TypeScript. Get information about busses such as distance from a stop, passengers, ID, and more!

Initializing the client

To obtain a MTA API Key/Token please click here!

import MTAClient from "ny-mta-api";
const client = new MTAClient("YOUR_MTA_TOKEN");

Or with JavaScript

const MTAClient = require('ny-mta-api').default;
const Client = new MTAClient("YOUR_TOKEN");

getStop()

async function getStop(id:Number) {
  console.log(await client.getStop(id))
};

getStop(202650);

More methods/functions to come soon™️ (Trains & More!)

Disclaimer

We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with the MTA, or any of its subsidiaries or its affiliates. The official MTA website can be found at https://new.mta.info/.

1.9.0

1 year ago

1.3.0

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.4

1 year ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago