weatherfinder 0.1 → 0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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