PHP code example of mackiavelly / yii2-trinitytv

1. Go to this page and download the library: Download mackiavelly/yii2-trinitytv 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/ */

    

mackiavelly / yii2-trinitytv example snippets



$trinityApi = new mackiavelly\trinitytv\TrinityApi(['partnerId' => 'partnerId', 'salt' => 'salt']);
$trinityApi->create('localId', 'tariffId');
$trinityApi->subscriptionInfo('localId');
$trinityApi->subscription('localId', $trinityApi::SUSPEND);
$trinityApi->autorizeDevice('localId', 'mac', 'uuid');
$trinityApi->autorizeByCode('localId', 'code');
$trinityApi->deleteDevice('localId', 'mac', 'uuid');
$trinityApi->updateUser('localId', 'Имя', 'Фамилия', 'Отчество', 'Город');
$trinityApi->deviceList('localId');
$trinityApi->subscriberList();

php composer.phar