ChatKittyPlatformAPI.Api.Threads (chatkitty_platform_sdk v0.1.0)
API calls for all endpoints tagged Threads
.
Link to this section Summary
Functions
List reply thread messages Returns a page of replies sent in this thread
Retrieve a thread Returns a thread by ID
Send a reply thread message Sends a reply message in this thread as the system or on behalf of a user
Link to this section Functions
Link to this function
list_thread_messages(connection, id, opts \\ [])
@spec list_thread_messages(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.CursorPagedModelMessageResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List reply thread messages Returns a page of replies sent in this thread
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
- :size (integer()): The size of the page to be returned
- :start (integer()): Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages
- :next (integer()): Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages
- :relation (String.t): Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages
returns
Returns
on success {:error, Tesla.Env.t} on failure
Link to this function
retrieve_thread(connection, id, opts \\ [])
@spec retrieve_thread(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ReplyThreadResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Retrieve a thread Returns a thread by ID
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Reply thread ID
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
Link to this function
send_thread_message(connection, id, send_channel_message_request, opts \\ [])
@spec send_thread_message( Tesla.Env.client(), integer(), ChatKittyPlatformAPI.Model.SendChannelMessageRequest.t(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.MessageResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Send a reply thread message Sends a reply message in this thread as the system or on behalf of a user
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()):
- send_channel_message_request (SendChannelMessageRequest):
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure