Giter VIP home page Giter VIP logo

node-cta's Introduction

CTA

A Node.js wrapper for the Chicago Transit Authority's Bus and Train Tracker APIs.

Dependencies

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

Usage

Install

npm install cta

Init

var Cta = require('cta');
Cta.init({busApiKey: "your-bus-api-key-here", trainApiKey: "your-train-api-key-here"});

Train API

Arrivals

Returns arrival times for a particular station identified by either a map id, or stop id. See this appendix page for a complete list.

Parameters
  • Either stopId OR mapId is required. Both cannot be specified.
  • max is optional and specifies a limit of how many arrival times to return
  • route is optional
Example
Cta.Train.Arrivals({stopId: '12345', max: 5})

Trains

Coming Soon

Locations

Coming Soon

Bus API

Arrivals

Coming Soon

Developers

Coffeescript

Run grunt to watch for Coffeescript changes in src and compile them to lib.

Tests

Run grunt mocha to execute your test suite with coverage statistics.

The npm test command runs the test suite without coverage (Travis-CI).

Contribute

Create an issue to report a problem or suggest an improvement.

Pull requests are welcome, just make sure to include tests.

Stay up to date

Watch this project on Github.

Follow Andrew Allen on Twitter.

node-cta's People

Contributors

winton avatar allenan avatar

Stargazers

Jay avatar Christopher Dunn avatar

Watchers

 avatar James Cloos avatar Christopher Dunn avatar Adrianna Misterka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.