Sha256: 2d5fd3f4de0b97fb1a546824432f409af2364c72f377ab11de04b292f704d97a
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
#ruby_rides --- A Ruby gem to interface with Hubway's API. ## Installation ```ruby gem install ruby_rides ``` Alternately, you can include this line in your Gemfile... ```ruby gem 'ruby_rides' ``` And bundle install. ```ruby $ 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. ```ruby 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. ```ruby 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. ```ruby client.station_geo_locations ``` ## Contributing 1. Fork it 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 new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby_rides-0.0.2 | README.md |