Module: OpenWeather::ClassMethods
- Included in:
- Base
- Defined in:
- lib/open_weather/api.rb
Instance Method Summary collapse
-
#city(city, options = {}) ⇒ Object
City format : Eg, Cochin,IN Useage: OpenWeather::Current.city(‘Cochin,In’).
-
#city_id(id, options = {}) ⇒ Object
City Id, an integer value.
-
#geocode(lat, lon, options = {}) ⇒ Object
City Geographics Cordingates : Eg, lat 35 lon 139.
Instance Method Details
#city(city, options = {}) ⇒ Object
City format : Eg, Cochin,IN Useage: OpenWeather::Current.city(‘Cochin,In’)
6 7 8 |
# File 'lib/open_weather/api.rb', line 6 def city(city, = {}) new(.merge(city: city)).retrive end |
#city_id(id, options = {}) ⇒ Object
City Id, an integer value. Eg, 2172797 Useage: OpenWeather::Current.city_id(2172797)
12 13 14 |
# File 'lib/open_weather/api.rb', line 12 def city_id(id, = {}) new(.merge(id: id)).retrive end |
#geocode(lat, lon, options = {}) ⇒ Object
City Geographics Cordingates : Eg, lat 35 lon 139
17 18 19 |
# File 'lib/open_weather/api.rb', line 17 def geocode(lat, lon, = {}) new(.merge(lat: lat, lon: lon)).retrive end |