Mux v1.9.0 Mux.Video.SigningKeys View Source

This module provides functions for managing signing keys in Mux Video. API Documentation

Link to this section Summary

Functions

Create a new signing key.

Delete a signing key.

Retrieve a signing key by ID.

List signing keys.

Link to this section Functions

Create a new signing key.

Returns {:ok, signing_key, %Tesla.Client{}}.

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> Mux.Video.SigningKeys.create(client)
{:ok, %{"created_at" => "1540438441", "id" => "3kXq01SS00BQZqHHIq1egKAhuf7urAc400C", "private_key" => "thisisaverysecretkeythatinreallifewouldbealotlonger=="}, %Tesla.Env{__client__: nil, __module__: nil, body: %{"data" => %{"created_at" => "1540438441", "id" => "3kXq01SS00BQZqHHIq1egKAhuf7urAc400C", "private_key" => "thisisaverysecretkeythatinreallifewouldbealotlonger=="}}, headers: [], method: nil, opts: [], query: [], status: 201, url: ""}}
Link to this function

delete(client, key_id, params \\ [])

View Source

Delete a signing key.

Returns a tuple such as {:ok, %Telsa.Env{}}

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {status, "", _env} = Mux.Video.SigningKeys.delete(client, "3kXq01SS00BQZqHHIq1egKAhuf7urAc400C")
iex> status
:ok
Link to this function

get(client, key_id, options \\ [])

View Source

Retrieve a signing key by ID.

Returns a tuple such as {:ok, signing_key, %Telsa.Env{}}

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {:ok, signing_key, _env} = Mux.Video.SigningKeys.get(client, "3kXq01SS00BQZqHHIq1egKAhuf7urAc400C")
iex> signing_key
%{"created_at" => "1540438441", "id" => "3kXq01SS00BQZqHHIq1egKAhuf7urAc400C"}
Link to this function

list(client, params \\ [])

View Source

List signing keys.

Returns a tuple such as {:ok, signing_keys, %Telsa.Env{}}

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {:ok, signing_keys, _env} = Mux.Video.SigningKeys.list(client)
iex> signing_keys
[%{"created_at" => "1540438441", "id" => "3kXq01SS00BQZqHHIq1egKAhuf7urAc400C"}, %{"created_at" => "1540438441", "id" => "3kXq01SS00BQZqHHIq1egKAhuf7urAc400C"}]