mta-bustime
🚌 Node.js wrapper for MTA-BusTime REST API
Installation
npm install mta-bustime --save
Usage
First, create a BusTime
object with your API key.
const BusTime = var bustime = API_KEY
Then, use the wrapper functions to make requests to the API endpoints and retrieve the responses
// OneBusAway APIbustimebustimebustime var LineRef ='B70' DirectionRef = 0 MonitoringRef = 308194 // SIRI APIbustime
For more information on the API endpoints and available query options for each, see the references below: http://bustime.mta.info/wiki/Developers/OneBusAwayRESTfulAPI http://bustime.mta.info/wiki/Developers/SIRIStopMonitoring
Tests
To run tests on the wrapper functions:
npm test
Responses for test API requests are saved to test/cache
for further inspection.
Dependencies
Dev Dependencies
- tap: A Test-Anything-Protocol library
License
MIT