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
For Node.js
Install package using command:
npm install pro_writing_aid_api --save
Or install package from the git repo:
npm install prowriting/prowritingaid.javascript --save
You'll need to adjust Webpack's configuration to resolve the dependency issue.
swagger-api/swagger-codegen#3336
https://medium.com/webpack/how-to-cope-with-broken-modules-in-webpack-4c0427fb23a
Add Imports Loader
Configure webpack
module: {
rules: [
{
test: /pro_writing_aid_api\/.*\.js$/,
use: 'imports-loader?define=>false'
}
]
}
Thanks to @devkdouglass! #1 (comment)
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);
});
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) |
- ProWritingAidApi.AnalysisSettings
- ProWritingAidApi.AnalysisSummary
- ProWritingAidApi.AnalysisSummaryGraph
- ProWritingAidApi.AnalysisSummaryGraphItem
- ProWritingAidApi.AnalysisSummaryItem
- ProWritingAidApi.AnalysisSummarySubItem
- ProWritingAidApi.AsyncResponseContextualThesaurusResponse
- ProWritingAidApi.AsyncResponseHtmlAnalysisResponse
- ProWritingAidApi.AsyncResponseSummaryAnalysisResponse
- ProWritingAidApi.AsyncResponseTextAnalysisResponse
- ProWritingAidApi.AsyncResponseWordCloudResponse
- ProWritingAidApi.ContextualThesaurusRequest
- ProWritingAidApi.ContextualThesaurusResponse
- ProWritingAidApi.DocTag
- ProWritingAidApi.EntryMeaning
- ProWritingAidApi.HtmlAnalysisRequest
- ProWritingAidApi.HtmlAnalysisResponse
- ProWritingAidApi.SuggestionCategory
- ProWritingAidApi.SummaryAnalysisRequest
- ProWritingAidApi.SummaryAnalysisResponse
- ProWritingAidApi.TextAnalysisRequest
- ProWritingAidApi.TextAnalysisResponse
- ProWritingAidApi.ThesaurusRequest
- ProWritingAidApi.ThesaurusResponse
- ProWritingAidApi.WordCloudRequest
- ProWritingAidApi.WordCloudResponse
- Type: API key
- API key parameter name: licenseCode
- Location: HTTP header