Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby wrapper for the Yahoo! Weather XML RSS feed.
Ruby
branch: master
Failed to load latest commit information.
lib Correct typo (#5)
spec A new fixture, I guess?
.gitignore
.travis.yml
Gemfile Use https for RubyGems and remove rb-fsevent and growl
LICENSE Initial commit
README.md Update README.md
Rakefile Use irb since Pry isn't in bundle
weather-api.gemspec Remove version from JSON gem

README.md

Weather-API

A Ruby wrapper for the Yahoo! Weather XML RSS feed.

Installation

[sudo] gem install weather-api

Description

Weather-API provides an object-oriented interface to the Yahoo! Weather XML RSS feed service.

Details on the service can be found here.

Usage

A simple example:

require 'rubygems'
require 'weather-api'

# look up WOEID via http://weather.yahoo.com; enter location by city
# name or zip and WOEID is at end of resulting page url.
response = Weather.lookup(9830, Weather::Units::CELSIUS)

print <<EOT
#{response.title}
#{response.condition.temp} degrees
#{response.condition.text}
EOT

This produces:

 Conditions for Ladysmith, CA at 5:00 pm PDT
 13 degrees
 Cloudy

Copyright

Copyright (c) 2012 Andrew Stewart. See LICENSE file for more details.

Something went wrong with that request. Please try again.