Module: DevinApi::Endpoints::Session

Defined in:
lib/devin_api/endpoints/session.rb

Overview

Session endpoint for the Devin API

Instance Method Summary collapse

Instance Method Details

#get_session(session_id) ⇒ Hash

Retrieve details about an existing session

Parameters:

  • session_id (String) —

    The ID of the session

Returns:

  • (Hash) —

    Response body

See Also:



12
13
14
# File 'lib/devin_api/endpoints/session.rb', line 12

def get_session(session_id)
  get("/v1/session/#{session_id}")
end

#send_message(session_id, params = {}) ⇒ Hash

Send a message to an existing session

Parameters:

  • session_id (String) —

    The ID of the session

  • params (Hash) (defaults to: {}) —

    Body parameters

Options Hash (params):

  • :message (String) —

    The message to send (required)

Returns:

  • (Hash) —

    Response body

See Also:



23
24
25
# File 'lib/devin_api/endpoints/session.rb', line 23

def send_message(session_id, params = {})
  post("/v1/session/#{session_id}/message", params)
end

#update_session_tags(session_id, params = {}) ⇒ Hash

Update session tags

Parameters:

  • session_id (String) —

    The ID of the session

  • params (Hash) (defaults to: {}) —

    Body parameters

Options Hash (params):

  • :tags (Array<String>) —

    Tags to associate with the session (required)

Returns:

  • (Hash) —

    Response body

See Also:



34
35
36
# File 'lib/devin_api/endpoints/session.rb', line 34

def update_session_tags(session_id, params = {})
  put("/v1/session/#{session_id}/tags", params)
end