Class: Geonames::Weather
- Inherits:
-
GeonamesResource
- Object
- ActiveResource::Base
- GeonamesResource
- Geonames::Weather
- Defined in:
- lib/map_layers/geonames.rb
Overview
GeoNames Weather REST services
Class Method Summary collapse
-
.weather(options) ⇒ Object
Weather stations with the most recent weather observation.
-
.weatherIcao(icao, options = {}) ⇒ Object
Weather station and the most recent weather observation for the ICAO code.
Class Method Details
.weather(options) ⇒ Object
Weather stations with the most recent weather observation
Example: Geonames::Weather.weather(:north => 44.1, :south => -9.9, :east => -22.4, :west => 55.2)
53 54 55 |
# File 'lib/map_layers/geonames.rb', line 53 def self.weather() self.find(:all, :from => "/weatherJSON", :params => ) end |
.weatherIcao(icao, options = {}) ⇒ Object
Weather station and the most recent weather observation for the ICAO code
www.geonames.org/export/JSON-webservices.html#weatherIcaoJSON
61 62 63 |
# File 'lib/map_layers/geonames.rb', line 61 def self.weatherIcao(icao, = {}) self.find(:all, :from => "/weatherIcaoJSON", :params => { :ICAO => icao }.merge()) end |