FusionAuth.Response (FusionAuth v0.3.0) View Source

The FusionAuth.Response module provides functions to format the response from FusionAuth.result.

Example

  iex> FusionAuth.client()
       |> FusionAuth.Groups.get_groups()
       |> FusionAuth.Response.format("groups", &atomize_keys/1)

  {:ok, [%{id: "id", name: "name"}]

Link to this section Summary

Link to this section Types

Link to this section Functions

Specs

format(result()) :: {:error, any()}
format(result()) :: {:ok, map() | list()}
Link to this function

format(arg, payload_key)

View Source

Specs

format(result(), String.t()) :: {:error, any()}
format(result(), String.t()) :: {:ok, map() | list()}
Link to this function

format(arg, payload_key, formatter)

View Source

Specs

format(result(), String.t(), (... -> any())) :: {:error, any()}
format(result(), String.t(), (... -> any())) :: {:ok, map() | list()}
Link to this function

format(arg, payload_key, formatter, format_helper)

View Source

Specs

format(result(), String.t(), (... -> any()), (... -> any())) :: {:error, any()}
format(result(), String.t(), (... -> any()), (... -> any())) ::
  {:ok, map() | list()}