ExGram.Adapter behaviour (ex_gram v0.64.0)

Copy Markdown View Source

Behaviour for HTTP adapters.

ExGram ships with three adapters:

Implement this behaviour to create a custom adapter.

Summary

Types

body()

@type body() :: map() | list()

path()

@type path() :: String.t()

result_request()

@type result_request() :: {:ok, map()} | {:error, ExGram.Error.t()}

verb()

@type verb() :: :post | :get

Callbacks

request(verb, path, body, keyword)

@callback request(verb(), path(), body(), keyword()) :: result_request()

Functions

encode(x)

filter_map(m)