From 3c8dfc6d617da3923435160f1f68633a71b37053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E6=98=93=E5=A7=90QwQ?= <45892418+SocialSisterYi@users.noreply.github.com> Date: Wed, 22 Jun 2022 00:34:19 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E3=80=90gRPC=20API=E3=80=91=20proto?= =?UTF-8?q?=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grpc_api/bilibili/app/card/v1/card.proto | 2 + grpc_api/bilibili/app/card/v1/common.proto | 290 +-- grpc_api/bilibili/app/card/v1/single.proto | 42 +- .../bilibili/app/dynamic/v1/dynamic.proto | 2015 +++++++++-------- .../bilibili/app/listener/v1/listener.proto | 417 +++- 5 files changed, 1630 insertions(+), 1136 deletions(-) diff --git a/grpc_api/bilibili/app/card/v1/card.proto b/grpc_api/bilibili/app/card/v1/card.proto index 949ab10..cb90f0e 100644 --- a/grpc_api/bilibili/app/card/v1/card.proto +++ b/grpc_api/bilibili/app/card/v1/card.proto @@ -27,5 +27,7 @@ message Card { PopularTopEntrance popular_top_entrance = 9; // RcmdOneItem rcmd_one_item = 10; + // + SmallCoverV5Ad small_cover_v5_ad = 11; } } diff --git a/grpc_api/bilibili/app/card/v1/common.proto b/grpc_api/bilibili/app/card/v1/common.proto index eaa5c35..a804c13 100644 --- a/grpc_api/bilibili/app/card/v1/common.proto +++ b/grpc_api/bilibili/app/card/v1/common.proto @@ -4,6 +4,50 @@ package bilibili.app.card.v1; import "bilibili/app/card/v1/ad.proto"; +// +message Args { + // + int32 type = 1; + // + int64 up_id = 2; + // + string up_name = 3; + // + int32 rid = 4; + // + string rname = 5; + // + int64 tid = 6; + // + string tname = 7; + // + string track_id = 8; + // + string state = 9; + // + int32 converge_type = 10; + // + int64 aid = 11; +} + +// +message Avatar { + // + string cover = 1; + // + string text = 2; + // + string uri = 3; + // + int32 type = 4; + // + string event = 5; + // + string event_v2 = 6; + // + int32 defalut_cover = 7; +} + // 条目基本信息 message Base { // 卡片类型 @@ -44,6 +88,8 @@ message Base { Button desc_button = 17; // 三点v4 ThreePointV4 three_point_v4 = 18; + // + UpArgs up_args = 19; } // 按钮信息 @@ -66,16 +112,6 @@ message Button { Relation relation = 8; } -// -message ThreePoint { - // - repeated DislikeReason dislike_reasons = 1; - // - repeated DislikeReason feedbacks = 2; - //稍后再看 - int32 watch_later = 3; -} - // message DislikeReason { // @@ -85,29 +121,27 @@ message DislikeReason { } // -message Args { +message LikeButton { // - int32 type = 1; + int64 Aid = 1; // - int64 up_id = 2; + int32 count = 2; // - string up_name = 3; + bool show_count = 3; // - int32 rid = 4; + string event = 4; // - string rname = 5; + int32 selected = 5; // - int64 tid = 6; + string event_v2 = 6; +} + +// +message Mask { // - string tname = 7; + Avatar avatar = 1; // - string track_id = 8; - // - string state = 9; - // - int32 converge_type = 10; - // - int64 aid = 11; + Button button = 2; } // @@ -134,30 +168,89 @@ message PlayerArgs { int64 season_id = 11; } -// -message Mask { +// 标签框信息 +message ReasonStyle { + // 文案 + string text = 1; + // 文字颜色 + string text_color = 2; + // 背景色 + string bg_color = 3; + // 边框色 + string border_color = 4; + // 图标url + string icon_url = 5; + // 文字颜色-夜间 + string text_color_night = 6; + // 背景色-夜间 + string bg_color_night = 7; + // 边框色-夜间 + string border_color_night = 8; + // 图标url-夜间 + string icon_night_url = 9; + // 背景风格id + // 1:无背景 2:有背景 + int32 bg_style = 10; // - Avatar avatar = 1; + string uri = 11; // - Button button = 2; + string icon_bg_url = 12; + // + string event = 13; + // + string event_v2 = 14; + // + int32 right_icon_type = 15; + // + string left_icon_type = 16; +} + +// 关系信息 +message Relation { + // 关系状态 + int32 status = 1; + // 是否关注 + int32 is_follow = 2; + // 是否粉丝 + int32 is_followed = 3; +} + +// 分享面板信息 +message SharePlane { + // 标题 + string title = 1; + // 副标贴文案 + string share_subtitle = 2; + // 备注 + string desc = 3; + // 封面url + string cover = 4; + // 稿件avid + int64 aid = 5; + // 稿件bvid + string bvid = 6; + // 允许分享方式 + map share_to = 7; + // UP主昵称 + string author = 8; + // UP主mid + int64 author_id = 9; + // 短连接 + string short_link = 10; + // 播放次数文案 + string play_number = 11; + // + int64 first_cid = 12; } // -message Avatar { +message ThreePoint { // - string cover = 1; + repeated DislikeReason dislike_reasons = 1; // - string text = 2; - // - string uri = 3; - // - int32 type = 4; - // - string event = 5; - // - string event_v2 = 6; - // - int32 defalut_cover = 7; + repeated DislikeReason feedbacks = 2; + //稍后再看 + int32 watch_later = 3; } // @@ -208,93 +301,6 @@ message ThreePointV4 { WatchLater watch_later = 2; } -// 分享面板信息 -message SharePlane { - // 标题 - string title = 1; - // 副标贴文案 - string share_subtitle = 2; - // 备注 - string desc = 3; - // 封面url - string cover = 4; - // 稿件avid - int64 aid = 5; - // 稿件bvid - string bvid = 6; - // 允许分享方式 - map share_to = 7; - // UP主昵称 - string author = 8; - // UP主mid - int64 author_id = 9; - // 短连接 - string short_link = 10; - // 播放次数文案 - string play_number = 11; -} - -// 稍后再看信息 -message WatchLater { - // 稿件avid - int64 aid = 1; - // 稿件bvid - string bvid = 2; -} - -// 标签框信息 -message ReasonStyle { - // 文案 - string text = 1; - // 文字颜色 - string text_color = 2; - // 背景色 - string bg_color = 3; - // 边框色 - string border_color = 4; - // 图标url - string icon_url = 5; - // 文字颜色-夜间 - string text_color_night = 6; - // 背景色-夜间 - string bg_color_night = 7; - // 边框色-夜间 - string border_color_night = 8; - // 图标url-夜间 - string icon_night_url = 9; - // 背景风格id - // 1:无背景 2:有背景 - int32 bg_style = 10; - // - string uri = 11; - // - string icon_bg_url = 12; - // - string event = 13; - // - string event_v2 = 14; - // - int32 right_icon_type = 15; - // - string left_icon_type = 16; -} - -// -message LikeButton { - // - int64 Aid = 1; - // - int32 count = 2; - // - bool show_count = 3; - // - string event = 4; - // - int32 selected = 5; - // - string event_v2 = 6; -} - // message Up { // @@ -313,12 +319,22 @@ message Up { string cooperation = 7; } -// 关系信息 -message Relation { - // 关系状态 - int32 status = 1; - // 是否关注 - int32 is_follow = 2; - // 是否粉丝 - int32 is_followed = 3; +// +message UpArgs { + // + int64 up_id = 1; + // + string up_name = 2; + // + string up_face = 3; + // + int64 selected = 4; +} + +// 稍后再看信息 +message WatchLater { + // 稿件avid + int64 aid = 1; + // 稿件bvid + string bvid = 2; } diff --git a/grpc_api/bilibili/app/card/v1/single.proto b/grpc_api/bilibili/app/card/v1/single.proto index bc7a984..f7eec43 100644 --- a/grpc_api/bilibili/app/card/v1/single.proto +++ b/grpc_api/bilibili/app/card/v1/single.proto @@ -30,6 +30,42 @@ message SmallCoverV5 { int32 right_icon_2 = 11; // 左上角角标 ReasonStyle left_corner_mark_style = 12; + // + string cover_right_text_content_description = 13; + // + string right_desc1_content_description = 14; +} + +// +message SmallCoverV5Ad { + // + Base base = 1; + // + string cover_gif = 2; + // + Up up = 3; + // + string cover_right_text1 = 4; + // + string right_desc1 = 5; + // + string right_desc2 = 6; + // + ReasonStyle rcmd_reason_style = 7; + // + HotwordEntrance hotword_entrance = 8; + // + ReasonStyle corner_mark_style = 9; + // + int32 right_icon1 = 10; + // + int32 right_icon2 = 11; + // + ReasonStyle left_corner_mark_style = 12; + // + string cover_right_text_content_description = 13; + // + string right_desc1_content_description = 14; } // @@ -157,6 +193,10 @@ message SmallCoverRcmdItem { int32 rightIcon1 = 10; // 右侧文案2图标id int32 rightIcon2 = 11; + // + string cover_right_text_content_description = 12; + // + string right_desc1_content_description = 13; } // @@ -310,4 +350,4 @@ message Bubble { int32 version = 2; // 起始时间 int64 stime = 3; -} \ No newline at end of file +} diff --git a/grpc_api/bilibili/app/dynamic/v1/dynamic.proto b/grpc_api/bilibili/app/dynamic/v1/dynamic.proto index 229f485..89b77bf 100644 --- a/grpc_api/bilibili/app/dynamic/v1/dynamic.proto +++ b/grpc_api/bilibili/app/dynamic/v1/dynamic.proto @@ -34,234 +34,72 @@ service Dynamic { rpc GeoCoder(GeoCoderReq) returns (GeoCoderReply); } -// 空请求 -message NoReq {} - -// 空响应 -message NoReply {} - -// 动态视频页-请求 -message DynVideoReq { - // 青少年模式 - int32 teenagers_mode = 1; - // 透传 update_baseline - string update_baseline = 2; - // 透传 history_offset - string offset = 3; - // 向下翻页数 - int32 page = 4; - // 刷新方式 - // 1:向上刷新 2:向下翻页 - int32 refresh_type = 5; - // 清晰度 - int32 qn = 6; - // 流版本 - int32 fnver = 7; - // 流类型 - int32 fnval = 8; - // 是否强制使用域名 - int32 force_host = 9; - // 是否4K - int32 fourk = 10; +// 地址部件 +message AddressComponent { + // 国家 + string nation = 1; + // 省 + string province = 2; + // 市 + string city = 3; + // 区,可能为空字串 + string district = 4; + // 街道,可能为空字串 + string street = 5; + // 门牌,可能为空字串 + string street_number = 6; } -// 动态视频页-响应 -message DynVideoReqReply { - // 动态列表 - repeated DynamicItem list = 1; - // 更新的动态数 - int32 update_num = 2; - // 历史偏移 - string history_offset = 3; - // 更新基础信息 - string update_baseline = 4; - // 是否还有更多数据 - int32 has_more = 5; +// 行政区划信息 +message AdInfo { + // 国家代码(ISO3166标准3位数字码) + string nation_code = 1; + // 行政区划代码,规则详见:行政区划代码说明 + string adcode = 2; + // 城市代码,由国家码+行政区划代码(提出城市级别)组合而来,总共为9位 + string city_code = 3; + // 行政区划名称 + string name = 4; + // 行政区划中心点坐标 + Gps gps = 5; } -// 动态卡片项 -message DynamicItem { - // 卡片类型 - // forward:转发 av:稿件视频 fold:折叠 pgc:pgc内容 courses:付费视频 upList:最近访问列表 followList:我的追番列表 - string card_type = 1; - // 转发类型下,items的类型 - string item_type = 2; - // 模块内容 - repeated Module modules = 3; - // 动态ID str - string dyn_id_str = 4; - // 转发动态ID str - string orig_dyn_id_str = 5; - // r_type - int32 r_type = 6; - // 该卡片下面是否含有折叠卡 - int32 has_fold = 7; +// +enum BgType { + bg_type_default = 0; // + bg_type_face = 1; // } -// 模块 -message Module { - // 类型 - // fold:折叠 author:发布人 dynamic:动态卡片内容 state:计数信息 forward:转发 extend:小卡信息 dispute:争议小黄条 desc:描述信息 - // likeUser:点赞用户 upList:最近访问列表 followList:我的追番 - string module_type = 1; - oneof module_item{ - // 折叠 - ModuleFold module_fold = 2; - // 发布人 - ModuleAuthor module_author = 3; - // 动态卡片内容 - ModuleDynamic module_dynamic = 4; - // 计数信息 - ModuleState module_state = 5; - // 转发 - ModuleForward module_forward = 6; - // 小卡信息 - ModuleExtend module_extend = 7; - // 争议小黄条 - ModuleDispute module_dispute = 8; - // 描述信息 - ModuleDesc module_desc = 9; - // 点赞用户 - ModuleLikeUser module_likeUser= 10; - // 最近访问列表 - ModuleDynUpList module_upList = 11; - // 我的追番 - ModuleFollowList module_followList = 12; - } -} - -// 折叠模块 -message ModuleFold { - // 折叠分类(该字段废弃) - int32 fold_type = 1; - // 折叠文案 - string text = 2; - // 被折叠的动态 - string fold_ids = 3; - // 被折叠的用户信息 - repeated UserInfo fold_users = 4; - // 折叠分类 - FoldType fold_type_v2 = 5; -} - -// 折叠分类 -enum FoldType { - // 占位 - FoldTypeZero = 0; - // 用户发布折叠 - FoldTypePublish = 1; - // 转发超频折叠 - FoldTypeFrequent = 2; - // 联合投稿折叠 - FoldTypeUnite = 3; - // 动态受限折叠 - FoldTypeLimit = 4; -} - -// 作者信息模块 -message ModuleAuthor { - // 用户mid - int64 id = 1; - // 时间标签 - string ptime_label_text = 2; - // 用户详情 - UserInfo author = 3; - // 装扮卡片 - DecorateCard decorate_card = 4; -} - -// 争议小黄条模块 -message ModuleDispute { - // 标题 - string title = 1; - // 描述内容 - string desc = 2; - // 跳转链接 - string uri = 3; -} - -// 文本内容模块 -message ModuleDesc { - // 文本描述 - repeated Description desc = 1; -} - -// 动态详情模块 -message ModuleDynamic { - // 卡片类型 - // ugc:ugc卡 pgc:pgc卡 currSeason:付费课程系列 currBatch:付费课程批次 - string card_type = 1; - // 正文卡片 - oneof card { - // ugc卡 - CardUGC card_ugc = 2; - // pgc卡 - CardPGC card_pgc = 3; - // 付费课程系列 - CardCurrSeason card_curr_season = 4; - // 付费课程批次 - CardCurrBatch card_curr_batch = 5; - } -} - -// 点赞用户模块 -message ModuleLikeUser { - // 点赞用户 - repeated LikeUser like_users = 1; - // 文案 - string display_text = 2; -} - -// 计数信息模块 -message ModuleState { - // 转发数 - int32 repost = 1; - // 点赞数 - int32 like = 2; - // 评论数 - int32 reply = 3; - // 点赞拓展信息 - LikeInfo like_info = 4; - // 禁评 - bool no_comment = 5; - // 禁转 - bool no_forward = 6; -} - -// 转发模块 -message ModuleForward { - // 卡片类型 - string card_type = 1; - // 嵌套模型 - repeated Module modules= 2; -} - -// UGC视频卡片数据 -message CardUGC { +// 付费课程批次卡 +message CardCurrBatch { // 标题 string title = 1; // 封面图 string cover = 2; - // 秒开地址 + // 跳转地址 string uri = 3; - // 视频封面展示项 1 - string cover_left_text_1 = 4; - // 视频封面展示项 2 - string cover_left_text_2 = 5; - // 封面视频展示项 3 - string cover_left_text_3 = 6; - // avid - int64 avid = 7; - // cid - int64 cid = 8; - // 视频源类型 - MediaType media_type = 9; - // 尺寸信息 - Dimension dimension = 10; + // 展示项 1(本集标题) + string text_1 = 4; + // 展示项 2(更新了多少个视频) + string text_2 = 5; // 角标 - repeated VideoBadge badge = 11; - // 是否能够自动播放 - int32 can_play= 12; + VideoBadge badge = 6; +} + +// 付费课程系列卡 +message CardCurrSeason { + // 标题 + string title = 1; + // 封面图 + string cover = 2; + // 跳转地址 + string uri = 3; + // 展示项 1(更新信息) + string text_1 = 4; + // 描述信息 + string desc = 5; + // 角标 + VideoBadge badge = 6; } // PGC视频卡片数据 @@ -302,99 +140,501 @@ message CardPGC { PGCSeason season = 17; } -// 付费课程系列卡 -message CardCurrSeason { +// UGC视频卡片数据 +message CardUGC { // 标题 string title = 1; // 封面图 string cover = 2; - // 跳转地址 + // 秒开地址 string uri = 3; - // 展示项 1(更新信息) - string text_1 = 4; - // 描述信息 - string desc = 5; + // 视频封面展示项 1 + string cover_left_text_1 = 4; + // 视频封面展示项 2 + string cover_left_text_2 = 5; + // 封面视频展示项 3 + string cover_left_text_3 = 6; + // avid + int64 avid = 7; + // cid + int64 cid = 8; + // 视频源类型 + MediaType media_type = 9; + // 尺寸信息 + Dimension dimension = 10; // 角标 - VideoBadge badge = 6; + repeated VideoBadge badge = 11; + // 是否能够自动播放 + int32 can_play= 12; } -// 付费课程批次卡 -message CardCurrBatch { - // 标题 - string title = 1; - // 封面图 - string cover = 2; - // 跳转地址 - string uri = 3; - // 展示项 1(本集标题) - string text_1 = 4; - // 展示项 2(更新了多少个视频) - string text_2 = 5; - // 角标 - VideoBadge badge = 6; +// +enum CornerType { + corner_type_none = 0; // + corner_type_text = 1; // + corner_type_animation = 2; // } -// 角标信息 -message VideoBadge { - // 文案 +// 粉丝样式 +message DecoCardFan { + // 是否是粉丝 + int32 is_fan = 1; + // 数量 + int32 number = 2; + // 颜色 + string color = 3; +} + +// 装扮卡片 +message DecorateCard { + // 装扮卡片id + int64 id = 1; + // 装扮卡片链接 + string card_url = 2; + // 装扮卡片点击跳转链接 + string jump_url = 3; + // 粉丝样式 + DecoCardFan fan = 4; +} + +// 文本描述 +message Description { + // 文本内容 string text = 1; - // 文案颜色-日间 - string text_color = 2; - // 文案颜色-夜间 - string text_color_night = 3; - // 背景颜色-日间 - string bg_color = 4; - // 背景颜色-夜间 - string bg_color_night = 5; - // 边框颜色-日间 - string border_color = 6; - // 边框颜色-夜间 - string border_color_night = 7; - // 样式 - int32 bg_style = 8; + // 文本类型 + string type = 2; + // 点击跳转链接 + string uri = 3; + // emoji类型 + string emoji_type = 4; + // 商品类型 + string goods_type = 5; } // 尺寸信息 message Dimension { + // int64 height = 1; + // int64 width = 2; + // int64 rotate = 3; } -// 番剧类型 -enum VideoSubType { - // 没有子类型 - VideoSubTypeNone = 0; - // 番剧 - VideoSubTypeBangumi = 1; - // 电影 - VideoSubTypeMovie = 2; - // 纪录片 - VideoSubTypeDocumentary = 3; - // 国创 - VideoSubTypeDomestic = 4; - // 电视剧 - VideoSubTypeTeleplay = 5; +// 动态卡片项 +message DynamicItem { + // 卡片类型 + // forward:转发 av:稿件视频 fold:折叠 pgc:pgc内容 courses:付费视频 upList:最近访问列表 followList:我的追番列表 + string card_type = 1; + // 转发类型下,items的类型 + string item_type = 2; + // 模块内容 + repeated Module modules = 3; + // 动态ID str + string dyn_id_str = 4; + // 转发动态ID str + string orig_dyn_id_str = 5; + // r_type + int32 r_type = 6; + // 该卡片下面是否含有折叠卡 + int32 has_fold = 7; } -// 播放器类型 -enum MediaType { - // 本地 - MediaTypeNone = 0; - // UGC - MediaTypeUGC = 1; - // PGC - MediaTypePGC = 2; - // 直播 - MediaTypeLive = 3; - // 小视频 - MediaTypeVCS = 4; +// 批量动态id获取动态详情返回值 +message DynDetailsReply { + // 动态列表 + repeated DynamicItem list = 1; } -// 拓展信息 -message ModuleExtend { - // 拓展 - repeated Extend extend = 1; +// 批量动态id获取动态详情请求参数 +message DynDetailsReq { + // 青少年模式 + int32 teenagers_mode = 1; + // 动态id + string dynamic_ids = 2; + // 清晰度 + int32 qn = 3; + // 流版本 + int32 fnver = 4; + // 流功能 + int32 fnval = 5; + // 是否强制使用域名 + int32 force_host = 6; + // 是否4k + int32 fourk = 7; +} + +// 查看更多-搜索-响应 +message DynMixUpListSearchReply { + // + repeated MixUpListItem items = 1; +} + +// 查看更多-搜索-请求 +message DynMixUpListSearchReq { + // + string name = 1; +} + +// 查看更多-列表-响应 +message DynMixUpListViewMoreReply { + // 关注up主列表信息 + repeated MixUpListItem items = 1; + // 默认搜索文案 + string search_default_text = 2; +} + +// 动态同城物料 +message DynOurCityItem { + // 卡片类型 + // av:稿件 draw:图文 + string card_type = 1; + // 动态ID + int64 dyn_id = 2; + // 跳转地址 + string uri = 3; + // 模块列表 + repeated DynOurCityModule modules = 4; + // 资源ID + int64 rid = 5; + // 透传服务端魔镜参数 + string debug_info = 6; +} + +// 动态同城物料模块 +message DynOurCityModule { + // 类型 + // cover:封面 desc:描述 author:发布人 extend:扩展部分 + string module_type = 1; + // + oneof module_item { + // 封面 + DynOurCityModuleCover module_cover = 2; + // 描述 + DynOurCityModuleDesc module_desc = 3; + // 发布人 + DynOurCityModuleAuthor module_author = 4; + // 扩展部分 + DynOurCityModuleExtend module_extend = 5; + } +} + +// 动态同城物料-发布人模块 +message DynOurCityModuleAuthor { + // 用户Mid + int64 mid = 1; + // 用户昵称 + string name = 2; + // 用户头像 + string face = 3; + // 跳转地址 + string uri = 4; +} + +// 动态同城物料-封面模块 +message DynOurCityModuleCover { + // 封面图 单图样式取第一个元素 + repeated string covers = 1; + // 封面样式 + // 1:横图 2:竖图 3:方图 + int32 style = 2; + // 视频封面展示项图标 1 + int32 cover_left_icon_1 = 3; + // 视频封面展示项 1 + string cover_left_text_1 = 4; + // 视频封面展示项图标 2 + int32 cover_left_icon_2 = 5; + // 视频封面展示项 2 + string cover_left_text_2 = 6; + // 封面视频展示项 3 + string cover_left_text_3 = 7; + // 角标 + repeated VideoBadge badge = 8; +} + +// 动态同城物料-描述模块 +message DynOurCityModuleDesc { + // 描述信息 + string desc = 1; +} + +// 动态同城物料-扩展部分模块 +message DynOurCityModuleExtend { + // 类型 + string type = 1; + oneof extend { + // LBS模块 + DynOurCityModuleExtendLBS extend_lbs = 2; + } +} + +// 动态同城物料extent-LBS模块 +message DynOurCityModuleExtendLBS { + // 标题 + string title = 1; + // 跳转地址 + string uri = 2; + // 小图标 + string icon = 3; + // poiType + int32 poi_type = 4; +} + +// 动态同城-响应 +message DynOurCityReply { + // 翻页游标 + string offset = 1; + // 是否还有更多数据 + // 1:有 + int32 has_more = 2; + // 样式类型 + // 1:双列 2:瀑布流 + int32 style = 3; + // 顶导信息 + string top_label = 4; + // 列表详情 + repeated DynOurCityItem list = 5; + // 顶导按钮信息 + string top_button_label = 6; + // 城市ID + int32 city_id = 7; + // 城市名 + string city_name = 8; +} + +// 动态同城页-请求 +message DynOurCityReq { + // 城市ID + int64 city_id = 1; + // 纬度 + double lat = 2; + // 经度 + double lng = 3; + // 透传上一次接口请求返回的offset + string offset = 4; + // 每页元素个数 + int32 page_size = 5; + // 青少年模式 + // 1:开启青少年模式 + int32 teenagers_mode = 6; + // 清晰度(旧版) + int32 qn = 7; + // 流版本(旧版) + int32 fnver = 8; + // 流类型(旧版) + int32 fnval = 9; + // 是否强制使用域名(旧版) + int32 force_host = 10; + // 是否4k(旧版) + int32 fourk = 11; + // 是否开启lbs + // 0:关闭 1:开启 + int32 lbs_state = 12; + // 是否刷新城市 + uint32 refresh_city = 13; + // 魔镜设置 + ExpConf exp_conf = 14; + // 秒开参数 + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 15; + // 城市码 + int64 city_code = 16; + // 构建时间 + int64 build_time = 17; +} + +// 动态同城开关-请求 +message DynOurCitySwitchReq { + // 开关参数 + // 0:关闭 1:开启 + int32 switch = 1; +} + +// 红点接口物料 +message DynRedItem { + // 数字红点有效 更新数 + uint64 count = 1; +} + +// 红点接口-响应 +message DynRedReply { + // 类型 + // count:数字红点 point:普通红点 no_point:没有红点 + string red_type = 1; + // 红点具体信息 + DynRedItem dyn_red_item = 2; + // 默认tab 值对应tab接口下发的anchor + string default_tab = 3; + // + DynRedStyle red_style = 4; +} + +// 动态红点接口-请求 +message DynRedReq { + // 动态红点接口各tab offset信息 + repeated TabOffset tab_offset = 1; +} + +// +message DynRedStyle { + // + int32 bg_type = 1; + // + int32 corner_type = 2; + // + int32 display_time = 3; + // + string corner_mark = 4; + // + DynRedStyleUp up = 5; + // + int32 type = 6; +} + +// +message DynRedStyleUp { + // + int64 uid = 1; + // + string face = 2; +} + +// 动态tab详情 +message DynTab { + // tab标题 优先展示用,未开启状态第一次请求返回同城,后续请求返回对应城市名 + string title = 1; + // 跳转链接 + string uri = 2; + // 气泡内容 + string bubble = 3; + // 是否推红点 + int32 red_point = 4; + // 城市ID + int64 city_id = 5; + // 是否弹窗 + int32 is_popup = 6; + // 弹窗内容 + Popup popup = 7; + // 是否默认tab + bool defaultTab = 8; + // 副标题 对应城市名 + string sub_title = 9; + // 锚点字段 + string anchor = 10; + // 内测文案 + string internal_test = 11; +} + +// 动态tab页-响应 +message DynTabReply { + // 动态tab详情列表 + repeated DynTab dyn_tab = 1; +} + +// 动态tab页-请求 +message DynTabReq { + // 青少年模式 + // 1:开启青少年模式 + int32 teenagers_mode = 1; +} + +// 最近访问-标记已读-请求 +message DynUpdOffsetReq { + // 被访问者的UID + int64 host_uid = 1; + // 用户已读进度 + string read_offset = 2; +} + +// 最近访问-个人feed流列表-响应 +message DynVideoPersonalReply { + // 动态列表 + repeated DynamicItem list = 1; + // 偏移量 + string offset = 2; + // 是否还有更多数据 + int32 has_more = 3; + // 已读进度 + string read_offset = 4; +} + +// 最近访问-个人feed流列表-请求 +message DynVideoPersonalReq { + // 青少年模式 + // 1:开启青少年模式 + int32 teenagers_mode = 1; + // 被访问者的mid + int64 host_uid = 2; + // 偏移量 第一页可传空 + string offset = 3; + // 标明下拉几次 + int32 page = 4; + // 是否是预加载 + int32 is_preload = 5; + // 清晰度 + int32 qn = 6; + // 流版本 + int32 fnver = 7; + // 流类型 + int32 fnval = 8; + // 是否强制使用域名 + int32 force_host = 9; + // 是否4k + int32 fourk = 10; +} + +// 动态视频页-请求 +message DynVideoReq { + // 青少年模式 + int32 teenagers_mode = 1; + // 透传 update_baseline + string update_baseline = 2; + // 透传 history_offset + string offset = 3; + // 向下翻页数 + int32 page = 4; + // 刷新方式 + // 1:向上刷新 2:向下翻页 + int32 refresh_type = 5; + // 清晰度 + int32 qn = 6; + // 流版本 + int32 fnver = 7; + // 流类型 + int32 fnval = 8; + // 是否强制使用域名 + int32 force_host = 9; + // 是否4K + int32 fourk = 10; +} + +// 动态视频页-响应 +message DynVideoReqReply { + // 动态列表 + repeated DynamicItem list = 1; + // 更新的动态数 + int32 update_num = 2; + // 历史偏移 + string history_offset = 3; + // 更新基础信息 + string update_baseline = 4; + // 是否还有更多数据 + int32 has_more = 5; +} + +// 魔镜实验配置项 +message Exp { + // 实验名 + string exp_name = 1; + // 实验组 + string exp_group = 2; +} + +// 魔镜设置 +message ExpConf { + // 是否是魔镜请求 + int32 exp_enable = 1; + // 实验配置 + repeated Exp exps = 2; } // 拓展 @@ -425,9 +665,9 @@ message ExtInfoGame { string icon = 3; } -// 拓展信息-话题小卡 -message ExtInfoTopic { - // 标题-话题名 +// 拓展信息-热门视频 +message ExtInfoHot { + // 标题 string title = 1; // 跳转地址 string uri = 2; @@ -447,9 +687,9 @@ message ExtInfoLBS { int32 poi_type = 4; } -// 拓展信息-热门视频 -message ExtInfoHot { - // 标题 +// 拓展信息-话题小卡 +message ExtInfoTopic { + // 标题-话题名 string title = 1; // 跳转地址 string uri = 2; @@ -457,6 +697,69 @@ message ExtInfoHot { string icon = 3; } +// 折叠分类 +enum FoldType { + FoldTypeZero = 0; // 占位 + FoldTypePublish = 1; // 用户发布折叠 + FoldTypeFrequent = 2; // 转发超频折叠 + FoldTypeUnite = 3; // 联合投稿折叠 + FoldTypeLimit = 4; // 动态受限折叠 +} + +// 我的追番列表Item +message FollowListItem { + // season_id + int32 season_id = 1; + // 标题 + string title = 2; + // 封面图 + string cover = 3; + // 跳转链接 + string url = 4; + // 最新ep + NewEP new_ep = 5; +} + +// 位置定位-响应 +message GeoCoderReply { + // 以行政区划+道路+门牌号等信息组成的标准格式化地址 + string address = 1; + // 地址部件,address不满足需求时可自行拼接 + AddressComponent address_component = 2; + // 行政区划信息 + AdInfo ad_info = 3; +} + +// 位置定位-请求 +message GeoCoderReq { + // 纬度 + double lat = 1; + // 经度 + double lng = 2; + // 页面来源 + string from = 3; +} + +// 行政区划中心点坐标 +message Gps { + // 纬度 + double lat = 1; + // 经度 + double lng = 2; +} + +// 点赞动画 +message LikeAnimation { + // 开始动画 + string begin = 1; + // 过程动画 + string proc = 2; + // 结束动画 + string end = 3; + // id + int64 like_icon_id = 4; +} + // 点赞拓展信息 message LikeInfo { // 点赞动画 @@ -475,74 +778,209 @@ message LikeUser { string uri = 3; } -// 点赞动画 -message LikeAnimation { - // 开始动画 - string begin = 1; - // 过程动画 - string proc = 2; - // 结束动画 - string end = 3; - // id - int64 like_icon_id = 4; +// 直播信息 +message LiveInfo { + // 是否在直播 + // 0:未直播 1:正在直播 + int32 is_living = 1; + // 跳转链接 + string uri = 2; } -// 文本描述 -message Description { - // 文本内容 - string text = 1; - // 文本类型 - string type = 2; - // 点击跳转链接 - string uri = 3; - // emoji类型 - string emoji_type = 4; - // 商品类型 - string goods_type = 5; +// 播放器类型 +enum MediaType { + MediaTypeNone = 0; // 本地 + MediaTypeUGC = 1; // UGC + MediaTypePGC = 2; // PGC + MediaTypeLive = 3; // 直播 + MediaTypeVCS = 4; // 小视频 } -// 装扮卡片 -message DecorateCard { - // 装扮卡片id - int64 id = 1; - // 装扮卡片链接 - string card_url = 2; - // 装扮卡片点击跳转链接 - string jump_url = 3; - // 粉丝样式 - DecoCardFan fan = 4; -} - -// 粉丝样式 -message DecoCardFan { - // 是否是粉丝 - int32 is_fan = 1; - // 数量 - int32 number = 2; - // 颜色 - string color = 3; -} - -// 用户信息 -message UserInfo { +// 查看更多-列表单条数据 +message MixUpListItem { // 用户mid - int64 mid = 1; - // 用户昵称 - string name = 2; - // 用户头像 - string face = 3; - // 认证信息 - OfficialVerify official = 4; - // 大会员信息 - VipInfo vip = 5; + int64 uid = 1; + // 特别关注 + // 0:否 1:是 + int32 special_attention = 2; + // 小红点状态 + // 0:没有 1:有 + int32 reddot_state = 3; // 直播信息 - LiveInfo live = 6; - // 空间页跳转链接 - string uri = 7; - // 挂件信息 - UserPendant pendant = 8; - // 认证名牌 - Nameplate nameplate = 9; + MixUpListLiveItem live_info = 4; + // 昵称 + string name = 5; + // 头像 + string face = 6; + // 认证信息 + OfficialVerify official = 7; + // 大会员信息 + VipInfo vip = 8; + // 关注状态 + Relation relation = 9; + // + int32 premiere_state = 10; + // + string uri = 11; +} + +// 直播信息 +message MixUpListLiveItem { + // 直播状态 + // 0:未直播 1:直播中 + bool status = 1; + // 房间号 + int64 room_id = 2; + // 跳转地址 + string uri = 3; +} + +// 模块 +message Module { + // 类型 + // fold:折叠 author:发布人 dynamic:动态卡片内容 state:计数信息 forward:转发 extend:小卡信息 dispute:争议小黄条 desc:描述信息 + // likeUser:点赞用户 upList:最近访问列表 followList:我的追番 + string module_type = 1; + oneof module_item{ + // 折叠 + ModuleFold module_fold = 2; + // 发布人 + ModuleAuthor module_author = 3; + // 动态卡片内容 + ModuleDynamic module_dynamic = 4; + // 计数信息 + ModuleState module_state = 5; + // 转发 + ModuleForward module_forward = 6; + // 小卡信息 + ModuleExtend module_extend = 7; + // 争议小黄条 + ModuleDispute module_dispute = 8; + // 描述信息 + ModuleDesc module_desc = 9; + // 点赞用户 + ModuleLikeUser module_likeUser= 10; + // 最近访问列表 + ModuleDynUpList module_upList = 11; + // 我的追番 + ModuleFollowList module_followList = 12; + } +} + +// 作者信息模块 +message ModuleAuthor { + // 用户mid + int64 id = 1; + // 时间标签 + string ptime_label_text = 2; + // 用户详情 + UserInfo author = 3; + // 装扮卡片 + DecorateCard decorate_card = 4; +} + +// 文本内容模块 +message ModuleDesc { + // 文本描述 + repeated Description desc = 1; +} + +// 争议小黄条模块 +message ModuleDispute { + // 标题 + string title = 1; + // 描述内容 + string desc = 2; + // 跳转链接 + string uri = 3; +} + +// 动态详情模块 +message ModuleDynamic { + // 卡片类型 + // ugc:ugc卡 pgc:pgc卡 currSeason:付费课程系列 currBatch:付费课程批次 + string card_type = 1; + // 正文卡片 + oneof card { + // ugc卡 + CardUGC card_ugc = 2; + // pgc卡 + CardPGC card_pgc = 3; + // 付费课程系列 + CardCurrSeason card_curr_season = 4; + // 付费课程批次 + CardCurrBatch card_curr_batch = 5; + } +} + +// 最近访问up主列表 +message ModuleDynUpList { + // 标题展示文案 + string module_title = 1; + // “全部”按钮文案 + string show_all = 2; + // up主列表 + repeated UpListItem list = 3; +} + +// 拓展信息 +message ModuleExtend { + // 拓展 + repeated Extend extend = 1; +} + +// 折叠模块 +message ModuleFold { + // 折叠分类(该字段废弃) + int32 fold_type = 1; + // 折叠文案 + string text = 2; + // 被折叠的动态 + string fold_ids = 3; + // 被折叠的用户信息 + repeated UserInfo fold_users = 4; + // 折叠分类 + FoldType fold_type_v2 = 5; +} + +// 我的追番列表 +message ModuleFollowList { + // 查看全部的跳转链接 + string view_all_link = 1; + // + repeated FollowListItem list = 2; +} + +// 转发模块 +message ModuleForward { + // 卡片类型 + string card_type = 1; + // 嵌套模型 + repeated Module modules= 2; +} + +// 点赞用户模块 +message ModuleLikeUser { + // 点赞用户 + repeated LikeUser like_users = 1; + // 文案 + string display_text = 2; +} + +// 计数信息模块 +message ModuleState { + // 转发数 + int32 repost = 1; + // 点赞数 + int32 like = 2; + // 评论数 + int32 reply = 3; + // 点赞拓展信息 + LikeInfo like_info = 4; + // 禁评 + bool no_comment = 5; + // 禁转 + bool no_forward = 6; } // 认证名牌 @@ -561,16 +999,24 @@ message Nameplate { string condition = 6; } -// 头像挂件信息 -message UserPendant { - // pid - int64 pid = 1; - // 名称 - string name = 2; - // 图片链接 - string image = 3; - // 有效期 - int64 expire = 4; +// 最新ep +message NewEP { + // 最新话epid + int32 id = 1; + // 更新至XX话 + string index_show = 2; + // 更新剧集的封面 + string cover = 3; +} + +// 空响应 +message NoReply { + +} + +// 空请求 +message NoReq { + } // 认证信息 @@ -584,121 +1030,31 @@ message OfficialVerify { int32 is_atten = 3; } -// 大会员信息 -message VipInfo { - // 大会员类型 - int32 Type = 1; - // 大会员状态 - int32 status = 2; - // 到期时间 - int64 due_date = 3; - // 标签 - VipLabel label = 4; - // 主题 - int32 theme_type = 5; +// 动态同城点击上报-响应 +message OurCityClickReportReply { + } -// 大会员标签 -message VipLabel { - // 图片地址 - string path = 1; +// 动态同城点击上报-请求 +message OurCityClickReportReq { + // 动态ID + string dynamic_id = 1; + // 城市ID + int64 city_id = 2; + // 纬度 + double lat = 3; + // 经度 + double lng = 4; } -// 直播信息 -message LiveInfo { - // 是否在直播 - // 0:未直播 1:正在直播 - int32 is_living = 1; - // 跳转链接 - string uri = 2; -} - -// 批量动态id获取动态详情请求参数 -message DynDetailsReq { - // 青少年模式 - int32 teenagers_mode = 1; - // 动态id - string dynamic_ids = 2; - // 清晰度 - int32 qn = 3; - // 流版本 - int32 fnver = 4; - // 流功能 - int32 fnval = 5; - // 是否强制使用域名 - int32 force_host = 6; - // 是否4k - int32 fourk = 7; -} - -// 批量动态id获取动态详情返回值 -message DynDetailsReply { - // 动态列表 - repeated DynamicItem list = 1; -} - -// 小视频连播页-请求 -message SVideoReq { - // 当前素材的id - int64 oid = 1; - // 当前素材类型 - // 1:动态(如果有oid则必传) 2:热门分类 3:热点聚合 - SVideoType type = 2; - // 翻页offset - string offset = 3; - // 清晰度(旧版) - int32 qn = 4; - // 流版本(旧版) - int32 fnver = 5; - // 流类型(旧版) - int32 fnval = 6; - // 是否强制使用域名(旧版) - int32 force_host = 7; - // 是否4k(旧版) - int32 fourk = 8; - // 当前页面spm - string spmid = 9; - // 上级页面spm - string from_spmid = 10; - // 秒开参数 - PlayerPreloadParams player_preload = 11; - // 热门进入联播页的锚点aid - int64 focus_aid = 12; - // 秒开参数 - bilibili.app.archive.middleware.v1.PlayerArgs player_args = 13; -} - -// 入口联播页类型 -enum SVideoType { - // 无类型 - TypeNone = 0; - // 动态 - TypeDynamic = 1; - // 热门分类 - TypePopularIndex = 2; - // 热点聚合 - TypePopularHotword = 3; -} - -// 小视频连播页-响应 -message SVideoReply { - // 列表 - repeated SVideoItem list = 1; - // 翻页游标 - string offset = 2; - // 是否还有更多数据 - // 1:有 - int32 has_more = 3; - // 顶部 - SVideoTop top = 4; -} - -// 顶部 -message SVideoTop { - // 联播页标题 - string Title = 1; - // 联播页导语 - string Desc = 2; +// PGC单季信息 +message PGCSeason { + // 是否完结 + int32 is_finish = 1; + // 标题 + string title = 2; + // 类型 + int32 type = 3; } // 秒开参数 @@ -715,6 +1071,63 @@ message PlayerPreloadParams { int32 fourk = 5; } +// 动态tab弹窗详情 +message Popup { + // 标题 + string title = 1; + // 文案 + string desc = 2; + // 文案附加跳转地址 + string uri = 3; +} + +// 关注关系 +message Relation { + // 关注状态 + RelationStatus status = 1; + // 关注 + int32 is_follow = 2; + // 被关注 + int32 is_followed = 3; + // 文案 + string title = 4; +} + +// 关注状态 +enum RelationStatus { + relation_status_none = 0; // + relation_status_nofollow = 1; // 未关注 + relation_status_follow = 2; // 关注 + relation_status_followed = 3; // 被关注 + relation_status_mutual_concern = 4; // 互相关注 + relation_status_special = 5; // 特别关注 +} + +// 分享需要 +message ShareInfo { + // 稿件avid + int64 aid = 1; + // 稿件bvid + string bvid = 2; + // 标题 + string title = 3; + // 副标题 + string subtitle = 4; + // 稿件封面 + string cover = 5; + // up mid + int64 mid = 6; + // up昵称 + string name = 7; +} + +// +enum StyleType { + STYLE_TYPE_NONE = 0; // + STYLE_TYPE_LIVE = 1; // + STYLE_TYPE_DYN_UP = 2; // +} + // 小视频卡片项 message SVideoItem { // 卡片类型 @@ -762,6 +1175,14 @@ message SVideoModuleAuthor { string uri = 6; } +// 文本内容模块 +message SVideoModuleDesc { + // 文本内容 + string text = 1; + // 跳转地址 + string uri = 2; +} + // 播放器模块 message SVideoModulePlayer { // 标题 @@ -780,14 +1201,6 @@ message SVideoModulePlayer { Dimension dimension = 7; } -// 文本内容模块 -message SVideoModuleDesc { - // 文本内容 - string text = 1; - // 跳转地址 - string uri = 2; -} - // 计数信息模块 message SVideoModuleStat { // 计数内容 @@ -796,6 +1209,50 @@ message SVideoModuleStat { ShareInfo share_info = 2; } +// 小视频连播页-响应 +message SVideoReply { + // 列表 + repeated SVideoItem list = 1; + // 翻页游标 + string offset = 2; + // 是否还有更多数据 + // 1:有 + int32 has_more = 3; + // 顶部 + SVideoTop top = 4; +} + +// 小视频连播页-请求 +message SVideoReq { + // 当前素材的id + int64 oid = 1; + // 当前素材类型 + // 1:动态(如果有oid则必传) 2:热门分类 3:热点聚合 + SVideoType type = 2; + // 翻页offset + string offset = 3; + // 清晰度(旧版) + int32 qn = 4; + // 流版本(旧版) + int32 fnver = 5; + // 流类型(旧版) + int32 fnval = 6; + // 是否强制使用域名(旧版) + int32 force_host = 7; + // 是否4k(旧版) + int32 fourk = 8; + // 当前页面spm + string spmid = 9; + // 上级页面spm + string from_spmid = 10; + // 秒开参数 + PlayerPreloadParams player_preload = 11; + // 热门进入联播页的锚点aid + int64 focus_aid = 12; + // 秒开参数 + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 13; +} + // 计数内容 message SVideoStatInfo { // 计数icon @@ -810,261 +1267,28 @@ message SVideoStatInfo { string uri = 4; } -// 分享需要 -message ShareInfo { - // 稿件avid - int64 aid = 1; - // 稿件bvid - string bvid = 2; - // 标题 - string title = 3; - // 副标题 - string subtitle = 4; - // 稿件封面 - string cover = 5; - // up mid - int64 mid = 6; - // up昵称 - string name = 7; +// 顶部 +message SVideoTop { + // 联播页标题 + string Title = 1; + // 联播页导语 + string Desc = 2; } -// 动态tab页-请求 -message DynTabReq { - // 青少年模式 - // 1:开启青少年模式 - int32 teenagers_mode = 1; +// 入口联播页类型 +enum SVideoType { + TypeNone = 0; // 无类型 + TypeDynamic = 1; // 动态 + TypePopularIndex = 2; // 热门分类 + TypePopularHotword = 3; // 热点聚合 } -// 动态tab页-响应 -message DynTabReply { - // 动态tab详情列表 - repeated DynTab dyn_tab = 1; -} - -// 动态tab详情 -message DynTab { - // tab标题 优先展示用,未开启状态第一次请求返回同城,后续请求返回对应城市名 - string title = 1; - // 跳转链接 - string uri = 2; - // 气泡内容 - string bubble = 3; - // 是否推红点 - int32 red_point = 4; - // 城市ID - int64 city_id = 5; - // 是否弹窗 - int32 is_popup = 6; - // 弹窗内容 - Popup popup = 7; - // 是否默认tab - bool defaultTab = 8; - // 副标题 对应城市名 - string sub_title = 9; - // 锚点字段 - string anchor = 10; - // 内测文案 - string internal_test = 11; -} - -// 动态tab弹窗详情 -message Popup { - // 标题 - string title = 1; - // 文案 - string desc = 2; - // 文案附加跳转地址 - string uri = 3; -} - -// 动态同城开关-请求 -message DynOurCitySwitchReq { - // 开关参数 - // 0:关闭 1:开启 - int32 switch = 1; -} - -// 动态同城页-请求 -message DynOurCityReq { - // 城市ID - int64 city_id = 1; - // 纬度 - double lat = 2; - // 经度 - double lng = 3; - // 透传上一次接口请求返回的offset - string offset = 4; - // 每页元素个数 - int32 page_size = 5; - // 青少年模式 - // 1:开启青少年模式 - int32 teenagers_mode = 6; - // 清晰度(旧版) - int32 qn = 7; - // 流版本(旧版) - int32 fnver = 8; - // 流类型(旧版) - int32 fnval = 9; - // 是否强制使用域名(旧版) - int32 force_host = 10; - // 是否4k(旧版) - int32 fourk = 11; - // 是否开启lbs - // 0:关闭 1:开启 - int32 lbs_state = 12; - // 是否刷新城市 - uint32 refresh_city = 13; - // 魔镜设置 - ExpConf exp_conf = 14; - // 秒开参数 - bilibili.app.archive.middleware.v1.PlayerArgs player_args = 15; - // 城市码 - int64 city_code = 16; - // 构建时间 - int64 build_time = 17; -} - -// 魔镜设置 -message ExpConf { - // 是否是魔镜请求 - int32 exp_enable = 1; - // 实验配置 - repeated Exp exps = 2; -} - -// 魔镜实验配置项 -message Exp { - // 实验名 - string exp_name = 1; - // 实验组 - string exp_group = 2; -} - -// 动态同城-响应 -message DynOurCityReply { - // 翻页游标 - string offset = 1; - // 是否还有更多数据 - // 1:有 - int32 has_more = 2; - // 样式类型 - // 1:双列 2:瀑布流 - int32 style = 3; - // 顶导信息 - string top_label = 4; - // 列表详情 - repeated DynOurCityItem list = 5; - // 顶导按钮信息 - string top_button_label = 6; - // 城市ID - int32 city_id = 7; - // 城市名 - string city_name = 8; -} - -// 动态同城物料 -message DynOurCityItem { - // 卡片类型 - // av:稿件 draw:图文 - string card_type = 1; - // 动态ID - int64 dyn_id = 2; - // 跳转地址 - string uri = 3; - // 模块列表 - repeated DynOurCityModule modules = 4; - // 资源ID - int64 rid = 5; - // 透传服务端魔镜参数 - string debug_info = 6; -} - -// 动态同城物料模块 -message DynOurCityModule { - // 类型 - // cover:封面 desc:描述 author:发布人 extend:扩展部分 - string module_type = 1; - oneof module_item { - // 封面 - DynOurCityModuleCover module_cover = 2; - // 描述 - DynOurCityModuleDesc module_desc = 3; - // 发布人 - DynOurCityModuleAuthor module_author = 4; - // 扩展部分 - DynOurCityModuleExtend module_extend = 5; -} -} - -// 动态同城物料-封面模块 -message DynOurCityModuleCover { - // 封面图 单图样式取第一个元素 - repeated string covers = 1; - // 封面样式 - // 1:横图 2:竖图 3:方图 - int32 style = 2; - // 视频封面展示项图标 1 - int32 cover_left_icon_1 = 3; - // 视频封面展示项 1 - string cover_left_text_1 = 4; - // 视频封面展示项图标 2 - int32 cover_left_icon_2 = 5; - // 视频封面展示项 2 - string cover_left_text_2 = 6; - // 封面视频展示项 3 - string cover_left_text_3 = 7; - // 角标 - repeated VideoBadge badge = 8; -} - -// 动态同城物料-描述模块 -message DynOurCityModuleDesc { - // 描述信息 - string desc = 1; -} - -// 动态同城物料-发布人模块 -message DynOurCityModuleAuthor { - // 用户Mid - int64 mid = 1; - // 用户昵称 - string name = 2; - // 用户头像 - string face = 3; - // 跳转地址 - string uri = 4; -} - -// 动态同城物料-扩展部分模块 -message DynOurCityModuleExtend { - // 类型 - string type = 1; - oneof extend { - // LBS模块 - DynOurCityModuleExtendLBS extend_lbs = 2; - } -} - -// 动态同城物料extent-LBS模块 -message DynOurCityModuleExtendLBS{ - // 标题 - string title = 1; - // 跳转地址 - string uri = 2; - // 小图标 - string icon = 3; - // poiType - int32 poi_type = 4; -} - -// 最近访问up主列表 -message ModuleDynUpList { - // 标题展示文案 - string module_title = 1; - // “全部”按钮文案 - string show_all = 2; - // up主列表 - repeated UpListItem list = 3; +// 动态红点接口各tab offset信息 +message TabOffset { + // 1:综合页 2:视频页 + int32 tab = 1; + // 上一次对应列表页offset + string offset = 2; } // up主列表 @@ -1080,275 +1304,86 @@ message UpListItem { int64 uid = 4; } -// 我的追番列表 -message ModuleFollowList { - // 查看全部的跳转链接 - string view_all_link = 1; - // - repeated FollowListItem list = 2; -} - -// 我的追番列表Item -message FollowListItem { - // season_id - int32 season_id = 1; - // 标题 - string title = 2; - // 封面图 - string cover = 3; - // 跳转链接 - string url = 4; - // 最新ep - NewEP new_ep = 5; -} - -// 最新ep -message NewEP { - // 最新话epid - int32 id = 1; - // 更新至XX话 - string index_show = 2; - // 更新剧集的封面 - string cover = 3; -} - -// 最近访问-个人feed流列表-请求 -message DynVideoPersonalReq { - // 青少年模式 - // 1:开启青少年模式 - int32 teenagers_mode = 1; - // 被访问者的mid - int64 host_uid = 2; - // 偏移量 第一页可传空 - string offset = 3; - // 标明下拉几次 - int32 page = 4; - // 是否是预加载 - int32 is_preload = 5; - // 清晰度 - int32 qn = 6; - // 流版本 - int32 fnver = 7; - // 流类型 - int32 fnval = 8; - // 是否强制使用域名 - int32 force_host = 9; - // 是否4k - int32 fourk = 10; -} - -// 最近访问-个人feed流列表-响应 -message DynVideoPersonalReply { - // 动态列表 - repeated DynamicItem list = 1; - // 偏移量 - string offset = 2; - // 是否还有更多数据 - int32 has_more = 3; - // 已读进度 - string read_offset = 4; -} - -// 最近访问-标记已读-请求 -message DynUpdOffsetReq { - // 被访问者的UID - int64 host_uid = 1; - // 用户已读进度 - string read_offset = 2; -} - -// PGC单季信息 -message PGCSeason { - // 是否完结 - int32 is_finish = 1; - // 标题 - string title = 2; - // 类型 - int32 type = 3; -} - -// 动态红点接口-请求 -message DynRedReq { - // 动态红点接口各tab offset信息 - repeated TabOffset tab_offset = 1; -} - -// 动态红点接口各tab offset信息 -message TabOffset { - // 1:综合页 2:视频页 - int32 tab = 1; - // 上一次对应列表页offset - string offset = 2; -} - -// 红点接口-响应 -message DynRedReply { - // 类型 - // count:数字红点 point:普通红点 no_point:没有红点 - string red_type = 1; - // 红点具体信息 - DynRedItem dyn_red_item = 2; - // 默认tab 值对应tab接口下发的anchor - string default_tab = 3; -} - -// 红点接口物料 -message DynRedItem { - // 数字红点有效 更新数 - uint64 count = 1; -} - -// 直播信息 -message MixUpListLiveItem { - // 直播状态 - // 0:未直播 1:直播中 - bool status = 1; - // 房间号 - int64 room_id = 2; - // 跳转地址 - string uri = 3; -} - -// 查看更多-列表单条数据 -message MixUpListItem { +// 用户信息 +message UserInfo { // 用户mid - int64 uid = 1; - // 特别关注 - // 0:否 1:是 - int32 special_attention = 2; - // 小红点状态 - // 0:没有 1:有 - int32 reddot_state = 3; - // 直播信息 - MixUpListLiveItem live_info = 4; - // 昵称 - string name = 5; - // 头像 - string face = 6; + int64 mid = 1; + // 用户昵称 + string name = 2; + // 用户头像 + string face = 3; // 认证信息 - OfficialVerify official = 7; + OfficialVerify official = 4; // 大会员信息 - VipInfo vip = 8; - // 关注状态 - Relation relation = 9; + VipInfo vip = 5; + // 直播信息 + LiveInfo live = 6; + // 空间页跳转链接 + string uri = 7; + // 挂件信息 + UserPendant pendant = 8; + // 认证名牌 + Nameplate nameplate = 9; } -// 查看更多-列表-响应 -message DynMixUpListViewMoreReply { - // 关注up主列表信息 - repeated MixUpListItem items = 1; - // 默认搜索文案 - string search_default_text = 2; +// 头像挂件信息 +message UserPendant { + // pid + int64 pid = 1; + // 名称 + string name = 2; + // 图片链接 + string image = 3; + // 有效期 + int64 expire = 4; } -// 查看更多-搜索-请求 -message DynMixUpListSearchReq { - // - string name = 1; -} - -// 查看更多-搜索-响应 -message DynMixUpListSearchReply { - // - repeated MixUpListItem items = 1; -} - -// 关注关系 -message Relation { - // 关注状态 - RelationStatus status = 1; - // 关注 - int32 is_follow = 2; - // 被关注 - int32 is_followed = 3; +// 角标信息 +message VideoBadge { // 文案 - string title = 4; + string text = 1; + // 文案颜色-日间 + string text_color = 2; + // 文案颜色-夜间 + string text_color_night = 3; + // 背景颜色-日间 + string bg_color = 4; + // 背景颜色-夜间 + string bg_color_night = 5; + // 边框颜色-日间 + string border_color = 6; + // 边框颜色-夜间 + string border_color_night = 7; + // 样式 + int32 bg_style = 8; } -// 关注状态 -enum RelationStatus { - relation_status_none = 0; - // 未关注 - relation_status_nofollow = 1; - // 关注 - relation_status_follow = 2; - // 被关注 - relation_status_followed = 3; - // 互相关注 - relation_status_mutual_concern = 4; - // 特别关注 - relation_status_special = 5; +// 番剧类型 +enum VideoSubType { + VideoSubTypeNone = 0; // 没有子类型 + VideoSubTypeBangumi = 1; // 番剧 + VideoSubTypeMovie = 2; // 电影 + VideoSubTypeDocumentary = 3; // 纪录片 + VideoSubTypeDomestic = 4; // 国创 + VideoSubTypeTeleplay = 5; // 电视剧 } -// 动态同城点击上报-请求 -message OurCityClickReportReq { - // 动态ID - string dynamic_id = 1; - // 城市ID - int64 city_id = 2; - // 纬度 - double lat = 3; - // 经度 - double lng = 4; +// 大会员信息 +message VipInfo { + // 大会员类型 + int32 Type = 1; + // 大会员状态 + int32 status = 2; + // 到期时间 + int64 due_date = 3; + // 标签 + VipLabel label = 4; + // 主题 + int32 theme_type = 5; } -// 动态同城点击上报-响应 -message OurCityClickReportReply {} - -// 位置定位-请求 -message GeoCoderReq { - // 纬度 - double lat = 1; - // 经度 - double lng = 2; - // 页面来源 - string from = 3; +// 大会员标签 +message VipLabel { + // 图片地址 + string path = 1; } - -// 位置定位-响应 -message GeoCoderReply { - // 以行政区划+道路+门牌号等信息组成的标准格式化地址 - string address = 1; - // 地址部件,address不满足需求时可自行拼接 - AddressComponent address_component = 2; - // 行政区划信息 - AdInfo ad_info = 3; -} - -// 地址部件 -message AddressComponent { - // 国家 - string nation = 1; - // 省 - string province = 2; - // 市 - string city = 3; - // 区,可能为空字串 - string district = 4; - // 街道,可能为空字串 - string street = 5; - // 门牌,可能为空字串 - string street_number = 6; -} - -// 行政区划信息 -message AdInfo { - // 国家代码(ISO3166标准3位数字码) - string nation_code = 1; - // 行政区划代码,规则详见:行政区划代码说明 - string adcode = 2; - // 城市代码,由国家码+行政区划代码(提出城市级别)组合而来,总共为9位 - string city_code = 3; - // 行政区划名称 - string name = 4; - // 行政区划中心点坐标 - Gps gps = 5; -} - -// 行政区划中心点坐标 -message Gps { - // 纬度 - double lat = 1; - // 经度 - double lng = 2; -} \ No newline at end of file diff --git a/grpc_api/bilibili/app/listener/v1/listener.proto b/grpc_api/bilibili/app/listener/v1/listener.proto index b00c79e..6c431fa 100644 --- a/grpc_api/bilibili/app/listener/v1/listener.proto +++ b/grpc_api/bilibili/app/listener/v1/listener.proto @@ -4,6 +4,8 @@ package bilibili.app.listener.v1; import "google/protobuf/empty.proto"; import "bilibili/app/archive/middleware/v1/preload.proto"; +import "bilibili/app/interfaces/v1/history.proto"; +import "bilibili/app/playurl/v1/playurl.proto"; // 听视频 service Listener { @@ -55,6 +57,28 @@ service Listener { rpc PickFeed (PickFeedReq) returns (PickFeedResp); // 每日播单详情 rpc PickCardDetail (PickCardDetailReq) returns (PickCardDetailResp); + // + rpc Medialist(MedialistReq) returns (MedialistResp); + // + rpc Event(EventReq) returns (EventResp); +} + +// +service Music { + // + rpc FavTabShow(FavTabShowReq) returns (FavTabShowResp); + // + rpc MainFavMusicSubTabList(MainFavMusicSubTabListReq) returns (MainFavMusicSubTabListResp); + // + rpc MainFavMusicMenuList(MainFavMusicMenuListReq) returns (MainFavMusicMenuListResp); + // + rpc MenuEdit(MenuEditReq) returns (MenuEditResp); + // + rpc MenuDelete(MenuDeleteReq) returns (MenuDeleteResp); + // + rpc MenuSubscribe(MenuSubscribeReq) returns (MenuSubscribeResp); + // + rpc Click(ClickReq) returns (ClickResp); } // @@ -173,6 +197,19 @@ enum CardModuleType { Module_cbtn = 3; } +// +message ClickReq { + // + int64 sid = 1; + // + int32 action = 2; +} + +// +message ClickResp { + +} + // message CoinAddReq { // @@ -243,6 +280,29 @@ message DetailItem { string message = 9; // map player_info = 10; + // + PlayItem associated_item = 11; + // + int64 last_play_time = 12; + // + string history_tag = 13; + // + bilibili.app.interfaces.v1.DeviceType device_type = 14; + // + FavFolder ugc_season_info = 15; +} + +// +message EventReq { + // + int32 event_type = 1; + // + PlayItem item = 2; +} + +// +message EventResp { + } // @@ -257,6 +317,8 @@ message EventTracking { string entity_type = 4; // string entity_id = 5; + // + string track_json = 6; } // @@ -533,6 +595,18 @@ message FavoredInAnyFoldersResp { PlayItem item = 2; } +// +message FavTabShowReq { + // + int64 mid = 1; +} + +// +message FavTabShowResp { + // + bool show_menu = 1; +} + // message FollowRelation { // @@ -553,6 +627,219 @@ message FormatDescription { string superscript = 5; } +// +enum ListOrder { + NO_ORDER = 0; // + ORDER_NORMAL = 1; // + ORDER_REVERSE = 2; // + ORDER_RANDOM = 3; // +} + +// +enum ListSortField { + NO_SORT = 0; // + SORT_CTIME = 1; // + SORT_VIEWCNT = 2; // + SORT_FAVCNT = 3; // +} + +// +message MainFavMusicMenuListReq { + // + int32 tab_type = 1; + // + string offset = 2; +} + +// +message MainFavMusicMenuListResp { + // + int32 tab_type = 1; + // + repeated MusicMenu menu_list = 2; + // + bool has_more = 3; + // + string offset = 4; +} + +// +message MainFavMusicSubTabListReq { + +} + +// +message MainFavMusicSubTabListResp { + // + repeated MusicSubTab tabs = 1; + // + MainFavMusicMenuListResp default_tab_res = 2; + // + map first_page_res = 3; +} + +// +message MedialistItem { + // + PlayItem item = 1; + // + string title = 2; + // + string cover = 3; + // + int64 duration = 4; + // + int32 parts = 5; + // + int64 up_mid = 6; + // + string up_name = 7; + // + int32 state = 8; + // + string message = 9; + // + int64 stat_view = 10; + // + int64 stat_reply = 11; +} + +// +message MedialistReq { + // + int64 list_type = 1; + // + int64 biz_id = 2; + // + string offset = 3; +} + +// +message MedialistResp { + // + int64 total = 1; + // + bool has_more = 2; + // + string offset = 3; + // + repeated MedialistItem items = 4; + // + MedialistUpInfo up_info = 5; +} + +// +message MedialistUpInfo { + // + int64 mid = 1; + // + string avatar = 2; + // + int64 fans = 3; + // + string name = 4; +} + +// +message MenuDeleteReq { + // + int64 id = 1; +} + +// +message MenuDeleteResp { + // + string message = 1; +} + +// +message MenuEditReq { + // + int64 id = 1; + // + string title = 2; + // + string desc = 3; + // + int32 is_public = 4; +} + +// +message MenuEditResp { + // + string message = 1; +} + +// +message MenuSubscribeReq { + // + int32 action = 1; + // + int64 target_id = 2; +} + +// +message MenuSubscribeResp { + // + string message = 1; +} + +// +message MusicMenu { + // + int64 id = 1; + // + int32 menu_type = 2; + // + string title = 3; + // + string desc = 4; + // + string cover = 5; + // + MusicMenuAuthor owner = 6; + // + int32 state = 7; + // + int64 attr = 8; + // + MusicMenuStat stat = 9; + // + int64 total = 10; + // + int64 ctime = 11; + // + string uri = 12; +} + +// +message MusicMenuAuthor { + // + int64 mid = 1; + // + string name = 2; + // + string avatar = 3; +} + +// +message MusicMenuStat { + // + int64 play = 1; + // + int64 reply = 2; +} + +// +message MusicSubTab { + // + string name = 1; + // + int32 tab_type = 2; + // + int64 total = 3; +} + // message PageOption { // @@ -677,6 +964,8 @@ message PkcmHeader { message PlayActionReportReq { // PlayItem item = 1; + // + string from_spmid = 2; } // @@ -711,7 +1000,10 @@ message PlayHistoryDelReq { // message PlayHistoryReq { + // PageOption page_opt = 1; + // + int64 local_today_zero = 2; } // @@ -751,6 +1043,10 @@ message PlayInfo { int32 code = 11; // string message = 12; + // + int64 expire_time = 13; + // + bilibili.app.playurl.v1.VolumeInfo volume = 14; } // @@ -801,6 +1097,8 @@ message PlaylistReq { bilibili.app.archive.middleware.v1.PlayerArgs player_args = 5; // int64 extra_id = 6; + // + SortOption sort_opt = 7; } // @@ -821,14 +1119,15 @@ message PlaylistResp { // enum PlaylistSource { - DEFAULT = 0; - MEM_SPACE = 1; - AUDIO_COLLECTION = 2; - AUDIO_CARD = 3; - USER_FAVOURITE = 4; - UP_ARCHIVE = 5; - AUDIO_CACHE = 6; - PICK_CARD = 7; + DEFAULT = 0; // + MEM_SPACE = 1; // + AUDIO_COLLECTION = 2; // + AUDIO_CARD = 3; // + USER_FAVOURITE = 4; // + UP_ARCHIVE = 5; // + AUDIO_CACHE = 6; // + PICK_CARD = 7; // + MEDIA_LIST = 8; // } // @@ -865,6 +1164,10 @@ message RcmdPlaylistReq { int64 id = 2; // bool need_history = 3; + // + bool need_top_cards = 4; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 5; } // @@ -873,6 +1176,8 @@ message RcmdPlaylistResp { repeated DetailItem list = 1; // int64 history_len = 2; + // + repeated TopCard top_cards = 3; } // @@ -895,6 +1200,14 @@ message ResponseUrl { string md5 = 8; } +// +message SortOption { + // + int32 order = 1; + // + int32 sort_field = 2; +} + // message ThumbUpReq { // @@ -909,6 +1222,94 @@ message ThumbUpResp { string message = 1; } +// +message TopCard { + // + string title = 1; + // + int32 play_style = 2; + // + int32 card_type = 3; + // + oneof card { + // + TpcdHistory listen_history = 4; + // + TpcdFavFolder fav_folder = 5; + // + TpcdUpRecall up_recall = 6; + // + TpcdPickToday pick_today = 7; + } + // + int64 pos = 8; + // + string title_icon = 9; +} + +// +enum TopCardType { + UNSPECIFIED = 0; // + LISTEN_HISTORY = 1; // + FAVORITE_FOLDER = 2; // + UP_RECALL = 3; // + PICK_TODAY = 4; // +} + +// +message TpcdFavFolder { + // + DetailItem item = 1; + // + string text = 2; + // + string pic = 3; + // + int64 fid = 4; + // + int32 folder_type = 5; +} + +// +message TpcdHistory { + // + DetailItem item = 1; + // + string text = 2; + // + string pic = 3; +} + +// +message TpcdPickToday { + // + DetailItem item = 1; + // + string text = 2; + // + string pic = 3; + // + int64 pick_id = 4; + // + int64 pick_card_id = 5; +} + +// +message TpcdUpRecall { + // + int64 up_mid = 1; + // + string text = 2; + // + string avatar = 3; + // + int64 medialist_type = 4; + // + int64 medialist_biz_id = 5; + // + DetailItem item = 6; +} + // message TripleLikeReq { //