XApiEx.Api.PinnedLists (x_api_ex v1.0.0)

API calls for all endpoints tagged PinnedLists.

Summary

Functions

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

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

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

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

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

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