View Source DiscoLog.Discord.API behaviour (disco_log v1.0.0)
A module for working with Discord REST API. https://discord.com/developers/docs/reference
This module is also a behavior. The default implementation uses the Req
HTTP client.
If you want to use a different client, you'll need to implement the behavior and
put it under the discord_client_module
configuration option.
Summary
Types
The client can be any term. It is passed as a first argument to request/4
. For example, the
default DiscoLog.Discord.API.Client
client uses Req.Request.t()
as a client.
Types
@type client() :: any()
The client can be any term. It is passed as a first argument to request/4
. For example, the
default DiscoLog.Discord.API.Client
client uses Req.Request.t()
as a client.
@type response() :: {:ok, %{status: non_neg_integer(), body: any()}} | {:error, Exception.t()}