WeatherHacker
Library for Livedoor Weather Web Service
Installation
Add this line to your application's Gemfile:
gem 'weather_hacker'
And then execute:
$ bundle
Or install it yourself as:
$ gem install weather_hacker
Usage
Here's an example script to watch the weather forecast:
# forecast.rb
require "weather_hacker"
require "yaml"
require "date"
zipcode = "690-0261"
weather = WeatherHacker.new(zipcode)
y weather.on(Date.today)
y weather.today
y weather.tomorrow
y weather.day_after_tomorrow
$ gem install weather_hacker
$ ruby forecast.rb
---
weather: 晴れ
temperature:
max: '18'
min: '1'
---
weather: 晴れ
temperature:
max: '18'
min: '1'
---
weather: 晴時々曇
temperature:
max: '18'
min: '2'
---
weather: 曇り
temperature:
max: '21'
min: '9'
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request