Wax.CloudAPI.Media (wax v1.1.4)
Media managment via the Cloud API
Summary
Functions
Downloads a media file from the Whatsapp Cloud server
Uploads a media file to the Cloud API servers from binary data
Uploads a media file to the Cloud API servers from a path
Functions
@spec download(String.t(), Wax.CloudAPI.Auth.t()) :: {:ok, file_binary_data :: binary()} | {:error, String.t()}
Downloads a media file from the Whatsapp Cloud server
@spec upload_binary(iodata(), String.t(), Wax.CloudAPI.Auth.t()) :: {:ok, Media.media_id()} | {:error, String.t()}
Uploads a media file to the Cloud API servers from binary data
This returns the Media ID, which is required to send any type of media files in a message.
@spec upload_from_path(Path.t(), Wax.CloudAPI.Auth.t()) :: {:ok, Media.media_id()} | {:error, String.t()}
Uploads a media file to the Cloud API servers from a path
This returns the Media ID, which is required to send any type of media files in a message.