MuxWrapper (Mux Wrapper v0.1.1) View Source

Provide shared functions, iex., client()

Link to this section Summary

Functions

Provide a client via authentication

Link to this section Functions

Specs

client() :: %Tesla.Client{
  adapter: term(),
  fun: term(),
  post: term(),
  pre: term()
}

Provide a client via authentication

Configuration

Be sure added this in your config.exs

config :mux,
  access_token_id: token_id_from_Mux,
  access_token_secret: token_secret_from_Mux

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"
       }
     ]}
  ]
}