FeishuNetSdk.WebSocket
3.0.3
dotnet add package FeishuNetSdk.WebSocket --version 3.0.3
NuGet\Install-Package FeishuNetSdk.WebSocket -Version 3.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FeishuNetSdk.WebSocket" Version="3.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FeishuNetSdk.WebSocket --version 3.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FeishuNetSdk.WebSocket, 3.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FeishuNetSdk.WebSocket as a Cake Addin #addin nuget:?package=FeishuNetSdk.WebSocket&version=3.0.3 // Install FeishuNetSdk.WebSocket as a Cake Tool #tool nuget:?package=FeishuNetSdk.WebSocket&version=3.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FeishuNetSdk.WebSocket
FeishuNetSdk 开发包的长连接扩展。
飞书开放平台网址:https://open.feishu.cn/
接口清单详见:
注意事项:
在开始配置之前,你需要确保已了解以下注意事项:
- 目前长连接模式仅支持企业自建应用,并且仅支持应用内的事件订阅,不支持回调订阅。
- 与 将事件发送至开发者服务器 方式的要求相同,长连接模式下接收到消息后,也需要在 3 秒内处理完成,否则会触发超时重推机制。
- 每个应用最多建立 50 个连接(在配置长连接时,每初始化一个 client 就是一个连接)。
- 长连接模式的消息推送为 集群模式,不支持广播,即如果同一应用部署了多个客户端(client),那么只有其中随机一个客户端会收到消息。
- 启用长连接并启动项目,进入开发者后台,将事件配置中的订阅方式变更为:使用长连接接收事件,重新发布版本之后才能生效。
用法:
1、安装Nuget包
PM> Install-Package FeishuNetSdk.WebSocket
2、服务注册
(1)输入应用凭证
的方式
builder.Services
.AddFeishuNetSdk(
AppId: "cli_a*********013",
AppSecret: "H2wl******************UBfyVn",
EncryptKey: "75vyV******************wpkjy",
VerificationToken: "WVrlO******************2EsMSJw")
//添加飞书长连接服务
.AddFeishuWebSocket();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- FeishuNetSdk (>= 3.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
- protobuf-net (>= 3.2.30)
- WatsonWebsocket (>= 4.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.