forked from SocialSisterYi/bilibili-API-collect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gRpc] 添加评论区 At 用户列表接口 (SocialSisterYi#681)
* 增加新版动态点赞转发列表接口 * 更新包名 `interface` -> `interfaces` * 添加评论区 At 用户列表 gRPC 接口 * 添加grpc接口使用示例
- Loading branch information
1 parent
05ac3d5
commit 0e17dd4
Showing
2 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,37 @@ | ||
// TODO | ||
syntax = "proto3"; | ||
|
||
package bilibili.relation.interface.v1; | ||
|
||
service RelationInterface { | ||
// 评论区 At 用户列表 (无需登录鉴权) | ||
rpc AtSearch (AtSearchReq) returns (AtSearchReply); | ||
} | ||
|
||
message AtSearchReq { | ||
// 可以为 1 , 但是不能为 0 或空 不知道有啥用 | ||
int64 mid = 1; | ||
// 用户名搜索关键词 | ||
string keyword = 2; | ||
} | ||
|
||
message AtSearchReply { | ||
// 搜索结果分组 | ||
repeated AtGroup items = 1; | ||
} | ||
|
||
message AtGroup { | ||
// 分组类型 2: 我的关注 4:其他 ,其他自测 | ||
int32 group_type = 1; | ||
// 分组名称 | ||
string group_name = 2; | ||
// 用户列表 | ||
repeated AtItem items = 3; | ||
} | ||
|
||
message AtItem { | ||
int64 mid = 1; | ||
string name = 2; | ||
string face = 3; | ||
int32 fans = 4; | ||
int32 official_verify_type = 5; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
# grpc接口定义(protobuf结构体) | ||
# grpc 接口定义(protobuf 结构体) | ||
|
||
注: | ||
|
||
1. proto结构体文件按照包名分类,同级放在同一目录中 | ||
1. proto 结构体文件按照包名分类,同级放在同一目录中 | ||
|
||
2. 暂时无说明文档,稍后添加 | ||
|
||
3. 以下文件全部来自apk的逆向工程,如有疏漏请包涵 | ||
3. 以下文件全部来自 apk 的逆向工程,如有疏漏请包涵 | ||
|
||
## grpc主机 | ||
## grpc 主机 | ||
|
||
B站客户端的grpc接口主机为以下服务器 | ||
B 站客户端的 grpc 接口主机为以下服务器 | ||
|
||
> grpc.biliapi.net | ||
> | ||
> app.bilibili.com | ||
## grpc鉴权 | ||
## grpc 鉴权 | ||
|
||
需要在请求http头部中添加`access_key`,如下 | ||
需要在请求 http 头部中添加`access_key`,如下 | ||
|
||
``` | ||
authorization:identify_v1 {access_key} | ||
``` | ||
|
||
## grpc头部 | ||
## grpc 头部 | ||
|
||
- [bilibili.metadata](bilibili/metadata):客户端环境参数 | ||
- [bilibili.rpc](bilibili/rpc/status.proto):响应错误信息 | ||
- [bilibili.metadata](bilibili/metadata):客户端环境参数 | ||
- [bilibili.rpc](bilibili/rpc/status.proto):响应错误信息 | ||
|
||
## 接口请求定义 | ||
|
||
*稍后补充* | ||
_稍后补充_ | ||
|
||
## 示例 | ||
|
||
B 站 gRPC API Golang 封装:[XiaoMiku01/bilibili-grpc-api-go](https://github.com/XiaoMiku01/bilibili-grpc-api-go) |