Skip to content

Mackiavelly/yii2-trinitytv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 + Trinity.TV

Yii2 + Trinity.TV

Документация

https://docs.google.com/document/d/1P43gLkBuNB9DnPF9I3aGG7HvLCnUCCYjylVec8vcjjg/edit

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mackiavelly/yii2-trinitytv "*"

or add

"mackiavelly/yii2-trinitytv": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php
$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();
?>