denostr/yii2-binotel

Binotel API 的 Yii2 客户端

安装量: 1,239

依赖者: 0

建议者: 0

安全: 0

星标: 2

关注者: 2

分支: 0

开放问题: 0

类型:yii2-extension

0.1.1 2018-06-21 11:42 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:08:13 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());
}

文档可以通过 此链接 获得