Node interface for the Lokalise APIv2.
View the Project on GitHub lokalise/node-lokalise-api
const tasks = await lokaliseApi.tasks().list({
project_id: project_id,
page: 2,
limit: 1,
});
tasks.items[0].task_id;
const task = await lokaliseApi.tasks().get(task_id, {project_id: project_id});
task.title;
const task = await lokaliseApi.tasks().create(
{
title: 'node task',
keys: [key1, key2],
languages: [
{
"language_iso": "en",
"users": [user1, user2]
}
]
},
{project_id: project_id}
);
task.task_id;
const task = await lokaliseApi.tasks().update(
task_id,
{title: 'node updated'},
{project_id: project_id}
);
task.title;
const response = await lokaliseApi.tasks().delete(task_id, {project_id: project_id});
response.task_deleted;