Class: WeatherUnderground::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/weather_underground.rb

Instance Method Summary collapse

Constructor Details

#initialize(apikey) ⇒ Base

Returns a new instance of Base.



10
11
12
# File 'lib/weather_underground.rb', line 10

def initialize(apikey)
  @apikey = apikey
end

Instance Method Details

#autoip(ip) ⇒ Object



22
23
24
# File 'lib/weather_underground.rb', line 22

def autoip(ip)
  make_request url_with_key + "/geolookup/conditions/q/autoip.json?" + ip
end

#forecast(location) ⇒ Object



14
15
16
# File 'lib/weather_underground.rb', line 14

def forecast(location)
  make_request url_with_key + "/forecast/conditions/q/%s.json" % URI.escape(location)
end

#geolookup(location) ⇒ Object



18
19
20
# File 'lib/weather_underground.rb', line 18

def geolookup(location)
  make_request url_with_key + "/geolookup/conditions/q/%s.json" % URI.escape(location)
end