denostr / yii2-binotel
Binotel API 的 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: 2024-09-29 05:08:13 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());
}
文档可以通过 此链接 获得