ChatKittyPlatformAPI.Api.Messages (chatkitty_platform_sdk v0.1.0)
API calls for all endpoints tagged Messages
.
Link to this section Summary
Functions
Delete a message Deletes a message by ID
Delete messages Deletes all messages belonging to this application
List message read receipts Returns a page of read receipts for this message
List messages Returns a page of messages belonging to this application
Retrieve a message Returns a message by ID
Link to this section Functions
delete_message(connection, id, opts \\ [])
@spec delete_message(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ReplyThreadResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Delete a message Deletes a message by ID
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Message ID
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
delete_messages(connection, opts \\ [])
@spec delete_messages( Tesla.Env.client(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.ApplicationResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Delete messages Deletes all messages belonging to this application
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_message_read_receipts(connection, id, opts \\ [])
@spec list_message_read_receipts(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.PagedModelMessageReadReceiptResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List message read receipts Returns a page of read receipts for this message
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
- :page (integer()): Zero-based page index (0..N)
- :size (integer()): The size of the page to be returned
- :sort ([String.t]): Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
returns
Returns
on success {:error, Tesla.Env.t} on failure
list_messages(connection, opts \\ [])
@spec list_messages( Tesla.Env.client(), keyword() ) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.CursorPagedModelMessageResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
List messages Returns a page of messages belonging to this application
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- 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
- :username (String.t): Filters messages by a sender's username
- :query (String.t): Filters text messages by text contained in the message body
returns
Returns
on success {:error, Tesla.Env.t} on failure
retrieve_message(connection, id, opts \\ [])
@spec retrieve_message(Tesla.Env.client(), integer(), keyword()) :: {:ok, ChatKittyPlatformAPI.Model.ApiError.t()} | {:ok, ChatKittyPlatformAPI.Model.MessageResource.t()} | {:ok, ChatKittyPlatformAPI.Model.AuthenticationError.t()} | {:error, Tesla.Env.t()}
Retrieve a message Returns a message by ID
parameters
Parameters
- connection (ChatKittyPlatformAPI.Connection): Connection to server
- id (integer()): Message ID
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure