xutl/yii2-tim

The tim extension for the Yii framework

Maintainers

Details

github.com/xutl/yii2-tim

Source

Issues

Installs: 4 256

Dependents: 2

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

3.0.0.2 2018-08-13 09:18 UTC

This package is auto-updated.

Last update: 2022-05-10 21:26:24 UTC


README

适用于Yii2的腾讯云通信

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require xutl/yii2-tim:~3.0

or add

"xutl/yii2-tim": "~3.0"

to the require section of your composer.json file.

配置

To use this extension, you have to configure the Connection class in your application configuration:

return [
    //....
    'components' => [
        'im' => [
            'class' => 'xutl\tim\Tim',
            'appId' => '123456',
            'accountType' => '123456',
            'administrator' => 'webmaster',
            'privateKey' => '私钥字符串一行',
            'publicKey' => '公钥字符串一行',
        ],
    ]
];

使用

/** var Tim $im */
$im = Yii::$app->im->getAccount('test');
$res = $im->kick();
print_r($res);