MuxWrapper.Assets.create_asset

You're seeing just the function create_asset, go back to MuxWrapper.Assets module for more information.
Link to this function

create_asset(client, params)

View Source

Specs

create_asset(
  %Tesla.Client{adapter: term(), fun: term(), post: term(), pre: term()},
  Enum.t()
) :: tuple()

Provide create asset to Mux, suggest read Mux doc first

Parameters

Examples

iex> client = MuxWrapper.client()
%Tesla.Client{
  adapter: nil,
  fun: nil,
  post: [],
  pre: [
    {Tesla.Middleware.BaseUrl, :call, ["https://api.mux.com"]},
    {Tesla.Middleware.BasicAuth, :call,
     [
       %{
         password: "your_password",
         username: "your_username"
       }
     ]}
  ]
}

iex> MuxWrapper.Assets.create_asset(client, %{input: "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"})
{:ok, 
  %MuxWrapper.EmbeddedSchema.Asset{
    created_at: ~N[2021-03-19 13:13:26],
    id: "gbxJ8PYkJg9TOPhP0100gYIlZKqgCai4mBnummQu8YKUI",
    master_access: "none",
    mp4_support: "none",
    playback_ids: [],
    status: "preparing"
  }
}