0.02
No commit activity in last 3 years
No release in over 3 years
A wrapper for the Yahoo! Weather XML RSS feed
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 11.2.2
~> 3.5.0
~> 3.0.3
~> 2.3.2

Runtime

~> 0.10.2
>= 0
~> 6.6.0
 Project Readme

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

Lookup via location name

response = Weather.lookup_by_location('San Francisco, CA', Weather::Units::FAHRENHEIT)

Copyright

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