New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ny-mta-api

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ny-mta-api

A simple Node JS Wrapper for the MTA API

latest
Source
npmnpm
Version
1.9.0
Version published
Maintainers
1
Created
Source

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/.

FAQs

Package last updated on 26 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts