Skip to content
master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ProWritingAid.API

Official ProWritingAid API Version 2

  • API version: v2
  • Package version: 2.0.0

For more information, please visit https://prowritingaid.com/en/App/API#js

Installation

For Node.js

npm

Install package using command:

npm install pro_writing_aid_api --save

git

Or install package from the git repo:

npm install prowriting/prowritingaid.javascript --save

Webpack

You'll need to adjust Webpack's configuration to resolve the dependency issue.

Related Issues

https://github.com/swagger-api/swagger-codegen/issues/3336

https://medium.com/webpack/how-to-cope-with-broken-modules-in-webpack-4c0427fb23a

Steps to resolve

Add Imports Loader

Configure webpack

module: {
    rules: [
        {
            test: /pro_writing_aid_api\/.*\.js$/,
            use: 'imports-loader?define=>false'
        }
    ]
}

Thanks to @devkdouglass! https://github.com/prowriting/prowritingaid.javascript/issues/1#issuecomment-620249067

Getting Started

Please follow the installation instruction and execute the following JS code:

var ProWritingAidApi = require('pro_writing_aid_api');

var api = new ProWritingAidApi.TextApi();
api.apiClient.basePath="https://api.prowritingaid.com";
api.apiClient.defaultHeaders={'licenseCode': 'your license code'}
var request = new ProWritingAidApi.TextAnalysisRequest(
  "I couldnt wait any any longer, I new what I hadd to do",
  ['grammar'],
  "General",
  "En"
);
api.post(request)
  .then(function(data) {
    console.log('API called successfully. Returned data: ');
    console.log(data);
  }, function(error) {
    console.error(error);
  });

Documentation for API Endpoints

All URIs are relative to https://api.prowritingaid.com

Class Method HTTP request Description
ProWritingAidApi.ContextualThesaurusApi get GET /api/async/contextualthesaurus/result/{taskId} Tries to get the result of a request using the task id of the request
ProWritingAidApi.ContextualThesaurusApi post POST /api/async/contextualthesaurus Analyses text and returns contextual thesaurus entries
ProWritingAidApi.HtmlApi get GET /api/async/html/result/{taskId} Tries to get the result of a request using the task id of the request
ProWritingAidApi.HtmlApi post POST /api/async/html Analyses HTML and adds suggestion tags to it
ProWritingAidApi.SummaryApi get GET /api/async/summary/result/{taskId} Tries to get the result of a request using the task id of the request
ProWritingAidApi.SummaryApi post POST /api/async/summary Gets the summary analysis of a document
ProWritingAidApi.TextApi get GET /api/async/text/result/{taskId} Tries to get the result of a request using the task id of the request
ProWritingAidApi.TextApi post POST /api/async/text Analyses text and returns tags for it
ProWritingAidApi.ThesaurusApi post POST /api/thesaurus Returns the thesaurus entries for a specific word
ProWritingAidApi.WordCloudApi get GET /api/async/wordcloud/result/{taskId} Tries to get the result of a request using the task id of the request
ProWritingAidApi.WordCloudApi post POST /api/async/wordcloud Analyses text and returns a word cloud (as an image)

Documentation for Models

Documentation for Authorization

licenseCode

  • Type: API key
  • API key parameter name: licenseCode
  • Location: HTTP header

About

Official Javascript SDK for ProWritingAid. Grammar checking API for Javascript. Also includes: style improvements, terminology checking, and plagiarism checking API.

Topics

Resources

License

Releases

No releases published

Packages

No packages published