Tinq\Classifiers

Official Tinq.ai PHP SDK.

All URIs are relative to https://tinq.ai/api/v2, except if the operation defines another base path.

MethodHTTP requestDescription
classifiersGET /classifiersClassifiers
classifyPOST /classifyClassify
sentimentAnalysisPOST /sentiment-analysisSentiment Analysis

classifiers()

classifiers()

Classifiers

Example

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


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


$apiInstance = new Tinq\Api\Classifiers(
    // 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
);

try {
    $apiInstance->classifiers();
} catch (Exception $e) {
    echo 'Exception when calling Classifiers->classifiers: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

classify()

classify($accept, $content_type, $body)

Classify

Example

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


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


$apiInstance = new Tinq\Api\Classifiers(
    // 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 = application/json; // string
$content_type = application/json; // string
$body = array('key' => new \stdClass); // object

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

Parameters

NameTypeDescriptionNotes
acceptstring[optional]
content_typestring[optional]
bodyobject[optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

sentimentAnalysis()

sentimentAnalysis($content_type, $accept, $body)

Sentiment Analysis

Sentiment analysis API

Example

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


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


$apiInstance = new Tinq\Api\Classifiers(
    // 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
);
$content_type = application/json; // string
$accept = application/json; // string
$body = array('key' => new \stdClass); // object

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

Parameters

NameTypeDescriptionNotes
content_typestring[optional]
acceptstring[optional]
bodyobject[optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]