ExGram.Adapter behaviour (ex_gram v0.56.0)

View Source

Behaviour for HTTP adapters

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)

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