Lokalise APIv2 Node SDK

Node interface for the Lokalise APIv2.

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




Screenshots

Screenshot attributes

Fetch screenshots

API doc

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

screenshots.items[0].screenshot_id;

Fetch a single screenshot

API doc

const screenshot = await lokaliseApi.screenshots().get(screenshot_id, {project_id: project_id});

screenshot.title;

Create screenshots

API doc

const screenshots = await lokaliseApi.screenshots().create(
  [{
    "data": data_base64,
    "ocr": false,
    "key_ids": [key_id],
    "tags": ["onboarding"]
  }],
  {project_id: project_id}
);

screenshots.items[0].screenshot_id;
screenshots.errors;

Update screenshot

API doc

const screenshot = await lokaliseApi.screenshots().update(screenshot_id,
  {title: 'node screen', description: 'node desc'},
  {project_id: project_id}
);

screenshot.title;

Delete screenshot

API doc

const response = await lokaliseApi.screenshots().delete(screenshot_id, {project_id: project_id});

response.screenshot_deleted