Class: Exa::Services::Websets::Monitors::Runs::Get
- Inherits:
-
Object
- Object
- Exa::Services::Websets::Monitors::Runs::Get
- Defined in:
- lib/exa/services/websets/monitors/runs/get.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(connection, monitor_id:, id:, **params) ⇒ Get
constructor
A new instance of Get.
Constructor Details
#initialize(connection, monitor_id:, id:, **params) ⇒ Get
Returns a new instance of Get.
9 10 11 12 13 14 |
# File 'lib/exa/services/websets/monitors/runs/get.rb', line 9 def initialize(connection, monitor_id:, id:, **params) @connection = connection @monitor_id = monitor_id @id = id @params = params end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/exa/services/websets/monitors/runs/get.rb', line 16 def call response = @connection.get("/websets/v0/monitors/#{@monitor_id}/runs/#{@id}", @params) body = response.body Resources::MonitorRun.new( id: body["id"], object: body["object"], monitor_id: body["monitorId"], status: body["status"], created_at: body["createdAt"], updated_at: body["updatedAt"], completed_at: body["completedAt"], failed_at: body["failedAt"], failed_reason: body["failedReason"] ) end |