HookSniff.Endpoints (HookSniff v0.2.0)

Copy Markdown View Source

Endpoints resource — CRUD operations for webhook endpoints.

Summary

Functions

Create a new endpoint.

Delete an endpoint.

Get an endpoint by ID.

List all endpoints.

Rotate the signing secret for an endpoint.

Functions

create(client, params)

@spec create(HookSniff.t(), map()) :: {:ok, map()} | {:error, HookSniff.Error.t()}

Create a new endpoint.

delete(client, endpoint_id)

@spec delete(HookSniff.t(), String.t()) ::
  {:ok, boolean()} | {:error, HookSniff.Error.t()}

Delete an endpoint.

get(client, endpoint_id)

@spec get(HookSniff.t(), String.t()) :: {:ok, map()} | {:error, HookSniff.Error.t()}

Get an endpoint by ID.

list(client, opts \\ [])

@spec list(
  HookSniff.t(),
  keyword()
) :: {:ok, map()} | {:error, HookSniff.Error.t()}

List all endpoints.

rotate_secret(client, endpoint_id)

@spec rotate_secret(HookSniff.t(), String.t()) ::
  {:ok, map()} | {:error, HookSniff.Error.t()}

Rotate the signing secret for an endpoint.