Class: Waffle::Maker::Api::AlertDetail

Inherits:
Base
  • Object
show all
Defined in:
lib/waffle/maker/api/alert_detail.rb

Constant Summary collapse

API_PATH =
'/api/v1/alert_detail'

Constants inherited from Base

Base::FORCE_ENCODING

Instance Attribute Summary collapse

Attributes inherited from Base

#headers

Instance Method Summary collapse

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_idObject (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

#executeObject



14
15
16
# File 'lib/waffle/maker/api/alert_detail.rb', line 14

def execute
  body_in_hash_format
end

#urlObject



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