Class: OpenWeather::CurrentWeather
- Inherits:
-
Object
- Object
- OpenWeather::CurrentWeather
- Defined in:
- lib/open_weather/current_weather.rb
Class Method Summary collapse
- .by_city(name: '', units: 'standard', lang: 'en') ⇒ Object
- .by_city_id(id: '', units: 'standard', lang: 'en') ⇒ Object
- .by_coords(coords: [], 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
10 11 12 13 |
# 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') ⇒ Object
15 16 17 18 |
# 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') ⇒ Object
20 21 22 23 |
# 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') ⇒ Object
25 26 27 28 |
# 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 |