poeditor-node-client

1.0.4 • Public • Published

POEditor-Node-Client

A lightweight Node.js client for POEditor

Installation

npm install poeditor-node-client

Usage

var poeditorClient = require('poeditor-node-client');


var client = new poeditorClient('api_token');
var params = {
	id: '123456',
	language: 'en',
	updating: 'terms_translations',
	overwrite: 1,
	sync_terms: 1,
	file: fs.createReadStream('pathtofile')
}


var request = client.upload(params);

request.onDone(function (data) {});
request.onDone(function (error, response, body) {});

Methods

Upload

Updates terms / translations.

client.upload({ ... });

Export

Returns the link of the file (expires after 10 minutes).

client.export({ ... });

List Projects

Returns the list of projects owned by user.

client.list();

List Languages

Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.

client.listLanguages({ id: 'project_id' });

Set Debug

Logs response to console.

client.setDebug(true);

Readme

Keywords

none

Package Sidebar

Install

npm i poeditor-node-client

Weekly Downloads

3

Version

1.0.4

License

ISC

Unpacked Size

3.79 kB

Total Files

6

Last publish

Collaborators

  • liadgu