Sha256: d6ba61d1c39114cdf838f1ed2066955f613dfd09ce27e4121b591fe663cff496
Contents?: true
Size: 1.24 KB
Versions: 2
Compression:
Stored size: 1.24 KB
Contents
OneBusAway API -------------- Unofficial Ruby library for interacting with the [OneBusAway API](http://code.google.com/p/onebusaway/wiki/OneBusAwayApiReference) ### Documentation & Requirements * REXML ### Examples Basic usage: require 'rubygems' require 'onebusaway' Onebusaway.api_key = 'YOUR_API_KEY' # find a stop by id - returns a Onebusaway::Stop instance stop = Onebusaway.stop_by_id(:id => "1_10020") # find a route by id - returns a Onebusaway::Route instance route = Onebusaway.route_by_id(:id => "1_30") # find stops nearby a given latitude and longitude # - returns an array of Onebusaway::Stop instances stops = Onebusaway.stops_for_location(:lat => "47.66", :lon => "-122.29") # find routes nearby a given latitude and longitude # - returns an array of Onebusaway::Route instances routes = Onebusaway.routes_for_location(:lat => "47.66", :lon => "-122.29") # find stops for a route - returns an array of Onebusaway::Stop instances stops = Onebusaway.stops_for_route(:id => "1_30") # find arrivals/departures for a given stop # - returns an array of Onebusaway::ArrivalAndDeparture instances arrivals = Onebusaway.arrivals_and_departures_for_stop(:id => "1_570")
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
onebusaway_updated-0.2.0 | README.markdown |
onebusaway-0.1.0 | README.markdown |