Class: OpenWeather::HourlyForecast
- Inherits:
-
Object
- Object
- OpenWeather::HourlyForecast
- Defined in:
- lib/open_weather/hourly_forecast.rb
Class Method Summary collapse
-
.by_city(name: '', units: 'standard', lang: 'en') ⇒ Object
helper params to return defferent urls “current_wether”, “hourly”.
- .by_city_id(id: '', units: 'standard', lang: 'en') ⇒ Object
- .by_coords(coords: [], units: 'standard', lang: 'en') ⇒ Object
- .by_find(coords: [], count: 3, units: 'standard', lang: 'en') ⇒ Object
- .by_zip(zipcode: '', country: '', units: 'standard', lang: 'en') ⇒ Object
Class Method Details
.by_city(name: '', units: 'standard', lang: 'en') ⇒ Object
helper params to return defferent urls “current_wether”, “hourly”
11 12 13 14 |
# 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') ⇒ Object
16 17 18 19 |
# 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') ⇒ Object
21 22 23 24 |
# 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') ⇒ Object
26 27 28 29 |
# 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') ⇒ Object
31 32 33 34 |
# 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 |