textgears-api
Version:
Textgears API
52 lines (40 loc) • 1.06 kB
Markdown
for node.js
install the [package] with `npm`:
```sh
$ npm install textgears-api
```
or with `yarn`:
```sh
$ yarn add textgears-api
```
```js
import * as textgears from 'textgears-api';
const textgearsApi = textgears('YOUR_KEY', {language: 'en-US', ai: false});
textgearsApi.checkGrammar('I is a engineer')
.then((data) => {
for (const error of data.response.errors) {
console.log('Error: %s. Suggestions: %s', error.bad, error.better.join(', '));
}
})
.catch((err) => {});
```
You can run tests with command
```
npm test
```
which is an alias for
```
nyc mocha
```
or
```
./node_modules/nyc/bin/nyc.js ./node_modules/mocha/bin/mocha
```
[ ]: https://textgears.com/
[ ]: https://www.npmjs.com/package/textgears-api
[ ]: https://textgears.com/api/
[ ]: https://travis-ci.org/insbrook/textgears-api-node
[ ]: https://travis-ci.org/insbrook/textgears-api-node.svg?branch=master
> [Textgears][textgears] API