github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

ckozus / rweather

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 6
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Ruby gem for weather extraction from weather.com — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Updating gemspec. I cant use Dir because of $SAFE configuration. 
ckozus (author)
Sat Sep 06 14:53:42 -0700 2008
commit  16ad42af62069c212a1bc72f6a0fba05ed5df457
tree    02ec6e9add2511a19156bd9a8a8b168f2d399e0c
parent  c90026b1ba8a5678877ea906b5268d921116c84d
rweather /
name age
history
message
file .gitignore Loading commit data...
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
directory spec/
README
== 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
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server