Created
February 11, 2014 23:25
-
-
Save ttscoff/8946551 to your computer and use it in GitHub Desktop.
Forecast IO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'forecast_io' | |
ForecastIO.api_key = 'xxxxxxxxxxxxxxxxxx' | |
forecast = ForecastIO.forecast(44.047889,-91.640439) | |
if ARGV[0] == "current" | |
print "#{forecast.currently.temperature.round}, #{forecast.currently.summary}" | |
else | |
print forecast.minutely.summary | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! Here's what I had it print:
which currently outputs this: