Elixir interface for the Lokalise APIv2.
View the Project on GitHub lokalise/elixir-lokalise-api
{:ok, webhooks} = ElixirLokaliseApi.Webhooks.all(project_id, page: 2, limit: 1)
webhook = hd(webhooks.items)
webhook.webhook_id
{:ok, webhook} = ElixirLokaliseApi.Webhooks.find(project_id, webhook_id)
webhook.webhook_id
data = %{
url: "http://bodrovis.tech/lokalise",
events: ["project.imported"]
}
{:ok, webhook} = ElixirLokaliseApi.Webhooks.create(project_id, data)
webhook.url
data = %{
events: ["project.exported"]
}
{:ok, webhook} = ElixirLokaliseApi.Webhooks.update(project_id, webhook_id, data)
webhook.webhook_id
{:ok, resp} = ElixirLokaliseApi.Webhooks.delete(project_id, webhook_id)
resp.webhook_deleted
{:ok, resp} = ElixirLokaliseApi.Webhooks.regenerate_secret(project_id, webhook_id)
resp.project_id
resp.secret