yahoo-weather 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README DELETED
@@ -1,81 +0,0 @@
1
- = yahoo-weather
2
-
3
- == About
4
-
5
- yahoo-weather provides an object-oriented interface to the Yahoo! Weather XML
6
- RSS feed detailed at http://developer.yahoo.com/weather.
7
-
8
- People care a lot about the weather, which sometimes seems ironic given that
9
- they can just glance out the window, but we can all understand the fascination
10
- with details and forecasting.
11
-
12
- Log the weather information to your database! Graph it to your heart's
13
- content! Write a widget that emails the weather to your cell phone every five
14
- minutes with a link to your friend's PayPal account to deposit money if the
15
- weather's sunny and you both bet that it would be rainy. And the fun doesn't
16
- have to stop there.
17
-
18
- The RubyForge project page is at http://rubyforge.org/projects/yahoo-weather.
19
-
20
- == Installation
21
-
22
- Install the latest version via:
23
-
24
- % gem install yahoo-weather
25
-
26
- == Usage
27
-
28
- A simple example program under <tt>examples/example.rb</tt> as:
29
-
30
- require 'rubygems'
31
- require 'yahoo-weather'
32
-
33
- @client = YahooWeather::Client.new
34
- response = @client.lookup_location('98103')
35
-
36
- # straight text output
37
- print <<edoc
38
- #{response.title}
39
- #{response.condition.temp} degrees
40
- #{response.condition.text}
41
- edoc
42
-
43
- # sample html output
44
- print <<edoc
45
- <div>
46
- <img src="#{response.image_url}"><br/>
47
- #{response.condition.temp} degrees #{response.units.temperature}<br/>
48
- #{response.condition.text}<br>
49
- Forecast:<br/>
50
- #{response.forecasts[0].day} - #{response.forecasts[0].text}. High: #{response.forecasts[0].high} Low: #{response.forecasts[0].low}<br/>
51
- #{response.forecasts[1].day} - #{response.forecasts[1].text}. High: #{response.forecasts[1].high} Low: #{response.forecasts[1].low}<br/>
52
- More information <a href="#{response.page_url}">here</a>.
53
- </div>
54
- edoc
55
-
56
- Produces output as:
57
-
58
- Conditions for Seattle, WA at 2:53 pm PST
59
- 55 degrees F
60
- Light Rain
61
- <div>
62
- <img src="http://us.i1.yimg.com/us.yimg.com/i/us/we/52/11.gif"><br/>
63
- 55 degrees F<br/>
64
- Light Rain<br>
65
- Forecast:<br/>
66
- Sun - Rain/Wind. High: 56 Low: 54<br/>
67
- Mon - Heavy Rain/Wind. High: 60 Low: 54<br/>
68
- More information <a href="http://us.rd.yahoo.com/dailynews/rss/weather/Seattle__WA/*http://xml.weather.yahoo.com/forecast/98103_f.html">here</a>.
69
- </div>
70
-
71
- There is a variety of detailed weather information in other attributes of the
72
- YahooWeather::Response object.
73
-
74
- == License
75
-
76
- This library is provided via the GNU LGPL license at http://www.gnu.org/licenses/lgpl.html.
77
-
78
- == Author
79
-
80
- Copyright 2006, Walter Korman <shaper@wgks.org>, http://www.lemurware.com.
81
- Thanks to Matthew Berk for inspiration and initial hack.