yandex-translate-api-wrapper

1.0.0 • Public • Published

yandex-translate-api-wrapper

A simple wrapper of the Yandex's translation API.

Install

$ npm install yandex-translate-api-wrapper --save

Usage

translateApi.getLanguageList(apiKey);
//=> return the list of supported languages
 
apiWrapper.translateText(apiKey, supportedLanguage, text);
//=> return translation

Example

const translateApi = require('yandex-translate-api-wrapper')
const apiKey = 'xxxxxxx'
const languageList = translateApi.getLanguageList(apiKey);
//=> {"dirs":["az-ru","be-bg"...]}
 
const translation = translateApi.translateText(apiKey, 'es-en', 'Hola');
//=> {"code":200,"lang":"es-en","text":["Hello"]}

License

MIT © Tommytrg.

Readme

Keywords

none

Package Sidebar

Install

npm i yandex-translate-api-wrapper

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tommytrg