class OpenWeather::CurrentWeather
Public Class Methods
by_city(name: '', units: 'standard', lang: 'en')
click to toggle source
# File lib/open_weather/current_weather.rb, line 10 def self.by_city(name: '', units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('current_wether') OpenWeather::NetworkRequest.by_city(name: name, units: units, lang: lang) end
by_city_id(id: '', units: 'standard', lang: 'en')
click to toggle source
# File lib/open_weather/current_weather.rb, line 15 def self.by_city_id(id: '', units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('current_wether') OpenWeather::NetworkRequest.by_city_id(id: id, units: units, lang: lang) end
by_coords(coords: [], units: 'standard', lang: 'en')
click to toggle source
# File lib/open_weather/current_weather.rb, line 20 def self.by_coords(coords: [], units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('current_wether') OpenWeather::NetworkRequest.by_coords(coords: coords, units: units, lang: lang) end
by_zip(zipcode: '', country: '', units: 'standard', lang: 'en')
click to toggle source
# File lib/open_weather/current_weather.rb, line 25 def self.by_zip(zipcode: '', country: '', units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('current_wether') OpenWeather::NetworkRequest.by_zip(zipcode: zipcode, country: country, units: units, lang: lang) end