module OpenWeather::ClassMethods

Public Instance Methods

city(city, options = {}) click to toggle source

City format : Eg, Cochin,IN Usage: OpenWeather::Current.city(‘Cochin,In’)

# File lib/open_weather/api.rb, line 6
def city(city, options = {})
  new(options.merge(city: city)).retrieve
end
city_id(id, options = {}) click to toggle source

City Id, an integer value. Eg, 2172797 Usage: OpenWeather::Current.city_id(2172797)

# File lib/open_weather/api.rb, line 12
def city_id(id, options = {})
  new(options.merge(id: id)).retrieve
end
geocode(lat, lon, options = {}) click to toggle source

City Geographics Cordingates : Eg, lat 35 lon 139

# File lib/open_weather/api.rb, line 17
def geocode(lat, lon, options = {})
  new(options.merge(lat: lat, lon: lon)).retrieve
end