Class: ApiBrasil::Services::Data::WeatherService
- Inherits:
-
ApiBrasil::Services::DeviceProxyService
- Object
- BaseService
- ApiBrasil::Services::DeviceProxyService
- ApiBrasil::Services::Data::WeatherService
- Defined in:
- lib/api_brasil/services/data/proxies.rb
Overview
Clima (device-based): /weather/{action}.
Instance Attribute Summary
Attributes inherited from ApiBrasil::Services::DeviceProxyService
Attributes inherited from BaseService
Instance Method Summary collapse
-
#city(body, options = {}) ⇒ Object
Clima por cidade:
POST /weather/city. -
#coordenates(body, options = {}) ⇒ Object
Clima por coordenadas:
POST /weather/coordenates. -
#initialize(http) ⇒ WeatherService
constructor
A new instance of WeatherService.
Methods inherited from ApiBrasil::Services::DeviceProxyService
Methods inherited from BaseService
#delete, #download, #get, #patch, #post, #put
Constructor Details
#initialize(http) ⇒ WeatherService
Returns a new instance of WeatherService.
109 110 111 |
# File 'lib/api_brasil/services/data/proxies.rb', line 109 def initialize(http) super(http, "weather") end |
Instance Method Details
#city(body, options = {}) ⇒ Object
Clima por cidade: POST /weather/city.
116 117 118 |
# File 'lib/api_brasil/services/data/proxies.rb', line 116 def city(body, = {}) request("city", body, ) end |
#coordenates(body, options = {}) ⇒ Object
Clima por coordenadas: POST /weather/coordenates.
123 124 125 |
# File 'lib/api_brasil/services/data/proxies.rb', line 123 def coordenates(body, = {}) request("coordenates", body, ) end |