WordAI
A node interface for WordAI's API.
WordAI's API allows you to POST an article or block of text and receive back a plain text or JSON formatted WordAI translated (spun) version of your text. Powered by WordAI.com.
You will need a password hash from https://wordai.com.
Please look at their documentation to see how to use the API. The convenience functions provided by this module
simply pass their options along as form data to the REST API, so the documentation
is totally valid. There are some usage examples below to see how these options should be passed in.
Add to your project
$ npm install wordai --save
~ OR ~
$ yarn add wordai
Test
$ export WORDAI_EMAIL=<YOUR_WORDAI_EMAIL>
$ export WORDAI_KEY=<YOUR_WORDAI_PASSWORD_HASH>
$ yarn test
Example usage of WordAI API
The spin method support promises and node-style callbacks.
const WordAI = require('wordai');
new WordAI({
email: process.env.WORDAI_EMAIL,
hash: process.env.WORDAI_KEY,
output: 'json',
quality: 'Regular',
});
WordAI.spin({
text: 'Here is an example.',
}).then(response => {
console.log(response);
});