Class: Exa::Services::AgentRunEvents
- Inherits:
-
Object
- Object
- Exa::Services::AgentRunEvents
- Defined in:
- lib/exa/services/agent_run_events.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(connection, run_id:, **params) ⇒ AgentRunEvents
constructor
A new instance of AgentRunEvents.
Constructor Details
#initialize(connection, run_id:, **params) ⇒ AgentRunEvents
Returns a new instance of AgentRunEvents.
8 9 10 11 12 |
# File 'lib/exa/services/agent_run_events.rb', line 8 def initialize(connection, run_id:, **params) @connection = connection @run_id = run_id @params = params end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/exa/services/agent_run_events.rb', line 14 def call response = @connection.get("/agent/runs/#{@run_id}/events", @params) body = response.body # Confirmed live: GET /agent/runs/{id}/events returns a paginated list # {object: "list", data: [...], hasMore, nextCursor}. Resources::AgentRunEventList.new( data: body["data"] || [], has_more: body["hasMore"], next_cursor: body["nextCursor"] ) end |