Skip to content

Latest commit

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

A Ruby wrapper around the BART API. http://api.bart.gov/

Current gem version

Usage

Create a new station object

require'bart/station'station=Bart::Station.new(abbr: 'ssan')station.name# => "South San Francisco"

See when then next trains are supposed to arrive

station.load_departuresstation.departures.mapdo |d|
[d.destination.name,d.estimates.map{ |e| e.minutes}]end# => [["Pittsburg/Bay Point", [5, 25, 50]], ["Millbrae", [5, 25, 46]]]

Output a list of upcoming departures:

require'bart'putsBart(abbr: :powl).departures# San Francisco Int'l Airport 2, 22# Pittsburg/Bay Point 4, 19

NOTE: This is still beta software. All public APIs are subject to change

Testing

To run the tests run the test Rake task:

$ bundle install
$ bundle exec rake test

About

A Ruby wrapper around the BART API.

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages