Official typescript prowritingaid.com API.
- API version: v2
- Package version: v2.0.0
For more information, please visit https://prowritingaid.com/en/App/API#ts
For Node.js
Install package using command:
npm install pro_writing_aid_ts --save
Or install package from the git repo:
npm install prowriting/prowritingaid.typescript --save
Please follow the installation instruction and execute the following TS code:
import PWA = require('pro_writing_aid_ts');
let api = new PWA.HtmlApi();
api.setApiKey(PWA.ApiKeys.licenseCode, '$Your license code$');
let request = new PWA.HtmlAnalysisRequest();
request.Html = 'I\'d like to by that toy. wood you help me? I have twp more brothers.';
request.Reports = ['grammar'];
request.Language = PWA.LanguageEnum.En;
request.Style = PWA.StyleEnum.General;
api.post(request)
.then(function (data) {
console.log('API called successfully. Returned data: ');
console.log(data.Body);
}, function (error) {
console.error(error);
})
/* Example of what you will get
API called successfully. Returned data:
{ Html: 'I\'d like to <span class=\'pwa pwa1 pwa-color pwa-blue\' title=\'Possible confused word\' data-report=\'grammar\' data-suggestions=\'buy\' data-index=\'0\' data-category=\'grammargrammar\' data-sub-category=\'by\' data-urls=\'\' data-help=\'CTF_BY_13_.9990\' data-original-text=\'by\' data-tag-id=\'cad77c6f-9553-4b4c-87a6-44cd7bd2c740\'>by</span> that toy. wood you help me? I have <span class=\'pwa pwa1 pwa-color pwa-blue\' title=\'Possible confused word\' data-report=\'grammar\' data-suggestions=\'two\' data-index=\'1\' data-category=\'grammargrammar\' data-sub-category=\'twp\' data-urls=\'\' data-help=\'CTF_TWP_11_.9998\' data-original-text=\'twp\' data-tag-id=\'1de06ac4-bd40-4429-accd-e82406eb525e\'>twp</span> more brothers.',
WordCount: 16,
Summaries:
[ { ReportDisplayName: 'Grammar Check',
ReportName: 'grammar',
SummaryItems: [Object],
NumberOfIssues: 2,
ReportDescription: 'Checks your text for grammar errors and potential word mis-use.' } ] }
*/
All URIs are relative to https://api.prowritingaid.com
Class | Method | Description |
---|---|---|
ContextualThesaurusApi | Post | |
HtmlApi | Post | |
SummaryApi | Post | |
TextApi | Post | |
WordCloudApi | Post |
- AnalysisSettings
- AnalysisSummary
- AnalysisSummaryGraph
- AnalysisSummaryGraphItem
- AnalysisSummaryItem
- AnalysisSummarySubItem
- ContextualThesaurusRequest
- ContextualThesaurusResponse
- DocTag
- HtmlAnalysisRequest
- HtmlAnalysisResponse
- HttpResponse
- SuggestionCategory
- SummaryAnalysisRequest
- SummaryAnalysisResponse
- TextAnalysisRequest
- TextAnalysisResponse
- WordCloudRequest
- WordCloudResponse
- Type: API key
- API key parameter name: licenseCode
- Location: HTTP header