node-unbabel

0.1.5 • Public • Published

Unbabel API for Node

This Node.js module provides access to the Unbabel API for ordering translations.

Installation

Install via npm

npm install node-unbabel --save

Initialize Unbabel with your username and API key. If querying the Unbabel sandbox, set sandbox to true.

var unbabel = require('node-unbabel')(username, apiKey, sandbox);

Endpoints

  • All callbacks are passed an error and response: callback(err, res).
  • Supports camelCase and underscore naming conventions for option fields.
  • Please refer to Unbabel's API Docs for endpoint details.

unbabel.translation

unbabel.translation.get(uid, callback);

unbabel.translation.getAll({status: status, targetLanguage: targetLanguage, sourceLanguage: sourceLanguage}, callback);

unbabel.translation.request({text: text_to_translate, target_language: target_language, callback_url: callback_url}, callback);

unbabel.translation.bulkRequest([{text: text_to_translate, target_language: target_language}], callback);

unbabel

unbabel.languagePair(callback);

unbabel.tone(callback);

unbabel.topic(callback);

Contribute

Forks and pull requests welcome!

TODO

  • Add tests

Author

Roger Graham. Email me if you have any questions: roger.graham.1393@gmail.com. Supported by Localize.js.

Package Sidebar

Install

npm i node-unbabel

Weekly Downloads

5

Version

0.1.5

License

MIT

Last publish

Collaborators

  • localize