Bubus

API Client for playing with the BU Bus API. The BU Bus API is an internal, undocumented API Boston University uses to show students bus locations. It requires no authentication making it simple for anyone to work with. This gem handles the HTTP requests and abstracts the responses into ruby objects, making it very simple to work with.

Installation

Add this line to your application's Gemfile:

gem 'bubus'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bubus

Usage

$ client = BuBus::Client.new

$ client.buses {|bus| ... } # returns array of Bus objects, takes optional block
$ client.stops {|stop| ... } # returns array of Stop objects, takes optional block

Bus

Bus object to abstract bus data
call_name: id
coordinates: "lng, lat"
general_heading: degrees clockwise from North
id: another id 
speed:  measuered in meters / hour 
lat: latitude of bus's current position
lon: longitude of bus's current position

Stop

Stop object to abstract bus stop data
id: id
name: name of bus stop
description: address of bus stop
lat: latitude of bus stop
lon: longitude of bus stop
times - array of estimated arrival times at bus stop

Contributing

  1. Fork it ( https://github.com/[my-github-username]/bubus/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