Lokalise APIv2 Node SDK

Node interface for the Lokalise APIv2.

View the Project on GitHub lokalise/node-lokalise-api




Tasks

Task attributes

Fetch tasks

API doc

const tasks = await lokaliseApi.tasks().list({
  project_id: project_id,
  page: 2,
  limit: 1,
});

tasks.items[0].task_id;

Fetch a single task

API doc

const task = await lokaliseApi.tasks().get(task_id, {project_id: project_id});

task.title;

Create task

API doc

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;

Update task

API doc

const task = await lokaliseApi.tasks().update(
  task_id,
  {title: 'node updated'},
  {project_id: project_id}
);

task.title;

Delete task

API doc

const response = await lokaliseApi.tasks().delete(task_id, {project_id: project_id});

response.task_deleted;