AtEx v0.20.21 AtEx.Gateway.Application View Source

This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking API Application Data endpoint, use it to POST and GET requests to the Application endpoint

Link to this section Summary

Functions

Collects application data from Africas Talking endpoint, Use this function to collect Data about your application

Process results from calling the gateway

Link to this section Types

Link to this type

option()

View Source
option() ::
  {:method, Tesla.Env.method()}
  | {:url, Tesla.Env.url()}
  | {:query, Tesla.Env.query()}
  | {:headers, Tesla.Env.headers()}
  | {:body, Tesla.Env.body()}
  | {:opts, Tesla.Env.opts()}

Link to this section Functions

Link to this function

get_data()

View Source
get_data() :: {:ok, map()} | {:error, term()}

Collects application data from Africas Talking endpoint, Use this function to collect Data about your application

Parameters

  • none

Examples

iex> AtEx.Gateway.Application.get_data()
{:ok, %{"UserData" => %{"balance" => "ZAR -1.3448"}} }

Process results from calling the gateway