XApiEx.Api.DirectMessagesLookup (x_api_ex v1.0.0)
API calls for all endpoints tagged DirectMessagesLookup.
Summary
Functions
DM events by 1-1 conversation Returns DM Events for a DM Conversation by participant ID. For full details, see the API reference for this endpoint. To get started, sign up for the X API.
DM events by User Returns all of the DM Events for an authenticated user. For full details, see the API reference for this endpoint. To get started, sign up for the X API.
Get DMs by conversation Returns DM Events for a DM Conversation by conversation ID. For full details, see the API reference for this endpoint. To get started, sign up for the X API.
Functions
@spec dm_events_by11_conversation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, XApiEx.Model.ApiError.t()} | {:ok, XApiEx.Model.ApiError.t()} | {:error, Tesla.Env.t()}
DM events by 1-1 conversation Returns DM Events for a DM Conversation by participant 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 serverparticipant_id(String.t): The User ID of who this one-to-one Direct Message is with.opts(keyword): Optional parameters:event_types(String.t): Allowed values: MessageCreate,ParticipantsJoin,ParticipantsLeave Comma-separated list of fields (with no spaces). All event types are returned by default.:max_results(String.t): The maximum number of search results to be returned by a request. A number between 1 and the system limit (currently 100). By default, a request response will return 100 results.:pagination_token(String.t): This parameter is used to get the next or previous 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.:"media.fields"(String.t): Allowed values: duration_ms,height,media_key,non_public_metrics,organic_metrics,preview_image_url,promoted_metrics,public_metrics,type,url,width Default values: media_key,type Requires the attachments.media_keys expansion. Comma-separated list of fields (with no spaces).:"tweet.fields"(String.t): Allowed values: attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld Default fields: id, text, and edit_history_tweet_ids. Requires the referenced_tweets.id expansion. Comma-separated list of fields (with no spaces).:"user.fields"(String.t): Allowed values: created_at, description, entities, id, location, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, withheld Default values: id,name,username Requires the participants_ids and/or sender_id expansions. Comma-separated list of fields (with no spaces).:expansions(String.t): Allowed values: created_at, description, entities, id, location, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, withheld Default values: id,name,username Requires the participants_ids and/or sender_id expansions. Comma-separated list of fields (with no spaces).:"dm_event.fields"(String.t):
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec dm_events_by_user( Tesla.Env.client(), keyword() ) :: {:ok, XApiEx.Model.ApiError.t()} | {:ok, XApiEx.Model.ApiError.t()} | {:ok, XApiEx.Model.DmsResponse.t()} | {:error, Tesla.Env.t()}
DM events by User Returns all of the DM Events for an authenticated user. 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 serveropts(keyword): Optional parameters:"dm_event.fields"(String.t): Allowed values: id,text,event_type,dm_conversation_id,created_at,sender_id,attachments,participant_ids,referenced_tweets id, text, and event_type are returned by default. Comma-separated list of fields (with no spaces).:event_types(String.t): Allowed values: MessageCreate,ParticipantsJoin,ParticipantsLeave Comma-separated list of fields (with no spaces). All event types are returned by default.:max_results(String.t): The maximum number of search results to be returned by a request. A number between 1 and the system limit (currently 100). By default, a request response will return 100 results.:pagination_token(String.t): This parameter is used to get the next or previous 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.:"media.fields"(String.t): Allowed values: duration_ms,height,media_key,non_public_metrics,organic_metrics,preview_image_url,promoted_metrics,public_metrics,type,url,width Default values: media_key,type Requires the attachments.media_keys expansion. Comma-separated list of fields (with no spaces).:"tweet.fields"(String.t): Allowed values: attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld Default fields: id, text, and edit_history_tweet_ids. Requires the referenced_tweets.id expansion. Comma-separated list of fields (with no spaces).:"user.fields"(String.t): Allowed values: created_at, description, entities, id, location, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, withheld Default values: id,name,username Requires the participants_ids and/or sender_id expansions. Comma-separated list of fields (with no spaces).:expansions(String.t): Allowed values: sender_id,referenced_tweets.id,attachments.media_keys,participant_ids Comma-separated list of fields (with no spaces).
Returns
{:ok, XApiEx.Model.DmsResponse.t}on success{:error, Tesla.Env.t}on failure
@spec get_dms_by_conversation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, XApiEx.Model.ApiError.t()} | {:ok, XApiEx.Model.ApiError.t()} | {:ok, XApiEx.Model.DmsResponse.t()} | {:error, Tesla.Env.t()}
Get DMs by conversation Returns DM Events for a DM Conversation by 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 serverdm_conversation_id(String.t): Events are retrieved for the conversation associated with this ID. Supports both one-to-one and group conversations.opts(keyword): Optional parameters:"dm_event.fields"(String.t): Allowed values: id,text,event_type,dm_conversation_id,created_at,sender_id,attachments,participant_ids,referenced_tweets id, text, and event_type are returned by default. Comma-separated list of fields (with no spaces).:event_types(String.t): Allowed values: MessageCreate,ParticipantsJoin,ParticipantsLeave Comma-separated list of fields (with no spaces). All event types are returned by default.:max_results(String.t): The maximum number of search results to be returned by a request. A number between 1 and the system limit (currently 100). By default, a request response will return 100 results.:pagination_token(String.t): This parameter is used to get the next or previous 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.:"media.fields"(String.t): Allowed values: duration_ms,height,media_key,non_public_metrics,organic_metrics,preview_image_url,promoted_metrics,public_metrics,type,url,width Default values: media_key,type Requires the attachments.media_keys expansion. Comma-separated list of fields (with no spaces).:"tweet.fields"(String.t): Allowed values: attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld Default fields: id, text, and edit_history_tweet_ids. Requires the referenced_tweets.id expansion. Comma-separated list of fields (with no spaces).:"user.fields"(String.t): Allowed values: created_at, description, entities, id, location, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, withheld Default values: id,name,username Requires the participants_ids and/or sender_id expansions. Comma-separated list of fields (with no spaces).:expansions(String.t): Allowed values: sender_id,referenced_tweets.id,attachments.media_keys,participant_ids Comma-separated list of fields (with no spaces).
Returns
{:ok, XApiEx.Model.DmsResponse.t}on success{:error, Tesla.Env.t}on failure