XApiEx.Api.Upload (x_api_ex v1.0.0)

API calls for all endpoints tagged Upload.

Summary

Functions

Media Upload STATUS Allows an authenticated user to check the processing status of uploaded media. You can use this endpoint to monitor the status of video. The media_id parameter is from the the uploaded media, and the command=STATUS parameter retrieves information about whether the processing status is pending, in progress, or complete. For full details, see the API reference for this endpoint. To get started, sign up for the X API.

Upload Media Allows an authenticated user to upload media. You can use this endpoint to upload videos before attaching them to Tweets. The media_type parameter specifies the type of media, while the command parameter controls the upload process by initializing, appending and finalizing the upload. For full details, see the API reference for this endpoint. To get started, sign up for the X API.

Functions

media_upload_status(connection, opts \\ [])

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

Media Upload STATUS Allows an authenticated user to check the processing status of uploaded media. You can use this endpoint to monitor the status of video. The media_id parameter is from the the uploaded media, and the command=STATUS parameter retrieves information about whether the processing status is pending, in progress, or complete. 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
    • :media_id (String.t): Media id for the requested media upload status.
    • :command (String.t): The command for the media upload request.

Returns

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

upload_media(connection, opts \\ [])

@spec upload_media(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, nil}
  | {:ok, XApiEx.Model.ApiError.t()}
  | {:ok, XApiEx.Model.UploadMedia202Response.t()}
  | {:ok, XApiEx.Model.UploadMedia200Response.t()}
  | {:ok, XApiEx.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Upload Media Allows an authenticated user to upload media. You can use this endpoint to upload videos before attaching them to Tweets. The media_type parameter specifies the type of media, while the command parameter controls the upload process by initializing, appending and finalizing the upload. 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
    • :media_type (String.t): Specifies the MIME type of the media being uploaded
    • :command (String.t): command : Specifies the current step in the media upload process. Allowed values: INIT, APPEND, FINALIZE, STATUS
    • :media (String.t):

Returns

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