Class: Firecrawl::Models::AgentStatusResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/firecrawl/models/agent_status_response.rb

Overview

Status response for monitoring agent tasks.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ AgentStatusResponse

Returns a new instance of AgentStatusResponse.



9
10
11
12
13
14
15
16
# File 'lib/firecrawl/models/agent_status_response.rb', line 9

def initialize(raw)
  @status = raw["status"]
  @data = raw["data"]
  @credits_used = raw["creditsUsed"]
  @expires_at = raw["expiresAt"]
  # The effort the job ran with; only present for runs that specified it.
  @effort = raw["effort"]
end

Instance Attribute Details

#credits_usedObject (readonly)

Returns the value of attribute credits_used.



7
8
9
# File 'lib/firecrawl/models/agent_status_response.rb', line 7

def credits_used
  @credits_used
end

#dataObject (readonly)

Returns the value of attribute data.



7
8
9
# File 'lib/firecrawl/models/agent_status_response.rb', line 7

def data
  @data
end

#effortObject (readonly)

Returns the value of attribute effort.



7
8
9
# File 'lib/firecrawl/models/agent_status_response.rb', line 7

def effort
  @effort
end

#expires_atObject (readonly)

Returns the value of attribute expires_at.



7
8
9
# File 'lib/firecrawl/models/agent_status_response.rb', line 7

def expires_at
  @expires_at
end

#statusObject (readonly)

Returns the value of attribute status.



7
8
9
# File 'lib/firecrawl/models/agent_status_response.rb', line 7

def status
  @status
end

Instance Method Details

#done?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/firecrawl/models/agent_status_response.rb', line 18

def done?
  %w[completed failed cancelled].include?(status)
end

#to_sObject



22
23
24
# File 'lib/firecrawl/models/agent_status_response.rb', line 22

def to_s
  "AgentStatusResponse{status=#{status}}"
end