Class: OpenWeatherAPI::Resources::ForecastDaily
Instance Attribute Summary
Attributes inherited from Base
#api_obj
Instance Method Summary
collapse
#city, #city_id, #geolocation
Methods inherited from Base
#execute, #initialize
Instance Method Details
#base_url ⇒ Object
5
6
7
|
# File 'lib/open-weather-api/resources/forecast_daily.rb', line 5
def base_url
return super + 'daily/'
end
|
#build_params(parameters = {}) ⇒ Object
9
10
11
12
|
# File 'lib/open-weather-api/resources/forecast_daily.rb', line 9
def build_params(parameters = {})
parameters.merge!(cnt: days)
super(parameters)
end
|
#days ⇒ Object
14
15
16
|
# File 'lib/open-weather-api/resources/forecast_daily.rb', line 14
def days
@parameters[:days] || @parameters[:n_days] || @parameters[:cnt] || @parameters[:count]
end
|