npm.io
0.0.2 • Published 8 years ago

lingualeo-api

Licence
ISC
Version
0.0.2
Deps
1
Size
12 kB
Vulns
0
Weekly
0
Stars
12

Lingualeo.ru API

Small wrapper for Lingualeo.ru.

Thus Lingualeo has no public API - it's just a number of functions, which allow to do some stuff. More information might be found at sources of Lingualeo Chrome Addon

Usage example:

lingualeoApi
  .login(email, password)
  // .then(data => console.log("Login:", util.inspect(data)))
  .then(_ => lingualeoApi.getTranslates(WORD))
  .then(data => {
    console.log(`Translates for ${WORD}`, util.inspect(data));
    return data;
  })
  .then(list => lingualeoApi.addWord(WORD, list[0].value))
  .then(data => console.log("addWord", util.inspect(data)))
  .catch(err => console.error("Error", err));

Keywords