class OpenWeather::HourlyForecast
Public Class Methods
by_city(name: '', units: 'standard', lang: 'en')
click to toggle source
helper params to return defferent urls “current_wether”, “hourly”
# File lib/open_weather/hourly_forecast.rb, line 11 def self.by_city(name: '', units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('hourly') 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/hourly_forecast.rb, line 16 def self.by_city_id(id: '', units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('hourly') 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/hourly_forecast.rb, line 21 def self.by_coords(coords: [], units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('hourly') OpenWeather::NetworkRequest.by_coords(coords: coords, units: units, lang: lang) end
by_find(coords: [], count: 3, units: 'standard', lang: 'en')
click to toggle source
# File lib/open_weather/hourly_forecast.rb, line 26 def self.by_find(coords: [], count: 3, units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('hourly') OpenWeather::NetworkRequest.by_coords(coords: coords, count: count, units: units, lang: lang) end
by_zip(zipcode: '', country: '', units: 'standard', lang: 'en')
click to toggle source
# File lib/open_weather/hourly_forecast.rb, line 31 def self.by_zip(zipcode: '', country: '', units: 'standard', lang: 'en') OpenWeather.configuration.weather_base_uri = @helper.swtich_url('hourly') OpenWeather::NetworkRequest.by_zip(zipcode: zipcode, country: country, units: units, lang: lang) end