1.0.4 • Published 5 years ago

poeditor-node-client v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

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);
1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago