A VERY minimal gem for openweathermap.org's API. Currently supports only current forecast - temperature, pressure, humidity, min/max temperatures and wind (speed and direction).
Add this line to your application's Gemfile:
gem 'forecastr'
And then execute:
$ bundle
Or install it yourself as:
$ gem install forecastr
You can search for forecast by city:
london = Forecastr::Radar.find_by_city("London,UK")
london.temperature.to_celsius
# => 18
Or, you can search for forecast by coordinates:
london = Forecastr::Radar.find_by_coordinates(51.5072, 0.1275)
london.temperature.to_celsius
# => 18
Some methods:
skopje = Forecastr::Radar.find_by_coordinates(42.00, 21.4333)
skopje.temperature.to_celsius
# => 10
skopje.temperature.to_farenheit
# => 50
skopje.humidity
# => 45
skopje.pressure
# => 1002
skopje.wind.direction
# => NE
skopje.wind.speed
# => 3.2 m/s
- 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