Project

ruby_wmata

0.0
No commit activity in last 3 years
No release in over 3 years
With this gem you will be able to retrieve realtime information about stations, trains and incidents.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 0.13.3
~> 10.0
~> 3.1.0
~> 1.20.4
 Project Readme

RubyWmata Code Climate

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

  1. Fork it ( https://github.com/bennacer860/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