Code Monkey home page Code Monkey logo

prowritingaid.php's Introduction

ProWritingAid.API

Official PHP prowritingaid.com API.

  • API version: v2

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

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "minimum-stability": "dev",
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/prowriting/prowritingaid.php.git"
    }
  ],
  "require": {
    "prowriting/prowritingaid.php": "*"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php

require_once(__DIR__ . '/vendor/autoload.php');
use ProWritingAidSDK\Configuration;
use ProWritingAidSDK\Api\TextApi;
use ProWritingAidSDK\Model\TextAnalysisRequest;

$config = new Configuration();
$config->setHost('https://api.prowritingaid.com');
$config->setApiKey('licenseCode', 'YOUR API KEY');
$api_instance = new TextApi(null, $config);

$request = new TextAnalysisRequest();
$request->setText('I place my cane firmly on the ground and, slowly, with its aid, \'
                    \'I lower myself from the hammock. Now the rains have gone my joints \'
                    \'don\'t hurt so badly. Today won\'t be too bad, I think. I\'m prone to \'
                    \'be over optimistic. Could this be my last day. At this time the jungle \'
                    \'is strangely subdued. She poke around in the ashes. Every day the \'
                    \'weariness is even worst than beofre. I don\'t know yett. \n\'
                    \'Whne? What a weka statement. Jaroslav Drabny is a Czech football goalkeeper. \'
                    \'Bhuvnehwar Kumar is a Czech football goalkeeper. I just saw Siyabonga Siyo. \'
                    \'I just saw Siyabonga Seyo. I read this article on RaelSport.');
$request->setStyle('General');
$request->setLanguage('en');
$request->setReports(['grammar']);

try {
    $result = $api_instance->post($request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling the API: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

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

Class Method HTTP request Description
ContextualThesaurusApi get GET /api/async/contextualthesaurus/result/{taskId} Tries to get the result of a request using the task id of the request
ContextualThesaurusApi post POST /api/async/contextualthesaurus Analyses text and returns contextual thesaurus entries
HtmlApi get GET /api/async/html/result/{taskId} Tries to get the result of a request using the task id of the request
HtmlApi post POST /api/async/html Analyses HTML and adds suggestion tags to it
SummaryApi get GET /api/async/summary/result/{taskId} Tries to get the result of a request using the task id of the request
SummaryApi post POST /api/async/summary Gets the summary analysis of a document
TextApi get GET /api/async/text/result/{taskId} Tries to get the result of a request using the task id of the request
TextApi post POST /api/async/text Analyses text and returns tags for it
ThesaurusApi post POST /api/thesaurus Returns the thesaurus entries for a specific word
WordCloudApi get GET /api/async/wordcloud/result/{taskId} Tries to get the result of a request using the task id of the request
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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.