XApiEx.Api.ManageDirectMessages (x_api_ex v1.0.0)

API calls for all endpoints tagged ManageDirectMessages.

Summary

Functions

Add DM to conversation Creates a new message for a DM Conversation specified by DM Conversation ID. For full details, see the API reference for this endpoint. To get started, sign up for the X API.

New 1-1 DM message Creates a new message for a DM Conversation with a participant user by ID. For full details, see the API reference for this endpoint. To get started, sign up for the X API.

New group DM and conversation Creates a new DM Conversation. For full details, see the API reference for this endpoint. To get started, sign up for the X API.

Functions

add_dm_to_conversation(connection, dm_conversation_id, opts \\ [])

@spec add_dm_to_conversation(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, XApiEx.Model.ApiError.t()}
  | {:ok, XApiEx.Model.DmResponse.t()}
  | {:ok, XApiEx.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Add DM to conversation Creates a new message for a DM Conversation specified by DM Conversation ID. For full details, see the API reference for this endpoint. To get started, sign up for the X API.

Parameters

  • connection (XApiEx.Connection): Connection to server
  • dm_conversation_id (String.t): The conversation ID that this message will be added to. Supports both one-to-one and group conversations.
  • opts (keyword): Optional parameters
    • :body (AddDmToConversationRequest):

Returns

  • {:ok, XApiEx.Model.DmResponse.t} on success
  • {:error, Tesla.Env.t} on failure

new11_dm_message(connection, participant_id, opts \\ [])

@spec new11_dm_message(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, XApiEx.Model.ApiError.t()}
  | {:ok, XApiEx.Model.DmResponse.t()}
  | {:ok, XApiEx.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

New 1-1 DM message Creates a new message for a DM Conversation with a participant user by ID. For full details, see the API reference for this endpoint. To get started, sign up for the X API.

Parameters

  • connection (XApiEx.Connection): Connection to server
  • participant_id (String.t): The User ID of who is receiving this one-to-one Direct Message
  • opts (keyword): Optional parameters
    • :body (New11DmMessageRequest):

Returns

  • {:ok, XApiEx.Model.DmResponse.t} on success
  • {:error, Tesla.Env.t} on failure

new_group_dm_and_conversation(connection, opts \\ [])

@spec new_group_dm_and_conversation(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, XApiEx.Model.ApiError.t()}
  | {:ok, XApiEx.Model.DmResponse.t()}
  | {:ok, XApiEx.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

New group DM and conversation Creates a new DM Conversation. For full details, see the API reference for this endpoint. To get started, sign up for the X API.

Parameters

  • connection (XApiEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :body (NewGroupDmAndConversationRequest):

Returns

  • {:ok, XApiEx.Model.DmResponse.t} on success
  • {:error, Tesla.Env.t} on failure