WeatherPinpointJp
weather information library for ruby
Installation
Add this line to your application's Gemfile:
gem 'weather_pinpoint_jp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install weather_pinpoint_jp
Usage
require 'weather_pinpoint_jp'
forecast = WeatherPinpointJp.get("東京都千代田区")
puts forecast.location
t = forecast.start_time
forecast.weather.each {|w|
puts "#{t.strftime("%Y/%m/%d %H:%M")} #{w}"
t += 3600
}
require 'weather_pinpoint_jp'
forecast = WeatherPinpointJp.get("100000", WeatherPinpointJp::POSTAL_CODE)
puts forecast.location
t = forecast.start_time
forecast.weather.each {|w|
puts "#{t.strftime("%Y/%m/%d %H:%M")} #{w}"
t += 3600
}
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