Streamex v0.3.0 Streamex.Config

The Streamex.Config module defines functions for configuring the connection client.

Summary

Functions

Returns the current client’s base api url

Configures the client with the values set in the configuration file. Returns :ok

Configures the client with the specified key, secret and options. Returns :ok

Returns the current client’s api key

Returns the current client’s api region

Returns the current client’s api secret

Returns the current client’s timeout setting

Returns the current client’s api version

Functions

base_url()

Returns the current client’s base api url.

configure()

Configures the client with the values set in the configuration file. Returns :ok.

configure(key, secret, opts \\ [])

Configures the client with the specified key, secret and options. Returns :ok.

Available options are:

  • region - Currently supported values are us-east, us-west and eu-west
  • timeout - Number of milliseconds before a request is discarded. 3000 by default
  • version - API version number. Defaults to 1.0

Examples

iex> Streamex.Config.configure("my_key", "my_secret")
:ok

iex> Streamex.Config.configure("my_key", [region: "us-central"])
:ok
key()

Returns the current client’s api key.

region()

Returns the current client’s api region.

secret()

Returns the current client’s api secret.

timeout()

Returns the current client’s timeout setting.

version()

Returns the current client’s api version.