RubyWmata

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'ruby_wmata'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby_wmata

Usage

You will need to get your own api_key from here Setup you api key first

WMATA.api_key = "xxxxxxx"

And then you can make you api calls like this

WMATA.next_trains("A01")

In this case we have used the station name code as argument, you can determine the code for each station by making a simple code on a specific line

WMATA.train_station("RD")

In this case 'RD' is the code name for the 'red line', you can find all those line code name by making a simple call

WMATA.lines

Another cool feature you can make is to find the path between two stations

WMATA.train_path("A01","A15")

Contributing

  1. Fork it ( https://github.com/[my-github-username]/ruby_wmata/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request