public
Rubygem
Description: Ruby gem for weather extraction from weather.com
Homepage:
Clone URL: git://github.com/ckozus/rweather.git
name age message
file .gitignore Thu Jul 10 10:01:55 -0700 2008 Ignoring nbproject folder [Carlos Kozuszko]
file README Sat Sep 06 14:16:40 -0700 2008 Adding documentation and a little example. [ckozus]
file TODO.txt Sat Sep 06 14:48:23 -0700 2008 Adding gemspec and updating TODO.txt [ckozus]
directory lib/ Sat Sep 06 13:51:59 -0700 2008 Encoding request urls [ckozus]
file rweather.gemspec Sat Sep 06 14:53:42 -0700 2008 Updating gemspec. I cant use Dir because of $SA... [ckozus]
directory spec/ Sat Sep 06 13:53:04 -0700 2008 Add title to the describe section on r_weather_... [ckozus]
== rweather

Ruby gem to access Weather Channel (weather.com) XML API.

This gems lets you access to the search and get current conditions features. Forecast it's not implemented yet.

In order to use the API you will need first to get your partner_id and licence key from weather.com at this address:
http://www.weather.com/services/xmloap.html

Sign up, enter all your data and you'll get an email with the partner_id, licence key and a link to download the SDK 
info.
If you need to read the license agreement and the API doc you can do it here:
http://download.weather.com/web/xml/sdk.zip

== Example

  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