Class: Firecrawl::Models::AgentStatusResponse
- Inherits:
-
Object
- Object
- Firecrawl::Models::AgentStatusResponse
- Defined in:
- lib/firecrawl/models/agent_status_response.rb
Overview
Status response for monitoring agent tasks.
Instance Attribute Summary collapse
-
#credits_used ⇒ Object
readonly
Returns the value of attribute credits_used.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #done? ⇒ Boolean
-
#initialize(raw) ⇒ AgentStatusResponse
constructor
A new instance of AgentStatusResponse.
- #to_s ⇒ Object
Constructor Details
#initialize(raw) ⇒ AgentStatusResponse
Returns a new instance of AgentStatusResponse.
9 10 11 12 13 14 |
# 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"] end |
Instance Attribute Details
#credits_used ⇒ Object (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 |
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/firecrawl/models/agent_status_response.rb', line 7 def data @data end |
#expires_at ⇒ Object (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 |
#status ⇒ Object (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
16 17 18 |
# File 'lib/firecrawl/models/agent_status_response.rb', line 16 def done? %w[completed failed cancelled].include?(status) end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/firecrawl/models/agent_status_response.rb', line 20 def to_s "AgentStatusResponse{status=#{status}}" end |