Class: WeatherUnderground::Base
- Inherits:
-
Object
- Object
- WeatherUnderground::Base
- Defined in:
- lib/weather_underground.rb
Instance Method Summary collapse
- #autoip(ip) ⇒ Object
- #geolookup(location) ⇒ Object
-
#initialize(apikey) ⇒ Base
constructor
A new instance of Base.
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
18 19 20 |
# File 'lib/weather_underground.rb', line 18 def autoip(ip) make_request url_with_key + "/geolookup/conditions/q/autoip.json?" + ip end |
#geolookup(location) ⇒ Object
14 15 16 |
# File 'lib/weather_underground.rb', line 14 def geolookup(location) make_request url_with_key + "/geolookup/conditions/q/%s.json" % URI.escape(location) end |