wechaty/php-grpc

PHP Wechaty 是一个用 PHP 编写的用于编写聊天机器人的对话式人工智能 RPA SDK。

v0.16.2 2020-07-10 07:46 UTC

This package is auto-updated.

Last update: 2024-09-04 08:40:05 UTC


README

Chatie GRPC 的 PHP Stubs

不要编辑

由 grpc_php_plugin 生成的代码。

此存储库通过 DevOps 从 @chatie/grpc 生成

用法

github.com/wechaty/php-grpc

pecl 安装

pecl install grpc
pecl install protobuf

CentOS yum 安装

sudo yum install php72-php-pecl-grpc
sudo yum install php72-php-pecl-protobuf

composer

composer config repo.packagist composer https://mirrors.aliyun.com/composer/
composer require wechaty/php-grpc

php

require dirname(__FILE__) . '/vendor/autoload.php';

$client = new \Wechaty\PuppetClient("localhost:8788", [
    'credentials' => Grpc\ChannelCredentials::createInsecure()
]);
$request = new \Wechaty\Puppet\DingRequest();
list($response, $status) = $client->Ding($request)->wait();
echo sprintf("code: %s, msg: %s \n", $status->code, $status->details);

作者

版权 & 许可证

  • 代码 & 文档 © 2020-now Chunsheng Zhang <zhangchunsheng423@gmail.com>
  • 代码在 Apache-2.0 许可证下发布
  • 文档在创意共享许可下发布