MessageHandlerImpl

class MessageHandlerImpl(requestHelper: RequestHelper, endpoint: String, val threadId: String) : MessageHandler

Constructors

Link copied to clipboard
constructor(requestHelper: RequestHelper, endpoint: String, threadId: String)

Functions

Link copied to clipboard
open override fun create(request: CreateThreadMessageRequest): ThreadMessage

Creates a new ThreadMessage object.

Link copied to clipboard
@Contract(pure = true)
open fun files(msg: ThreadMessage): MessageFileHandler

Returns a handler for interacting with the files in the given message.

open override fun files(messageId: String): MessageFileHandler

Returns a handler for interacting with the files in the message with the given id.

Link copied to clipboard
@Contract(pure = true)
open fun list(): ListThreadMessagesResponse

Lists the 20 most recent messages in the thread.

Lists messages in the thread.

Link copied to clipboard

Modifies the given message to have the given updated values.

open override fun modify(messageId: String, request: ModifyThreadMessageRequest): ThreadMessage

Modifies the message with the given id to have the given updated values.

Link copied to clipboard
@Contract(pure = true)
open fun retrieve(msg: ThreadMessage): ThreadMessage

Retrieves the updated message object from the given message.

open override fun retrieve(id: String): ThreadMessage

Retrieves the message with the given id.

Properties

Link copied to clipboard
open override val threadId: String

The id of the Thread that this handler is for.