ExPlain.Client (ExPlain v0.3.0)

Copy Markdown View Source

Holds the configured HTTP client used to communicate with the Plain API.

Create one with ExPlain.new/1 and pass it as the first argument to every domain function.

Summary

Types

t()

@type t() :: %ExPlain.Client{req: Req.Request.t()}

Functions

execute(client, document, variables \\ %{})

@spec execute(t(), String.t(), map()) :: {:ok, map()} | {:error, ExPlain.Error.t()}

new(api_key, base_url, extra_req_opts \\ [])

@spec new(String.t(), String.t(), keyword()) :: t()