View Source Dnsimple.Webhooks (dnsimple v4.0.0)

Provides functions to interact with the webhook endpoints.

See:

Summary

Functions

Link to this function

create_webhook(client, account_id, attributes, options \\ [])

View Source
@spec create_webhook(Dnsimple.Client.t(), String.t() | integer(), map(), Keyword.t()) ::
  {:ok | :error, Dnsimple.Response.t()}

Creates a new webhook.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Webhooks.create_webhook(client, account_id = "1010", %{
  url: "https://test.host/handler"
})
Link to this function

delete_webhook(client, account_id, webhook_id, options \\ [])

View Source
@spec delete_webhook(
  Dnsimple.Client.t(),
  String.t() | integer(),
  String.t() | integer(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Deletes a webhook.

Warning: this is a destructive operation.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Webhooks.delete_webhook(client, account_id = "1010", webhook_id = 1234)
Link to this function

get_webhook(client, account_id, webhook_id, options \\ [])

View Source
@spec get_webhook(
  Dnsimple.Client.t(),
  String.t() | integer(),
  String.t() | integer(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Returns a webhook.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Webhooks.get_webhook(client, account_id = "1010", webhook_id = 1234)
Link to this function

list_webhooks(client, account_id, options \\ [])

View Source

Lists the existing webhooks in the account.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Webhooks.list_webhooks(client, account_id = "1010")