PHP code example of trinsic / api
1. Go to this page and download the library: Download trinsic/api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
trinsic / api example snippets
Configure Bearer authorization: Bearer
$config = Trinsic\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Trinsic\Api\Api\AttachmentsApi(
// 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
);
$get_attachment_request = new \Trinsic\Api\Model\GetAttachmentRequest(); // \Trinsic\Api\Model\GetAttachmentRequest
try {
$apiInstance->getAttachment($get_attachment_request);
} catch (Exception $e) {
echo 'Exception when calling AttachmentsApi->getAttachment: ', $e->getMessage(), PHP_EOL;
}