Installation & Usage

Requirements

PHP ^8.0.2

Composer

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

composer install tinq-php

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/tinq-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Tinq\Api\Assistant(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$accept_charset = UTF-8; // string
$content_type = application/json; // string
$accept = application/json; // string
$body = array('key' => new \stdClass); // object

try {
    $apiInstance->generate($accept_charset, $content_type, $accept, $body);
} catch (Exception $e) {
    echo 'Exception when calling Assistant->generate: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://tinq.ai/api/v2

ClassMethodHTTP requestDescription
AssistantgeneratePOST /assistantGenerate
ClassifiersclassifiersGET /classifiersClassifiers
ClassifiersclassifyPOST /classifyClassify
ClassifierssentimentAnalysisPOST /sentiment-analysisSentiment Analysis
PlagiarismCheckercheckPlagiarismPOST /check-plagiarismCheck Plagiarism
ProjectscreateProjectPOST /projectsCreate Project
ProjectsgetAllProjectsGET /projects/Get All Projects
ProjectsgetProjectGET /projects/Get Project
ProjectsupdateProjectPUT /projects/Update Project
ScraperextractArticlePOST /scraper/extract-articleExtract article
ScrapergoogleSearchPOST /scraper/googleGoogle Search
ScraperscrapePOST /scraper/scrapeScrape
ToolsextractTextFromFilePOST /extract-textExtract text from file
ToolsextractUrlPOST /extract-articleExtract URL
WorkflowscreateWorkflowPOST /workflowsCreate workflow
WorkflowsexecuteWorkflowPOST /workflows//executeExecute workflow
WorkflowsgetOneWorkflowGET /workflows/Get one workflow
WorkflowsgetWorkflowsGET /workflowsGet workflows

Models

Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

boulama@tinq.ai

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v2
    • Package version: 0.0.59
    • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen