dnsimple v1.2.0 Dnsimple.Webhooks

Provides functions to interact with the webhook endpoints.

See:

Summary

Functions

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

Specs

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"
})
delete_webhook(client, account_id, webhook_id, options \\ [])

Specs

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)
get_webhook(client, account_id, webhook_id, options \\ [])

Specs

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)
list_webhooks(client, account_id, options \\ [])

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")