Skip to content

Instantly share code, notes, and snippets.

@ckozus
Created September 7, 2008 14:08
Show Gist options
  • Save ckozus/9259 to your computer and use it in GitHub Desktop.
Save ckozus/9259 to your computer and use it in GitHub Desktop.
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