ruby_rides
A Ruby gem to interface with Hubway's API.
Installation
gem install ruby_rides
Alternately, you can include this line in your Gemfile...
gem 'ruby_rides'
And bundle install.
$ bundle
Configuration
To use the gem, you'll need to register with the Hubway data API, linked below, to acquire a username and apikey.
http://hubwaydatachallenge.org/data-api/
Define a client using your credentials, which I'd suggest you access using a .env file. Once this is set up, you can access gem methods in your application.
client = RubyRides::Client.new(client_id: YOUR_USERNAME, client_api_key: YOUR_APIKEY)
Usage
Return a hash listing data for all Hubway stations in the dataset.
client.station_data
Return a location hash of all Hubway stations in the dataset with lat/long values for each and names as the key values.
client.station_geo_locations
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request