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_stations("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
- Fork it ( https://github.com/bennacer860/ruby_wmata/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request