跳转到主要内容

Wechaty Puppet Service gRPC API

项目描述

Wechaty GRPC

Node.js NPM PyPI Maven PHP Go

Wechaty gRPC

NPM Version PyPI Version Java Version PHP Version

node Python 3.7 Go Version

为Wechaty Puppet Service提供的gRPC

用法

Node.js

wechaty-grpc@NPM

维护者

  • @huan - Huan LI (李卓桓)

Python

chatie-grpc@PyPI

维护者

Go

github.com/wechaty/go-grpc

维护者

Java

https://mvnrepository.com/artifact/io.github.wechaty/grpc

Maven

<dependency>
    <groupId>io.github.wechaty</groupId>
    <version>0.11.25</version>
    <artifactId>grpc</artifactId>
</dependency>

Gradle

compile 'io.github.wechaty:grpc:0.11.25'

维护者

PHP

github.com/wechaty/php-grpc

维护者

Csharp

Wechaty.Grpc @ Nuget

维护者

开发

调试

构建

./scripts/install-protoc.sh
npm install

https://github.com/google/protobuf/releases/latest

生成存根

npm run generate

1. JS用于协议缓冲区

protoc \
  --js_out="import_style=commonjs,binary:${OUT_DIR}"

https://github.com/google/protobuf/releases/latest

2. JS用于gRPC存根

protoc \
  --plugin="protoc-gen-grpc=`which grpc_tools_node_protoc_plugin`" \
  --grpc_out="${OUT_DIR}"

https://npmjs.net.cn/package/grpc-tools

3. TypeScript Typing Definations for Protocol Buffer & gRPC Stubs

protoc \
  --plugin="protoc-gen-grpc=node_modules/grpc_tools_node_protoc_ts/bin/protoc-gen-ts" \
  --grpc_out="${OUT_DIR}"

https://github.com/agreatfool/grpc_tools_node_protoc_ts

4. JS & TS用于gRPC Web

protoc \
  --plugin="protoc-gen-ts=node_modules/ts-protoc-gen/bin/protoc-gen-ts" \
  --ts_out="service=true:${OUT_DIR}"

https://github.com/improbable-eng/ts-protoc-gen

OpenAPI

感谢gRPC生态系统,我们可以从我们的gRPC proto定义自动生成OpenAPI规范。

我们使用遵循 gRPC HTTP 规范的 gRPC to JSON 代理生成器 作为 OpenAPI 规范生成器(protoc-gen-openapiv2),并且使用 类似于 grpc-gateway,但用 node 编写且动态的 项目来为 gRPC 代理提供 HTTP RESTful API。

gRPC Gateway

图片来源: grpc-gateway

更多关于 Wechaty 的 RESTful API 服务信息,请访问 Wechaty OpenAPI

gRPC Web

资源

文档

链接

Protocol Buffer

gRPC Web

TypeScript 生成器

ZooKeeper

STUN

TCP 洞穿

逆向工程

Python Stub

CSharp grpc

历史

master

v0.20(2021 年 2 月 21 日)

  1. 将 NPM 模块名称从 @chatie/grpc 更改为 wechaty-grpc
  2. 添加对 https://github.com/wechaty/openapi 的 OpenAPI 注释和生成器支持
  3. 代码清理。

v0.18(2020 年 10 月 15 日)

  • 添加新的 MessageFileStreamMessageImageStream 以替换 MessageFileMessageImage 方法,以避免在发送大文件时阻塞 nodejs 事件循环(#88)由 @windmemory 实现
  • 添加新的 MessageSendFileStream 以替换 MessageSendFile 方法,以避免在发送大文件时阻塞 nodejs 事件循环(#89)由 @windmemory 实现

v0.17(2020 年 8 月 5 日)

版本 0.13 (2020年4月19日)

版本 0.11 (2020年4月10日)

  • 添加 Go 支持 (#50@dchaofei 提交)
  • 在 <github.com/wechaty/go-grpc> 发布 Go 模块

版本 0.6 (2020年2月)

  • 使 gRPC 服务与 Wechaty Puppet 抽象对齐
  • 添加单元测试

版本 0.2 (2018年7月)

  • 自动生成 gRPC 模型
  • 发布到 NPM

版本 0.0.1 (2018年5月)

初次提交

维护者

Huan LI (李卓桓), Google 机器学习 (ML GDE) 高级开发者, zixia@zixia.net

Profile of Huan LI (李卓桓) on StackOverflow

版权 & 许可证

  • 代码 & 文档 © 2018-至今 Huan LI <zixia@zixia.net>
  • 代码在 Apache-2.0 许可证下发布
  • 文档在 Creative Commons 许可证下发布

项目详情


发布历史 发布通知 | RSS 源

下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

wechaty-grpc-0.20.19.tar.gz (26.0 kB 查看散列值)

上传时间

构建分发

wechaty_grpc-0.20.19-py3-none-any.whl (23.1 kB 查看散列值)

上传时间 Python 3

由以下组织支持

AWSAWS 云计算和安全赞助商 DatadogDatadog 监控 FastlyFastly CDN GoogleGoogle 下载分析 MicrosoftMicrosoft PSF 赞助商 PingdomPingdom 监控 SentrySentry 错误记录 StatusPageStatusPage 状态页面