denostr/yii2-binotel

Клиент API Binotel для Yii2

Installs: 1 238

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

0.1.1 2018-06-21 11:42 UTC

This package is not auto-updated.

Last update: 2024-04-28 02:37:52 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Установка

Рекомендуется установка через 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());
}

Документацию можно найти по ссылке