TopggEx.HttpClientBehaviour behaviour (topgg_ex v0.1.4)

View Source

Behaviour for HTTP client implementations.

This behaviour defines the contract for HTTP clients used by the TopggEx API. It enables dependency injection and mocking for testing purposes.

Summary

Types

request_options()

@type request_options() :: %{
  token: String.t(),
  finch_name: atom(),
  base_url: String.t()
}

Callbacks

request(request_options, atom, t, arg4)

@callback request(request_options(), atom(), String.t(), map() | nil) ::
  {:ok, any()} | {:error, any()}