View Source Reydenx (Reyden-X v0.1.2)

Reyden-X is an automated service for promoting live broadcasts on external sites with integrated system of viewers and views management

API Documentation

Website

Summary

Functions

Sends a request to obtain an API access token. Login and password must be set in the environment variables 'REYDENX_EMAIL' and 'REYDENX_PASSWORD'

Sends a request to obtain an API access token

Functions

@spec new() :: {:error, ResponseError} | {:ok, Reydenx.Model.Token}

Sends a request to obtain an API access token. Login and password must be set in the environment variables 'REYDENX_EMAIL' and 'REYDENX_PASSWORD'

See: API Documentation

Examples:

### Success:

iex> Reydenx.new()
{:ok, %Reydenx.Model.Token{
  access_token: "XXX",
  token_type: "bearer",
  expires_in: "2024-01-01T10:00:00.049560+00:00"
}}

### Fail

iex> Reydenx.new()
{:error, %Reydenx.Model.ResponseError{
  path: "/token/",
  status_code: 429,
  message: "Retry After: 7"
}}
@spec new({username :: String.t(), password :: String.t()}) ::
  {:error, ResponseError} | {:ok, Reydenx.Model.Token}

Sends a request to obtain an API access token

See: API Documentation

Examples:

### Success:

iex> Reydenx.new({"some_username", "secret_password"})
{:ok, %Reydenx.Model.Token{
  access_token: "XXX",
  token_type: "bearer",
  expires_in: "2024-01-01T10:00:00.049560+00:00"
}}

### Fail

iex> Reydenx.new({"some_username", "secret_password"})
{:error, %Reydenx.Model.ResponseError{
  path: "/token/",
  status_code: 429,
  message: "Retry After: 7"
}}