A Node.js wrapper for the Chicago Transit Authority's Bus and Train Tracker APIs.
In order to use this package, you must first have bus and/or train api keys from the
You can apply for a train tracker api key here: http://www.transitchicago.com/developers/traintrackerapply.aspx
and a bus tracker api key by following the instructions here: http://www.transitchicago.com/developers/bustracker.aspx
npm install cta
var Cta = require('cta');
Cta.init({busApiKey: "your-bus-api-key-here", trainApiKey: "your-train-api-key-here"});
Returns arrival times for a particular station identified by either a map id, or stop id. See this appendix page for a complete list.
- Either
stopId
ORmapId
is required. Both cannot be specified. max
is optional and specifies a limit of how many arrival times to returnroute
is optional
Cta.Train.Arrivals({stopId: '12345', max: 5})
Coming Soon
Coming Soon
Coming Soon
Run grunt
to watch for Coffeescript changes in src
and compile them to lib
.
Run grunt mocha
to execute your test suite with coverage statistics.
The npm test
command runs the test suite without coverage (Travis-CI).
Create an issue to report a problem or suggest an improvement.
Pull requests are welcome, just make sure to include tests.
Watch this project on Github.
Follow Andrew Allen on Twitter.