PHP code example of assemble / php-trint

1. Go to this page and download the library: Download assemble/php-trint 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/ */

    

assemble / php-trint example snippets


use Assemble\PHPTrint\Client as TrintClient;

// create an instance of trint client
$client = new TrintClient(["api-key" => "<your-key>"]);

use Trint;

$res = Trint::put("/path/to/file.mp4"); // upload
$res = Trint::list();                   // list
$res = Trint::get("TrintId");           // content

// push a file to trint 
$client->put("/path/to/file.mp4", [...params]); 

//listing transcriptions
$limit = 10; // number of results returned
$skip = 2 // offset from start of list
$client->list($limit, $skip); 
// OR just
$client->list(); 

// get trint data as string
$data = $client->get("TrintId", "json", [...params]);
sh
php artisan vendor:publish --provider="Assemble\PHPTrint\TrintServiceProvider"