Node interface for the Lokalise APIv2.
View the Project on GitHub lokalise/node-lokalise-api
const webhooks = await lokaliseApi.webhooks().list({
project_id: project_id,
page: 2,
limit: 1,
});
webhooks.items[0].url;
const webhook = await lokaliseApi.webhooks().get(webhook_id, {project_id: project_id});
webhook.secret;
const webhook = await lokaliseApi.webhooks().create(
{url: 'https://example.com', events: ['project.exported']},
{project_id: project_id}
);
webhook.url;
const webhook = await lokaliseApi.webhooks().update(
webhook_id,
{url: 'http://example.com', events: ['project.snapshot']},
{project_id: project_id}
);
webhook.events[0];
const response = await lokaliseApi.webhooks().delete(
webhook_id,
{project_id: project_id}
);
response.webhook_deleted;
const response = await lokaliseApi.webhooks().regenerate_secret(
webhook_id,
{project_id: project_id}
);
response.secret;