HookSniff (HookSniff v0.2.0)

Copy Markdown View Source

Official Elixir client for the HookSniff webhook delivery service.

Usage

client = HookSniff.new("hr_live_...")

# Create endpoint
{:ok, endpoint} = HookSniff.Endpoints.create(client, %{url: "https://myapp.com/webhook"})

# Send webhook
{:ok, delivery} = HookSniff.Webhooks.send(client, %{
  endpoint_id: endpoint["id"],
  event: "order.created",
  data: %{order_id: "12345"}
})

Summary

Functions

Create a new HookSniff client.

Types

t()

@type t() :: %HookSniff{
  api_key: String.t(),
  base_url: String.t(),
  timeout: pos_integer()
}

Functions

new(api_key, opts \\ [])

@spec new(
  String.t(),
  keyword()
) :: t()

Create a new HookSniff client.