denostr / yii2-binotel
Клиент API Binotel для Yii2
0.1.1
2018-06-21 11:42 UTC
Requires
- php: >=5.4.0
- denostr/binotel-api: *
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2026-03-15 12:39:30 UTC
README
Установка
Рекомендуется установка через composer:
$ composer require denostr/yii2-binotel:"~0.1.0"
или добавить
"denostr/yii2-binotel": "~0.1.0"
в файл composer.json
Подключение
Подключение компонента в конфиг проекта:
'components' => [
...
'binotel' => [
'class' => 'denostr\Binotel\yii\Client',
'key' => 'MY_KEY',
'secret' => 'MY_SECRET',
],
],
Использование
try {
$binotel = Yii::$app->binotel;
$voiceFiles = $binotel->settings->listOfVoiceFiles();
print_r($voiceFiles);
} catch (\denostr\Binotel\Exception $e) {
printf('Error (%d): %s' . PHP_EOL, $e->getCode(), $e->getMessage());
}
Документацию можно найти по ссылке