Class: MyTado::Request::DayReport
- Inherits:
-
AbstractRequest
- Object
- AbstractRequest
- MyTado::Request::DayReport
- Defined in:
- lib/my_tado/request/day_report.rb
Overview
Calls the /dayReport endpoint
Instance Attribute Summary
Attributes inherited from AbstractRequest
Instance Method Summary collapse
Methods inherited from AbstractRequest
#body, #call, #initialize, #klass_name, #method, requires_home_id_param?
Constructor Details
This class inherits a constructor from MyTado::Request::AbstractRequest
Instance Method Details
#endpoint ⇒ Object
7 8 9 |
# File 'lib/my_tado/request/day_report.rb', line 7 def endpoint "/v2/homes/#{[:home_id]}/zones/#{[:zone_id]}/dayReport?date=#{formatted_date}" end |
#formatted_date ⇒ Object
11 12 13 |
# File 'lib/my_tado/request/day_report.rb', line 11 def formatted_date Date.parse([:date]).strftime('%Y-%m-%d') end |