<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Tinq\Api\Tools(
// 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
$input_file = "/path/to/file.txt"; // \SplFileObject
try {
$apiInstance->extractTextFromFile($content_type, $accept, $input_file);
} catch (Exception $e) {
echo 'Exception when calling Tools->extractTextFromFile: ', $e->getMessage(), PHP_EOL;
}