weatherfinder 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/weatherfinder.rb +2 -4
- data/weatherfinder.gemspec +1 -1
- metadata +1 -1
data/lib/weatherfinder.rb
CHANGED
@@ -8,15 +8,13 @@ require File.dirname(File.expand_path(__FILE__)) + '/forecast'
|
|
8
8
|
module Weather
|
9
9
|
|
10
10
|
class WeatherFinder
|
11
|
+
attr_accessor :partner_id, :license_key
|
12
|
+
|
11
13
|
# Weather.com HOST
|
12
14
|
XOAP_HOST = "xoap.weather.com"
|
13
15
|
|
14
16
|
# Default unit ajusted to Farenheit degrees :)
|
15
17
|
def load_forecast(location_id, days = 1, unit = 's')
|
16
|
-
# Partner ID and License Key provided by Weather.com
|
17
|
-
partner_id = "1094780686"
|
18
|
-
license_key = "d2f90d27351df0a8"
|
19
|
-
|
20
18
|
# URL to fetch the forecast from Weather.com
|
21
19
|
url = "/weather/local/#{location_id}?cc=*&dayf=#{days}&par=#{partner_id}&key=#{license_key}&unit=#{unit}"
|
22
20
|
|
data/weatherfinder.gemspec
CHANGED