XApiEx.Api.List (x_api_ex v1.0.0)

API calls for all endpoints tagged List.

Summary

Functions

Add a member Allows the authenticated user to add a member to a List they own. For full details, see the API reference for this endpoint. Sign up for the X API

Create a list Allows the authenticated user to create a new List. For full details, see the API reference for this endpoint. Sign up for the X API

Delete a list Allows the authenticated user to delete a list they own. For full details, see the API reference for this endpoint. Sign up for the X API

Follow a list Allows the authenticated user to follow a specified List. For full details, see the API reference for this endpoint. Sign up for the X API

Follower lookup This endpoint returns follower details from the List specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

List by ID This endpoint returns details about the List specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

List Posts lookup This endpoint returns all Posts from a List specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Members lookup This endpoint returns member details from the List specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Pin a list Allows the authenticated user to pin a specified List. For full details, see the API reference for this endpoint. Sign up for the X API

Remove a member Allows the authenticated user to remove a member from a List they own. For full details, see the API reference for this endpoint. Sign up for the X API

Unfollow a list Allows the authenticated user to unfollow a specified List. For full details, see the API reference for this endpoint. Sign up for the X API

Unpin a list Allows the authenticated user to unpin a specified List. For full details, see the API reference for this endpoint. Sign up for the X API

Update a list Allows the authenticated user to update a List they own. For full details, see the API reference for this endpoint. Sign up for the X API

User memberships This endpoint returns details on Lists a user is a member of specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

User owned Lists This endpoint returns details on user owned Lists specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

User's followed Lists This endpoint returns details on Lists a user follows specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

User's pinned Lists This endpoint returns details on a user's pinned Lists specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Functions

add_a_member(connection, id, opts \\ [])

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

Add a member Allows the authenticated user to add a member to a List they own. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the List you wish to recieve member details on.
  • opts (keyword): Optional parameters
    • :body (AddAMemberRequest):

Returns

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

create_a_list(connection, opts \\ [])

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

Create a list Allows the authenticated user to create a new List. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

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

Returns

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

delete_a_list(connection, id, opts \\ [])

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

Delete a list Allows the authenticated user to delete a list they own. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): The ID of the List you wish to update the metadata of - the List must be owned by the authenticated user
  • opts (keyword): Optional parameters

Returns

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

follow_a_list(connection, id, opts \\ [])

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

Follow a list Allows the authenticated user to follow a specified List. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the user you wish to recieve details on which Lists they follow.
  • opts (keyword): Optional parameters
    • :body (FollowAListRequest):

Returns

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

follower_lookup(connection, id, opts \\ [])

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

Follower lookup This endpoint returns follower details from the List specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the List you wish to recieve follower details on.
  • opts (keyword): Optional parameters
    • :"user.fields" (String.t): Comma-separated list of fields for the User object. 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
    • :"tweet.fields" (String.t): Comma-separated list of fields for the Tweet object. Expansion required. 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 values: id,text OAuth1.0a User Context authorization required if any of the following fields are included in the request: non_public_metrics,organic_metrics,promoted_metrics
    • :expansions (String.t): Expansions enable requests to expand an ID into a full object in the includes response object. Allowed value: pinned_tweet_id Default value: none
    • :max_results (String.t): The maximum number of results to be returned by a request. Allowed values: 1 through 100. Default value: 100
    • :pagination_token (String.t): This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
    • :"" (String.t):

Returns

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

list_by_id(connection, id, opts \\ [])

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

List by ID This endpoint returns details about the List specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): The ID of the List you wish to update the metadata of - the List must be owned by the authenticated user
  • opts (keyword): Optional parameters
    • :"list.fields" (String.t): Comma-separated fields for the List object. Allowed values: created_at, follower_count, member_count, private, description, owner_id Default values: id,name
    • :expansions (String.t): Expansions enable requests to expand an ID into a full object in the includes response object. Allowed value: owner_id Default value: none
    • :"user.fields" (String.t): Comma-separated list of fields for the User object. Expansion required. 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

Returns

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

list_posts_lookup(connection, id, opts \\ [])

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

List Posts lookup This endpoint returns all Posts from a List specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the List you wish to recieve Post details on.
  • opts (keyword): Optional parameters
    • :"tweet.fields" (String.t): Comma-separated list of fields for the Tweet object. 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,edit_history_tweet_ids,edit_controls Default values: id,text,edit_history_tweet_ids OAuth1.0a User Context authorization required if any of the following fields are included in the request: non_public_metrics,organic_metrics,promoted_metrics
    • :expansions (String.t): Expansions enable requests to expand an ID into a full object in the includes response object. Allowed value: author_id Default value: none
    • :"user.fields" (String.t): Comma-separated list of fields for the User object. Expansion required. 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
    • :max_results (String.t): The maximum number of results to be returned by a request. Allowed values: 1 through 100. Default value: 100
    • :pagination_token (String.t): This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
    • :"" (String.t):

Returns

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

members_lookup(connection, id, opts \\ [])

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

Members lookup This endpoint returns member details from the List specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the List you wish to recieve member details on.
  • opts (keyword): Optional parameters
    • :"user.fields" (String.t): Comma-separated list of fields for the User object. 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
    • :"tweet.fields" (String.t): Comma-separated list of fields for the Tweet object. Expansion required. 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 values: id,text OAuth1.0a User Context authorization required if any of the following fields are included in the request: non_public_metrics,organic_metrics,promoted_metrics
    • :expansions (String.t): Expansions enable requests to expand an ID into a full object in the includes response object. Allowed value: pinned_tweet_id Default value: none
    • :max_results (String.t): The maximum number of results to be returned by a request. Allowed values: 1 through 100. Default value: 100
    • :pagination_token (String.t): This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
    • :"" (String.t):

Returns

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

pin_a_list(connection, id, opts \\ [])

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

Pin a list Allows the authenticated user to pin a specified List. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The user ID whose pinned Lists you would like to retrieve. The user’s ID must correspond to the user ID of the authenticating user, meaning that you must pass the Access Tokens associated with the user ID when authenticating your request.
  • opts (keyword): Optional parameters
    • :body (PinAListRequest):

Returns

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

remove_a_member(connection, id, user_id, opts \\ [])

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

Remove a member Allows the authenticated user to remove a member from a List they own. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the List you wish to remove a user from - the List must be owned by the authenticated user
  • user_id (String.t): Required. The ID of the user you wish to remove from the list
  • opts (keyword): Optional parameters

Returns

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

unfollow_a_list(connection, id, list_id, opts \\ [])

Unfollow a list Allows the authenticated user to unfollow a specified List. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the authenticated user
  • list_id (String.t): Required. The ID of the List you wish to unfollow
  • opts (keyword): Optional parameters

Returns

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

unpin_a_list(connection, id, list_id, opts \\ [])

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

Unpin a list Allows the authenticated user to unpin a specified List. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the authenticated user
  • list_id (String.t): Required. The ID of the List you wish to unpin
  • opts (keyword): Optional parameters

Returns

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

update_a_list(connection, id, opts \\ [])

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

Update a list Allows the authenticated user to update a List they own. For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): The ID of the List you wish to update the metadata of - the List must be owned by the authenticated user
  • opts (keyword): Optional parameters
    • :body (UpdateAListRequest):

Returns

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

user_memberships(connection, id, opts \\ [])

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

User memberships This endpoint returns details on Lists a user is a member of specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the user you wish to recieve membership details on.
  • opts (keyword): Optional parameters
    • :"list.fields" (String.t): Comma-separated fields for the List object. Allowed values: created_at, follower_count, member_count, private, description, owner_id Default values: id,name
    • :"user.fields" (String.t): Comma-separated list of fields for the User object. Expansion required. 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
    • :expansions (String.t): Expansions enable requests to expand an ID into a full object in the includes response object. Allowed value: owner_id Default value: none
    • :max_results (String.t): The maximum number of results to be returned by a request. Allowed values: 1 through 100. Default value: 100
    • :pagination_token (String.t): This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
    • :"" (String.t):

Returns

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

user_owned_lists(connection, id, opts \\ [])

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

User owned Lists This endpoint returns details on user owned Lists specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the user you wish to recieve details on Lists they own.
  • opts (keyword): Optional parameters
    • :"list.fields" (String.t): Comma-separated fields for the List object. Allowed values: created_at, follower_count, member_count, private, description, owner_id Default values: id,name
    • :expansions (String.t): Expansions enable requests to expand an ID into a full object in the includes response object. Allowed value: owner_id Default value: none
    • :"user.fields" (String.t): Comma-separated list of fields for the User object. Expansion required. 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
    • :max_results (String.t): The maximum number of results to be returned by a request. Allowed values: 1 through 100. Default value: 100
    • :pagination_token (String.t): This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
    • :"" (String.t):

Returns

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

user_s_followed_lists(connection, id, opts \\ [])

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

User's followed Lists This endpoint returns details on Lists a user follows specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The ID of the user you wish to recieve details on which Lists they follow.
  • opts (keyword): Optional parameters
    • :"list.fields" (String.t): Comma-separated fields for the List object. Allowed values: created_at, follower_count, member_count, private, description, owner_id Default values: id,name
    • :"user.fields" (String.t): Comma-separated list of fields for the User object. Expansion required. 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
    • :expansions (String.t): Expansions enable requests to expand an ID into a full object in the includes response object. Allowed value: owner_id Default value: none
    • :max_results (String.t): The maximum number of results to be returned by a request. Allowed values: 1 through 100. Default value: 100
    • :pagination_token (String.t): This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
    • :"" (String.t):

Returns

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

user_s_pinned_lists(connection, id, opts \\ [])

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

User's pinned Lists This endpoint returns details on a user's pinned Lists specified by the requested ID For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • id (String.t): Required. The user ID whose pinned Lists you would like to retrieve. The user’s ID must correspond to the user ID of the authenticating user, meaning that you must pass the Access Tokens associated with the user ID when authenticating your request.
  • opts (keyword): Optional parameters
    • :"list.fields" (String.t): Comma-separated fields for the List object. Allowed values: created_at, follower_count, member_count, private, description, owner_id Default values: id,name
    • :expansions (String.t): Expansions enable requests to expand an ID into a full object in the includes response object. Allowed value: owner_id Default value: none
    • :"user.fields" (String.t): Comma-separated list of fields for the User object. Expansion required. 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
    • :"" (String.t):

Returns

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