Class: Waffle::Maker::Api::AlertDetail
- Defined in:
- lib/waffle/maker/api/alert_detail.rb
Constant Summary collapse
- API_PATH =
'/api/v1/alert_detail'
Constants inherited from Base
Instance Attribute Summary collapse
-
#log_id ⇒ Object
readonly
Returns the value of attribute log_id.
Attributes inherited from Base
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(log_id: nil) ⇒ AlertDetail
constructor
A new instance of AlertDetail.
- #url ⇒ Object
Methods inherited from Base
#body_in_hash_format, #body_in_json_format, #get, #http
Constructor Details
#initialize(log_id: nil) ⇒ AlertDetail
Returns a new instance of AlertDetail.
10 11 12 |
# File 'lib/waffle/maker/api/alert_detail.rb', line 10 def initialize(log_id: nil) @log_id = log_id end |
Instance Attribute Details
#log_id ⇒ Object (readonly)
Returns the value of attribute log_id.
8 9 10 |
# File 'lib/waffle/maker/api/alert_detail.rb', line 8 def log_id @log_id end |
Instance Method Details
#execute ⇒ Object
14 15 16 |
# File 'lib/waffle/maker/api/alert_detail.rb', line 14 def execute body_in_hash_format end |
#url ⇒ Object
18 19 20 |
# File 'lib/waffle/maker/api/alert_detail.rb', line 18 def url @url ||= URI.parse("#{config.api_host}#{API_PATH}?host=#{config.host}&id=#{config.id}&log_id=#{log_id}") end |