Meili.Webhook (Meili v0.1.0)

Copy Markdown View Source

Manages Meilisearch webhooks.

Summary

Functions

Creates a new webhook, raising on error.

Deletes a webhook by UUID.

Deletes a webhook, raising on error.

Retrieves details of a single webhook by UUID.

Retrieves details of a single webhook, raising on error.

Lists all webhooks.

Lists all webhooks, raising on error.

Updates an existing webhook, raising on error.

Functions

create(client_or_params, params_or_nil \\ nil)

Creates a new webhook.

Examples

params = %{
  url: "https://my-api.com/webhook",
  events: ["task.succeeded", "task.failed"]
}
Meili.Webhook.create(params)
Meili.Webhook.create(client, params)

create!(client_or_params, params_or_nil \\ nil)

Creates a new webhook, raising on error.

delete(client_or_uuid, uuid_or_nil \\ nil)

Deletes a webhook by UUID.

Examples

Meili.Webhook.delete("some-uuid")
Meili.Webhook.delete(client, "some-uuid")

delete!(client_or_uuid, uuid_or_nil \\ nil)

Deletes a webhook, raising on error.

get(client_or_uuid, uuid_or_nil \\ nil)

Retrieves details of a single webhook by UUID.

Examples

Meili.Webhook.get("some-uuid")
Meili.Webhook.get(client, "some-uuid")

get!(client_or_uuid, uuid_or_nil \\ nil)

Retrieves details of a single webhook, raising on error.

list(client \\ nil)

Lists all webhooks.

Examples

Meili.Webhook.list()
Meili.Webhook.list(client)

list!(client \\ nil)

Lists all webhooks, raising on error.

update(client_or_uuid, uuid_or_params \\ nil, params_or_nil \\ nil)

Updates an existing webhook.

Examples

Meili.Webhook.update("some-uuid", url: "https://new-url.com")
Meili.Webhook.update(client, "some-uuid", %{events: ["*"]})

update!(client_or_uuid, uuid_or_params \\ nil, params_or_nil \\ nil)

Updates an existing webhook, raising on error.