Skip to content

Unofficial client library for the Chicago Transit Authority's Train Tracker API

License

Notifications You must be signed in to change notification settings

atmattpatt/howard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Howard

Unofficial client library for the Chicago Transit Authority's Train Tracker API

Analytics

Installation

Add this line to your application's Gemfile:

gem 'howard'

And then execute:

$ bundle

Or install it yourself as:

$ gem install howard

Usage

Train Tracker API Key

In order to use the Train Tracker API, you will need to apply for an API key.

Once you have your API key, configure it like so:

Howard.api_keys do |key|
  key.train_tracker = "your API key here"
end

Train Arrivals

See train arrivals for a given station or stop.

arrivals = Howard.arrivals(stop: 41400, max: 5)
arrivals.first.route.full_name # => "Brown Line"
arrivals.first.train.run # => "419"
arrivals.first.train.latitude # => 41.97776
arrivals.first.delayed? # => false
arrivals.first.eta.to_s # => "2 min"

Fine Print

This library is not affiliated with or endorsed by the Chicago Transit Authority.

About

Unofficial client library for the Chicago Transit Authority's Train Tracker API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages