Sha256: 226ace14fdbd90f5df2352dec59f5cec8e3f4a51d834cf5497a881b166dffb38

Contents?: true

Size: 1.58 KB

Versions: 2

Compression:

Stored size: 1.58 KB

Contents

[![Gem Version](https://badge.fury.io/rb/ruby_rides.png)](http://badge.fury.io/rb/ruby_rides)
[![Build Status](https://travis-ci.org/darkmoves/ruby_rides.png)](https://travis-ci.org/darkmoves/ruby_rides)
[![Coverage Status](https://coveralls.io/repos/darkmoves/ruby_rides/badge.png)](https://coveralls.io/r/darkmoves/ruby_rides)
[![Dependency Status](https://gemnasium.com/darkmoves/ruby_rides.png)](https://gemnasium.com/darkmoves/ruby_rides)
#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

2 entries across 2 versions & 1 rubygems

Version Path
ruby_rides-0.0.4 README.md
ruby_rides-0.0.3 README.md