Ruby API client for www.mygasfeed.org
Add this line to your application's Gemfile:
gem 'mygasfeed'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mygasfeed
You need to get an API key from here.
You can use it by setting an environment variable from the command line
export MYGASFEED_API_KEY=your_api_key
Use it when running rails s
MYGASFEED_API_KEY=your_api_key rails s
Or store it in a .env
file and either use Foreman or the dotenv gem.
MYGASFEED_API_KEY=your_api_key
Params: latitude, longitude, distance, fuel_type, sort_by
distance - number of miles
fuel_type - "reg", "mid", "pre", or "diesel".
sort_by - "distance" or "price".
Mygasfeed.get_stations 39.7400, -121.8356, 50, "reg", "distance"
Params: station_id
Mygasfeed.get_history 33862
Params: station_id
Mygasfeed.get_details 33862
Params: none
Mygasfeed.get_brands
Params: price, fuel_type, station_id
fuel_type - "reg", "mid", "pre", or "diesel".
Mygasfeed.update_price 4.15, "reg", 33862
Params: latitude, longitude
Mygasfeed.get_adddress 39.7400, -121.8356
Params: station_id, limit
limit - number of miles
Mygasfeed.get_close_by 33862, 50
- Fork it ( https://github.com/mwiley/mygasfeed/fork )
- 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 a new Pull Request