Notifique (notifique v0.2.1)

Copy Markdown

Cliente Notifique — WhatsApp, SMS, Email, Push e envio por template (messages).

Summary

Functions

Returns the typed OpenAPI API (Notifique.TypedApi) for IDE/Dialyzer autocomplete.

Returns the dynamic OpenAPI map (353 operações) para introspect ou testes de cobertura.

Returns a top-level namespace from the dynamic API (non-legacy namespaces).

Inicializa um novo cliente Notifique. base_url padrão: https://api.notifique.dev/v1

Executa a requisição HTTP. Em status >= 400 retorna {:error, %{status: code, body: body}}. Caso contrário retorna {:ok, body} (body é o JSON decodificado).

Executes a request using an absolute OpenAPI path (e.g. /v1/oauth/apps).

Types

t()

@type t() :: %Notifique{
  api: Notifique.TypedApi.t() | nil,
  api_key: String.t(),
  base_url: String.t(),
  dynamic_api: map() | nil
}

Functions

api(notifique)

@spec api(t()) :: Notifique.TypedApi.t()

Returns the typed OpenAPI API (Notifique.TypedApi) for IDE/Dialyzer autocomplete.

dynamic_api(notifique)

@spec dynamic_api(t()) :: map()

Returns the dynamic OpenAPI map (353 operações) para introspect ou testes de cobertura.

encode_path_segment(segment)

namespace(client, name)

@spec namespace(t(), String.t()) :: map() | nil

Returns a top-level namespace from the dynamic API (non-legacy namespaces).

new(api_key, base_url \\ "https://api.notifique.dev/v1")

Inicializa um novo cliente Notifique. base_url padrão: https://api.notifique.dev/v1

request(client, method, path, body \\ nil, opts \\ [])

Executa a requisição HTTP. Em status >= 400 retorna {:error, %{status: code, body: body}}. Caso contrário retorna {:ok, body} (body é o JSON decodificado).

request_api(client, method, path, body \\ nil, opts \\ [])

@spec request_api(t(), atom(), String.t(), term(), keyword()) ::
  {:ok, term()} | {:error, term()}

Executes a request using an absolute OpenAPI path (e.g. /v1/oauth/apps).