更新大量【proto定义】并勘误
This commit is contained in:
374
grpc_api/bilibili/app/interfaces/v1/history.proto
Normal file
374
grpc_api/bilibili/app/interfaces/v1/history.proto
Normal file
@@ -0,0 +1,374 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package bilibili.app.interfaces.v1;
|
||||
|
||||
import "bilibili/app/archive/middleware/v1/preload.proto";
|
||||
|
||||
// 历史记录
|
||||
service History {
|
||||
// 获取历史记录tab
|
||||
rpc HistoryTab (HistoryTabReq) returns (HistoryTabReply);
|
||||
// 获取历史记录列表(旧版)
|
||||
rpc Cursor (CursorReq) returns (CursorReply);
|
||||
// 获取历史记录列表
|
||||
rpc CursorV2 (CursorV2Req) returns (CursorV2Reply);
|
||||
// 删除历史记录
|
||||
rpc Delete (DeleteReq) returns (NoReply);
|
||||
// 搜索历史记录
|
||||
rpc Search (SearchReq) returns (SearchReply);
|
||||
// 清空历史记录
|
||||
rpc Clear (ClearReq) returns (NoReply);
|
||||
// 获取最新的历史记录
|
||||
rpc LatestHistory (LatestHistoryReq) returns (LatestHistoryReply);
|
||||
}
|
||||
|
||||
// 获取历史记录tab-请求
|
||||
message HistoryTabReq {
|
||||
// 业务类型
|
||||
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
|
||||
string business = 1;
|
||||
// 查询请求来源
|
||||
HistorySource source = 2;
|
||||
// 搜索关键词
|
||||
string keyword = 3;
|
||||
}
|
||||
|
||||
// 获取历史记录tab-响应
|
||||
message HistoryTabReply {
|
||||
// tab列表
|
||||
repeated CursorTab tab = 1;
|
||||
}
|
||||
|
||||
// 搜索历史记录来源
|
||||
enum HistorySource {
|
||||
// 主站历史记录页
|
||||
history_VALUE = 0;
|
||||
// 会员购浏览记录
|
||||
shopping_VALUE = 1;
|
||||
}
|
||||
|
||||
// 获取历史记录列表(旧版)-请求
|
||||
message CursorReq {
|
||||
// 游标信息
|
||||
Cursor cursor = 1;
|
||||
// 业务类型
|
||||
// all:全部 archive:视频 live:直播 article:专栏
|
||||
string business = 2;
|
||||
// 秒开参数(旧版)
|
||||
PlayerPreloadParams playerPreload = 3;
|
||||
// 秒开参数
|
||||
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4;
|
||||
}
|
||||
|
||||
// 获取历史记录列表(旧版)-响应
|
||||
message CursorReply {
|
||||
// 卡片内容
|
||||
repeated CursorItem items = 1;
|
||||
// 顶部tab
|
||||
repeated CursorTab tab = 2;
|
||||
// 游标信息
|
||||
Cursor cursor = 3;
|
||||
// 是否未拉取完
|
||||
bool hasMore = 4;
|
||||
}
|
||||
|
||||
// 获取历史记录列表-请求
|
||||
message CursorV2Req {
|
||||
// 游标信息
|
||||
Cursor cursor = 1;
|
||||
// 业务类型
|
||||
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
|
||||
string business = 2;
|
||||
// 秒开参数(旧版)
|
||||
PlayerPreloadParams playerPreload = 3;
|
||||
// 秒开参数
|
||||
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4;
|
||||
// 是否选择本机的播放历史
|
||||
bool is_local = 5;
|
||||
}
|
||||
|
||||
// 获取历史记录列表-响应
|
||||
message CursorV2Reply {
|
||||
// 卡片内容
|
||||
repeated CursorItem items = 1;
|
||||
// 游标信息
|
||||
Cursor cursor = 2;
|
||||
// 是否未拉取完
|
||||
bool hasMore = 3;
|
||||
}
|
||||
|
||||
// 历史记录卡片信息
|
||||
message CursorItem {
|
||||
// 主体数据
|
||||
oneof card_item {
|
||||
// ugc稿件
|
||||
CardUGC cardUGC = 1;
|
||||
// pgc稿件
|
||||
CardOGV cardOGV = 2;
|
||||
// 专栏
|
||||
CardArticle cardArticle = 3;
|
||||
// 直播
|
||||
CardLive cardLive = 4;
|
||||
// 课程
|
||||
CardCheese cardCheese = 5;
|
||||
}
|
||||
// 标题
|
||||
string title = 6;
|
||||
// 目标uri/url
|
||||
string uri = 7;
|
||||
// 观看时间
|
||||
int64 viewAt = 8;
|
||||
// 历史记录id
|
||||
int64 kid = 9;
|
||||
// 业务id
|
||||
int64 oid = 10;
|
||||
// 业务类型
|
||||
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
|
||||
string business = 11;
|
||||
// 业务类型代码
|
||||
int32 tp = 12;
|
||||
// 设备标识
|
||||
DeviceType dt = 13;
|
||||
// 是否有分享按钮
|
||||
bool hasShare = 14;
|
||||
}
|
||||
|
||||
// ugc稿件卡片
|
||||
message CardUGC {
|
||||
// 封面url
|
||||
string cover = 1;
|
||||
// 观看进度
|
||||
int64 progress = 2;
|
||||
// 视频长度
|
||||
int64 duration = 3;
|
||||
// UP主昵称
|
||||
string name = 4;
|
||||
// UP主mid
|
||||
int64 mid = 5;
|
||||
// 是否展示关注按钮
|
||||
bool displayAttention = 6;
|
||||
// 历史观看视频cid
|
||||
int64 cid = 7;
|
||||
// 历史观看视频分P
|
||||
int32 page = 8;
|
||||
// 历史观看视频分P的标题
|
||||
string subtitle = 9;
|
||||
// 关系信息
|
||||
Relation relation = 10;
|
||||
// 稿件bvid
|
||||
string bvid = 11;
|
||||
// 总分P数
|
||||
int64 videos = 12;
|
||||
// 短链接
|
||||
string shortLink = 13;
|
||||
// 分享副标题
|
||||
string shareSubtitle = 14;
|
||||
// 播放数
|
||||
int64 view = 15;
|
||||
}
|
||||
|
||||
// pgc稿件卡片
|
||||
message CardOGV {
|
||||
// 封面url
|
||||
string cover = 1;
|
||||
// 观看进度
|
||||
int64 progress = 2;
|
||||
// 总计时长
|
||||
int64 duration = 3;
|
||||
// 单集标题
|
||||
string subtitle = 4;
|
||||
}
|
||||
|
||||
// 专栏卡片
|
||||
message CardArticle {
|
||||
// 封面url
|
||||
repeated string covers = 1;
|
||||
// UP主昵称
|
||||
string name = 2;
|
||||
// UP主mid
|
||||
int64 mid = 3;
|
||||
// 是否展示关注按钮
|
||||
bool displayAttention = 4;
|
||||
// 角标
|
||||
string badge = 5;
|
||||
// 关系信息
|
||||
Relation relation = 6;
|
||||
}
|
||||
|
||||
// 直播卡片
|
||||
message CardLive {
|
||||
// 封面url
|
||||
string cover = 1;
|
||||
// 主播昵称
|
||||
string name = 2;
|
||||
// 主播mid
|
||||
int64 mid = 3;
|
||||
// 直播分区名
|
||||
string tag = 4;
|
||||
// 直播状态
|
||||
int32 ststus = 5;
|
||||
// 是否展示关注按钮
|
||||
bool displayAttention = 6;
|
||||
// 关系信息
|
||||
Relation relation = 7;
|
||||
}
|
||||
|
||||
// 课程卡片
|
||||
message CardCheese {
|
||||
// 封面url
|
||||
string cover = 1;
|
||||
// 观看进度
|
||||
int64 progress = 2;
|
||||
// 总计时长
|
||||
int64 duration = 3;
|
||||
// 单集标题
|
||||
string subtitle = 4;
|
||||
}
|
||||
|
||||
// 业务分类表
|
||||
message CursorTab {
|
||||
// 业务类型
|
||||
string business = 1;
|
||||
// 名称
|
||||
string name = 2;
|
||||
// 路由uri
|
||||
string router = 3;
|
||||
// tab定位
|
||||
bool focus = 4;
|
||||
}
|
||||
|
||||
// 游标信息
|
||||
message Cursor {
|
||||
// 本页最大值游标值
|
||||
int64 max = 1;
|
||||
// 本页最大值游标类型
|
||||
int32 maxTp = 2;
|
||||
}
|
||||
|
||||
// 删除历史记录-请求
|
||||
message DeleteReq {
|
||||
// 历史记录信息
|
||||
HisInfo hisInfo = 1;
|
||||
}
|
||||
|
||||
// 历史记录信息
|
||||
message HisInfo {
|
||||
// 业务类型
|
||||
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
|
||||
string business = 1;
|
||||
// 历史记录id
|
||||
int64 kid = 2;
|
||||
}
|
||||
|
||||
// 空响应
|
||||
message NoReply {}
|
||||
|
||||
// 设备类型
|
||||
message DeviceType {
|
||||
// 设备标识代码
|
||||
DT type = 1;
|
||||
// 图标url
|
||||
string icon = 2;
|
||||
}
|
||||
|
||||
//设备标识代码
|
||||
enum DT {
|
||||
// 未知
|
||||
Un known = 0;
|
||||
//手机端
|
||||
Phone = 1;
|
||||
// ipad端
|
||||
Pad = 2;
|
||||
// web端
|
||||
PC = 3;
|
||||
// TV端
|
||||
TV = 4;
|
||||
//
|
||||
Car = 5;
|
||||
//
|
||||
Iot = 6;
|
||||
// apad端
|
||||
AndPad = 7;
|
||||
}
|
||||
|
||||
// 关系信息
|
||||
message Relation {
|
||||
// 关系状态
|
||||
// 1:未关注 2:已关注 3:被关注 4:互关
|
||||
int32 status = 1;
|
||||
// 用户关注UP主
|
||||
int32 isFollow = 2;
|
||||
// UP主关注用户
|
||||
int32 isFollowed = 3;
|
||||
}
|
||||
|
||||
// 搜索历史记录-请求
|
||||
message SearchReq {
|
||||
// 关键词
|
||||
string keyword = 1;
|
||||
// 页码
|
||||
int64 pn = 2;
|
||||
// 业务类型
|
||||
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
|
||||
string business = 3;
|
||||
}
|
||||
|
||||
// 搜索历史记录-响应
|
||||
message SearchReply {
|
||||
// 卡片内容
|
||||
repeated CursorItem items = 1;
|
||||
// 是否未拉取完
|
||||
bool hasMore = 2;
|
||||
// 页面信息
|
||||
Page page = 3;
|
||||
}
|
||||
|
||||
// 页面信息
|
||||
message Page {
|
||||
// 当前页码
|
||||
int64 pn = 1;
|
||||
// 总计条目数
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
// 秒开参数
|
||||
message PlayerPreloadParams {
|
||||
//清晰度
|
||||
int64 qn = 1;
|
||||
// 流版本
|
||||
int64 fnver = 2;
|
||||
// 流类型
|
||||
int64 fnval = 3;
|
||||
// 是否强制域名
|
||||
int64 forceHost = 4;
|
||||
// 是否4K
|
||||
int64 fourk = 5;
|
||||
}
|
||||
|
||||
// 清空历史记录-请求
|
||||
message ClearReq {
|
||||
// 业务类型
|
||||
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
|
||||
string business = 1;
|
||||
}
|
||||
|
||||
// 获取最新的历史记录-请求
|
||||
message LatestHistoryReq {
|
||||
// 业务类型
|
||||
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
|
||||
string business = 1;
|
||||
// 秒开参数
|
||||
PlayerPreloadParams playerPreload = 2;
|
||||
}
|
||||
|
||||
// 获取最新的历史记录-响应
|
||||
message LatestHistoryReply {
|
||||
// 卡片内容
|
||||
CursorItem items = 1;
|
||||
// 场景
|
||||
string scene = 2;
|
||||
// 弹窗停留时间
|
||||
int64 rtime = 3;
|
||||
// 分组的标志(客户端埋点上报)
|
||||
string flag = 4;
|
||||
}
|
||||
119
grpc_api/bilibili/app/interfaces/v1/search.proto
Normal file
119
grpc_api/bilibili/app/interfaces/v1/search.proto
Normal file
@@ -0,0 +1,119 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package bilibili.app.interfaces.v1;
|
||||
|
||||
// 搜索
|
||||
service Search {
|
||||
// 获取搜索建议
|
||||
rpc Suggest3 (SuggestionResult3Req) returns (SuggestionResult3Reply);
|
||||
}
|
||||
|
||||
// 获取搜索建议-请求
|
||||
message SuggestionResult3Req {
|
||||
// 关键字
|
||||
string keyword = 1;
|
||||
// 是否语法高亮
|
||||
// 0:不显示 1:显示
|
||||
int32 highlight = 2;
|
||||
// 是否青少年模式
|
||||
// 1:开启青少年模式
|
||||
int32 teenagersMode = 3;
|
||||
}
|
||||
|
||||
// 获取搜索建议-响应
|
||||
message SuggestionResult3Reply {
|
||||
// 搜索追踪id
|
||||
string trackid = 1;
|
||||
// 搜索建议条目列表
|
||||
repeated ResultItem list = 2;
|
||||
// 搜索的abtest 实验信息
|
||||
string expStr = 3;
|
||||
}
|
||||
|
||||
// 搜索建议条目
|
||||
message ResultItem {
|
||||
// 来源
|
||||
string from = 1;
|
||||
// 显示结果(语法高亮)
|
||||
string title = 2;
|
||||
// 搜索关键字
|
||||
string keyword = 3;
|
||||
// 序号
|
||||
int32 position = 4;
|
||||
// 图片
|
||||
string cover = 5;
|
||||
// 图片尺寸
|
||||
double coverSize = 6;
|
||||
// sug词类型
|
||||
string sugType = 7;
|
||||
// 词条大类型
|
||||
int32 termType = 8;
|
||||
// 跳转类型
|
||||
string goto = 9;
|
||||
// 跳转uri
|
||||
string uri = 10;
|
||||
// 认证信息
|
||||
OfficialVerify officialVerify = 11;
|
||||
// 跳转参数
|
||||
string param = 12;
|
||||
// up主mid
|
||||
int64 mid = 13;
|
||||
// 粉丝数
|
||||
int32 fans = 14;
|
||||
// up主等级
|
||||
int32 level = 15;
|
||||
// up主稿件数
|
||||
int32 archives = 16;
|
||||
// 投稿时间
|
||||
int64 ptime = 17;
|
||||
// season类型名称
|
||||
string seasonTypeName = 18;
|
||||
// 地区
|
||||
string area = 19;
|
||||
// 作品风格
|
||||
string style = 20;
|
||||
// 描述信息
|
||||
string label = 21;
|
||||
// 评分
|
||||
double rating = 22;
|
||||
// 投票数
|
||||
int32 vote = 23;
|
||||
// 角标
|
||||
repeated ReasonStyle badges = 24;
|
||||
//
|
||||
string styles = 25;
|
||||
//
|
||||
int64 moduleId = 26;
|
||||
//
|
||||
string liveLink = 27;
|
||||
}
|
||||
|
||||
// 认证信息
|
||||
message OfficialVerify {
|
||||
// 认证类型
|
||||
// 127:未认证 0:个人 1:机构
|
||||
int32 type = 1;
|
||||
// 认证描述
|
||||
string desc = 2;
|
||||
}
|
||||
|
||||
// 角标
|
||||
message ReasonStyle {
|
||||
// 角标文案
|
||||
string text = 1;
|
||||
// 文案日间色值
|
||||
string textColor = 2;
|
||||
// 文案夜间色值
|
||||
string textColorNight = 3;
|
||||
// 背景日间色值
|
||||
string bgColor = 4;
|
||||
// 背景夜间色值
|
||||
string bgColorNight = 5;
|
||||
// 边框日间色值
|
||||
string borderColor = 6;
|
||||
// 边框夜间色值
|
||||
string borderColorNight = 7;
|
||||
// 角标样式
|
||||
// 1:填充模式 2:镂空模式
|
||||
int32 bgStyle = 8;
|
||||
}
|
||||
Reference in New Issue
Block a user