Twilio.Chat.V1.Service.Channel.MessageService (twilio_elixir v0.1.1)

Copy Markdown View Source

Individual chat messages

Operations: list, create, fetch, update, delete

Summary

Functions

Operation: CreateMessage | Tags: ChatV1Message

Operation: DeleteMessage | Tags: ChatV1Message

Operation: FetchMessage | Tags: ChatV1Message

Operation: ListMessage | Tags: ChatV1Message

Operation: UpdateMessage | Tags: ChatV1Message

Functions

create(client, service_sid, channel_sid, params \\ %{}, opts \\ [])

@spec create(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V1.Service.Channel.Message.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: CreateMessage | Tags: ChatV1Message

Required Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Body | string | The message to send to the channel. Can also be an empty string or null, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. |

Optional Parameters

ParameterTypeDescription
AttributesstringA valid JSON string that contains application-specific data.

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| From | string | The identity of the new message's author. The default value is system. |

delete(client, service_sid, channel_sid, sid, opts \\ [])

@spec delete(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}

Operation: DeleteMessage | Tags: ChatV1Message

fetch(client, service_sid, channel_sid, sid, opts \\ [])

@spec fetch(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V1.Service.Channel.Message.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: FetchMessage | Tags: ChatV1Message

list(client, service_sid, channel_sid, params \\ %{}, opts \\ [])

@spec list(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: ListMessage | Tags: ChatV1Message

Query Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Order | string | The sort order of the returned messages. Can be: asc (ascending) or desc (descending) with asc as the default. |

stream(client, service_sid, channel_sid, params \\ %{}, opts \\ [])

@spec stream(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  Enumerable.t()

Stream: (lazy auto-pagination).

update(client, service_sid, channel_sid, sid, params \\ %{}, opts \\ [])

@spec update(Twilio.Client.t(), String.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V1.Service.Channel.Message.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: UpdateMessage | Tags: ChatV1Message

Optional Parameters

ParameterTypeDescription
AttributesstringA valid JSON string that contains application-specific data.

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Body | string | The message to send to the channel. Can also be an empty string or null, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. |