trimet-api-client
v2.0.5
Published
A Promise-based TriMet API client for transit arrival times in Portland, OR.
Downloads
26
Readme
API wrapper for TriMet, written in Node. Note: This is a work-in-progress. Will be uploading it as an official NPM package soon.
NPM package: https://www.npmjs.com/package/trimet-api-client
Usage
var TriMetAPI = require('trimet-api');
var TriMetAPIInstance = new TriMetAPI(YOUR_TRIMET_API_KEY);
Get next arrival for bus at given stop
TriMetAPIInstance.getNextArrivalForBus(stopID, busID, function(arrival){ var minutesRemaining = arrival.getMinutesUntilArrival(); console.log("Bus " + busID + " arriving in " + minutesRemaining + " min"); });
Building
To make changes and build them to the "dist" folder, use:
npm install
npm run build