Created
September 7, 2008 14:08
-
-
Save ckozus/9259 to your computer and use it in GitHub Desktop.
This file contains 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
require 'rubygems' | |
require 'r_weather' | |
RWeather.partner_id = "xxxxxxxxxx" | |
RWeather.key = "yyyyyyyyyyyyyyyy" | |
locations = RWeather.search('tucuman') # that's where I'm from :) | |
unless locations.empty? | |
locations.each_with_index do |location, i| | |
puts "#{i}) #{location.id} - #{location.name}" | |
end | |
cc = RWeather.current_conditions(locations.first.id) | |
puts "Current conditions: " | |
puts " Temperature: #{cc.tmp}" | |
puts " Feels like: #{cc.flik}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment