Method: OpenWeatherMap::API#current

Defined in:
lib/openweathermap/api.rb

#current(location) ⇒ OpenWeatherMap::CurrentWeather

Get current weather at a specific location.

Parameters:

  • location (String, Integer, Array)

    the location Can be one of this type :

Returns:



55
56
57
58
# File 'lib/openweathermap/api.rb', line 55

def current(location)
  data = make_request(OpenWeatherMap::Constants::URLS[:current], location)
  OpenWeatherMap::CurrentWeather.new(data)
end