Skip to content
/ bart Public
forked from jish/bart

A ruby wrapper around the BART API.

Notifications You must be signed in to change notification settings

nbfowler/bart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Usage

Create a new station object

require 'bart/station'

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

And see when then next trains are supposed to arrive

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

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

About

A ruby wrapper around the BART API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%