From 1e1ff0c3dc48a2c87c2a8f7669930e83ef697288 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: Mon, 20 Jun 2022 01:03:57 +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 --- .../bilibili/app/interfaces/v1/history.proto | 14 +- grpc_api/bilibili/app/view/v1/view.proto | 645 ++++++++++++++++-- 2 files changed, 578 insertions(+), 81 deletions(-) diff --git a/grpc_api/bilibili/app/interfaces/v1/history.proto b/grpc_api/bilibili/app/interfaces/v1/history.proto index 85bbf1b..c77e35f 100644 --- a/grpc_api/bilibili/app/interfaces/v1/history.proto +++ b/grpc_api/bilibili/app/interfaces/v1/history.proto @@ -234,13 +234,13 @@ message CursorV2Req { // 设备标识代码 enum DT { Unknown = 0; // 未知 - Phone = 1; // 手机端 - Pad = 2; // ipad端 - PC = 3; // web端 - TV = 4; // TV端 - Car = 5; // - Iot = 6; // - AndPad = 7; // apad端 + Phone = 1; // 手机端 + Pad = 2; // ipad端 + PC = 3; // web端 + TV = 4; // TV端 + Car = 5; // 车机端 + Iot = 6; // 物联设备 + AndPad = 7; // apad端 } // 删除历史记录-请求 diff --git a/grpc_api/bilibili/app/view/v1/view.proto b/grpc_api/bilibili/app/view/v1/view.proto index cc4babd..5d3cd63 100644 --- a/grpc_api/bilibili/app/view/v1/view.proto +++ b/grpc_api/bilibili/app/view/v1/view.proto @@ -8,6 +8,10 @@ import "bilibili/app/archive/v1/archive.proto"; service View { // 视频页详情页 rpc View (ViewReq) returns (ViewReply); + // + rpc ViewTag(ViewTagReq) returns (ViewTagReply); + // + rpc ViewMaterial(ViewMaterialReq) returns (ViewMaterialReply); // 视频播放过程中的数据 rpc ViewProgress (ViewProgressReq) returns (ViewProgressReply); // 短视频下载 @@ -23,11 +27,19 @@ service View { // 点击签订契约 rpc AddContract (AddContractReq) returns (NoReply); // - rpc FeedView (FeedViewReq) returns (FeedViewReply); + rpc ChronosPkg(ChronosPkgReq) returns (Chronos); // - rpc ChronosPkg (ChronosPkgReq) returns (Chronos); + rpc CacheView(CacheViewReq) returns (CacheViewReply); // - rpc CacheView (CacheViewReq) returns (CacheViewReply); + rpc ContinuousPlay(ContinuousPlayReq) returns (ContinuousPlayReply); + // + rpc RelatesFeed(RelatesFeedReq) returns (RelatesFeedReply); + // + rpc PremiereArchive(PremiereArchiveReq) returns (PremiereArchiveReply); + // + rpc Reserve(ReserveReq) returns (ReserveReply); + // + rpc PlayerRelates(PlayerRelatesReq) returns (PlayerRelatesReply); } // 活动页资源包 @@ -115,6 +127,16 @@ message ActivitySeason { Online online = 30; } +// 点击签订契约-请求 +message AddContractReq { + // 稿件avid + int64 aid = 1; + // UP主mid + int64 up_mid = 2; + // 当前页面spm + string spmid = 3; +} + // message AdInfo { // @@ -129,16 +151,6 @@ message AdInfo { int32 card_type = 5; } -// 点击签订契约-请求 -message AddContractReq { - // 稿件avid - int64 aid = 1; - // UP主mid - int64 up_mid = 2; - // 当前页面spm - string spmid = 3; -} - // message Asset { // @@ -191,6 +203,26 @@ message Audio { int64 song_attr = 8; } +// +message BadgeStyle { + // + 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; +} + // 视频引用的bgm音频 message Bgm { // 音频auid @@ -263,6 +295,22 @@ message Button { string uri = 2; } +// +message ButtonStyle { + // + string text = 1; + // + string text_color = 2; + // + string text_color_night = 3; + // + string bg_color = 4; + // + string bg_color_night = 5; + // + string jump_link = 6; +} + // message BuzzwordConfig { // @@ -287,18 +335,6 @@ message BuzzwordConfig { string picture = 10; } -// 广告 -message CM { - // 广告数据(需解包) - google.protobuf.Any source_content = 1; -} - -// 广告配置 -message CMConfig { - // 广告配置数据(需要二次解包) - google.protobuf.Any ads_control = 1; -} - // message CacheViewReply { // @@ -349,6 +385,12 @@ message CacheViewReq { string from_spmid = 7; } +// +enum Category { + CategoryUnknown = 0; // + CategorySeason = 1; // +} + // Chronos灰度管理 message Chronos { // 资源包md5 @@ -402,6 +444,18 @@ message ClickPlayerCardReq { string spmid = 5; } +// 广告 +message CM { + // 广告数据(需解包) + google.protobuf.Any source_content = 1; +} + +// 广告配置 +message CMConfig { + // 广告配置数据(需要二次解包) + google.protobuf.Any ads_control = 1; +} + // message CmIpad { // @@ -423,7 +477,7 @@ message CommandDm { // 对象视频cid int64 oid = 2; // 发送者mid - string mid = 3; + int64 mid = 3; // 互动弹幕指令 string command = 4; // 互动弹幕正文 @@ -437,7 +491,7 @@ message CommandDm { // 扩展json数据 string extra = 9; // 弹幕id str类型 - string idStr = 10; + string id_str = 10; } // @@ -462,6 +516,56 @@ message Config { int32 rec_three_point_style = 9; // bool is_absolute_time = 10; + // + bool new_swindow = 11; + // + bool relates_biserial = 12; + // + ListenerConfig listener_conf = 13; + // + string relates_feed_style = 14; + // + bool relates_feed_popup = 15; + // + bool relates_has_next = 16; + // + int32 local_play = 17; + // + bool play_story = 18; + // + bool arc_play_story = 19; + // + string story_icon = 20; +} + +// +message ContinuousPlayReply { + // + repeated Relate relates = 1; +} + +// +message ContinuousPlayReq { + // + int64 aid = 1; + // + string from = 2; + // + string trackid = 3; + // + string spmid = 4; + // + string from_spmid = 5; + // + int32 autoplay = 6; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 7; + // + int64 device_type = 8; + // + string session_id = 9; + // + int64 display_id = 10; } // 契约卡 @@ -488,6 +592,10 @@ message ContractCard { int64 follow_display_end_duration = 9; // int32 is_play_display = 10; + // + int32 is_interact_display = 11; + // + bool play_display_switch = 12; } // @@ -534,17 +642,6 @@ message CustomConfig { string redirect_url = 1; } -// 分P弹幕信息 -message DM { - // 分P是否关闭弹幕 - // 0:正常 1:关闭 - bool closed = 1; - // - bool real_name = 2; - // 分P弹幕总数 - int64 count = 3; -} - // 枚举-文本类型 enum DescType { DescTypeUnknown = 0; // 占位 @@ -589,6 +686,17 @@ message DislikeReasons { string name = 5; } +// 分P弹幕信息 +message DM { + // 分P是否关闭弹幕 + // 0:正常 1:关闭 + bool closed = 1; + // + bool real_name = 2; + // 分P弹幕总数 + int64 count = 3; +} + // 错误代码 enum ECode { DEFAULT = 0; // 正常 @@ -615,7 +723,7 @@ message ElecRankItem { int64 mid = 4; } -//视频合集单话信息 +// 视频合集单话信息 message Episode { // 合集单话id int64 id = 1; @@ -639,6 +747,14 @@ message Episode { bilibili.app.archive.v1.Author author = 10; // string author_desc = 11; + // + BadgeStyle badge_style = 12; + // + bool need_pay = 13; + // + bool episode_pay = 14; + // + bool free_watch = 15; } // 播放器卡片曝光-请求 @@ -697,6 +813,22 @@ message FeedViewReq { string from_track_id = 10; } +// +message GoodsInfo { + // + string goods_id = 1; + // + int32 category = 2; + // + int64 goods_price = 3; + // + PayState pay_state = 4; + // + string goods_name = 5; + // + string price_fmt = 6; +} + // 稿件观看进度 message History { // 播放进度分P cid @@ -730,6 +862,14 @@ message Honor { string url_text = 10; } +// +message IconData { + // + string meta_json = 1; + // + string sprits_img = 2; +} + // message Interaction { // @@ -758,6 +898,10 @@ message Label { int64 icon_width = 5; // int64 icon_height = 6; + // + string lottie = 7; + // + string lottie_night = 8; } // @@ -772,6 +916,30 @@ message LikeCustom { int64 update_count = 4; } +// +message ListenerConfig { + // + int64 jump_style = 1; + // + ListenerGuideBar guide_bar = 2; +} + +// +message ListenerGuideBar { + // + int64 show_strategy = 1; + // + string icon = 2; + // + string text = 3; + // + string btn_text = 4; + // + int64 show_time = 5; + // + int64 background_time = 6; +} + // 直播信息 message Live { // 主播UID @@ -796,17 +964,50 @@ message LiveOrderInfo { bool is_follow = 4; } +// +message MaterialLeft { + // + string icon = 1; + // + string text = 2; + // + string url = 3; + // + string left_type = 4; + // + string param = 5; + // + string operational_type = 6; + // + string static_icon = 7; +} + +// +message MaterialRes { + // + int64 id = 1; + // + string icon = 2; + // + string url = 3; + // + int32 typ = 4; + // + string name = 5; + // + string bg_color = 6; + // + string bg_pic = 7; + // + int32 jump_type = 8; +} + // enum MaterialSource { Default = 0; BiJian = 1; } -// 空回复 -message NoReply { - -} - // message Node { // @@ -817,6 +1018,11 @@ message Node { int64 cid = 3; } +// 空回复 +message NoReply { + +} + // message Notice { // @@ -955,7 +1161,7 @@ message Order { string intro = 10; } -//游戏礼包信息 +// 游戏礼包信息 message PackInfo { // 礼包标题 string title = 1; @@ -963,6 +1169,12 @@ message PackInfo { string uri = 2; } +// +enum PayState { + PayStateUnknown = 0; // + PayStateActive = 1; // +} + // 卡片类型 enum PlayerCardType { PlayerCardTypeNone_VALUE = 0; // @@ -981,6 +1193,42 @@ message PlayerIcon { string url2 = 3; // 松手动画配置档hash string hash2 = 4; + // + string drag_left_png = 5; + // + string middle_png = 6; + // + string drag_right_png = 7; + // + IconData drag_data = 8; + // + IconData nodrag_data = 9; +} + +// +message PlayerRelatesReply { + // + repeated Relate list = 1; +} + +// +message PlayerRelatesReq { + // + int64 aid = 1; + // + string bvid = 2; + // + string from = 3; + // + string spmid = 4; + // + string from_spmid = 5; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 6; + // + string session_id = 7; + // + string from_track_id = 8; } // @@ -991,6 +1239,108 @@ message PointMaterial { int32 material_source = 2; } +// +message PowerIconStyle { + // + string icon_url = 1; + // + string icon_night_url = 2; + // + int64 icon_width = 3; + // + int64 icon_height = 4; +} + +// +message Premiere { + // + PremiereState premiere_state = 1; + // + int64 start_time = 2; + // + int64 service_time = 3; + // + int64 room_id = 4; +} + +// +message PremiereArchiveReply { + // + Premiere premiere = 1; + // + bool risk_status = 2; + // + string risk_reason = 3; +} + +// +message PremiereArchiveReq { + // + int64 aid = 1; +} + +// +message PremiereReserve { + // + int64 reserve_id = 1; + // + int64 count = 2; + // + bool is_follow = 3; +} + +// +message PremiereResource { + // + Premiere premiere = 1; + // + PremiereReserve reserve = 2; + // + PremiereText text = 3; +} + +// +enum PremiereState { + premiere_none = 0; // + premiere_before = 1; // + premiere_in = 2; // + premiere_after = 3; // +} + +// +message PremiereText { + // + string title = 1; + // + string subtitle = 2; + // + string online_text = 3; + // + string online_icon = 4; + // + string online_icon_dark = 5; + // + string intro_title = 6; + // + string intro_icon = 7; + // + string guidance_pulldown = 8; + // + string guidance_entry = 9; + // + string intro_icon_night = 10; +} + +// +message PullClientAction { + // + string type = 1; + // + bool pull_action = 2; + // + string params = 3; +} + // 排行榜 message Rank { // 排行榜icon @@ -1124,9 +1474,22 @@ message Relate { string unique_id = 32; // int64 material_id = 33; + // + int64 from_source_type = 34; + // + string from_source_id = 35; + // + bilibili.app.archive.v1.Dimension dimension = 36; + // + string cover = 37; + // + ReasonStyle badge_style = 38; + // + PowerIconStyle power_icon_style = 39; + // + string reserve_status_text = 40; } - // 相关推荐内容 message RelateItem { // 跳链 @@ -1135,6 +1498,44 @@ message RelateItem { string cover = 2; } +// +message RelatesFeedReply { + // + repeated Relate list = 1; + // + bool has_next = 2; +} + +// +message RelatesFeedReq { + // + int64 aid = 1; + // + string bvid = 2; + // + string from = 3; + // + string spmid = 4; + // + string from_spmid = 5; + // + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 6; + // + int64 relates_page = 7; + // + string session_id = 8; + // + int32 autoplay = 9; + // + string from_track_id = 10; + // + string biz_extra = 11; + // + int64 device_type = 12; + // + string ad_extra = 13; +} + // message RelateTab { // @@ -1163,6 +1564,22 @@ message ReqUser { int32 fav_season = 8; } +// +message ReserveReply { + // + int64 reserve_id = 1; +} + +// +message ReserveReq { + // + int64 reserve_id = 1; + // + int64 reserve_action = 2; + // + int64 up_id = 3; +} + // message Restriction { // @@ -1315,6 +1732,12 @@ message SpecialCell { string page_title = 11; // string jump_type = 12; + // + string end_icon = 13; + // + string end_icon_night = 14; + // + int64 notes_count = 15; } // 合作成员信息 @@ -1349,8 +1772,8 @@ message StandardCard { bool show_selected = 4; } -// 免流面板定制 -message TFPanelCustomized { +// 免流子面板定制化配置 +message subTFPanel { // 右侧按钮素材 string right_btn_img = 1; // 右侧按钮文案 @@ -1361,16 +1784,8 @@ message TFPanelCustomized { string right_btn_link = 4; // 中心主文案内容 string main_label = 5; - // 运营商(cm ct cu) + // 运营商 string operator = 6; - // 子面板定制化配置 - map sub_panel = 7; -} - -// TAG图标信息 -message TIcon { - // TAG图标url - string icon = 1; } // TAB @@ -1434,6 +1849,30 @@ message Tag { string tag_type = 8; } +// 免流面板定制 +message TFPanelCustomized { + // 右侧按钮素材 + string right_btn_img = 1; + // 右侧按钮文案 + string right_btn_text = 2; + // 右侧按钮字体颜色 + string right_btn_text_color = 3; + // 右侧按钮跳转链接 + string right_btn_link = 4; + // 中心主文案内容 + string main_label = 5; + // 运营商(cm ct cu) + string operator = 6; + // 子面板定制化配置 + map sub_panel = 7; +} + +// TAG图标信息 +message TIcon { + // TAG图标url + string icon = 1; +} + // UGC视频合集信息 message UgcSeason { // 合集id @@ -1466,6 +1905,16 @@ message UgcSeason { SeasonType season_type = 14; // bool show_continual_button = 15; + // + int64 ep_num = 16; + // + bool season_pay = 17; + // + GoodsInfo goods_info = 18; + // + ButtonStyle pay_button = 19; + // + string label_text_new = 20; } // ugc视频合集状态数 @@ -1518,6 +1967,8 @@ message UpLikeImg { string suc_img = 2; // string content = 3; + // + int64 type = 4; } // UP主信息 @@ -1536,6 +1987,8 @@ message UpperInfos { message UserGarb { // 点赞动画url string url_image_ani_cut = 1; + // + string like_toast = 2; } // 用户追番标志 @@ -1546,7 +1999,7 @@ message UserSeason { } // 视频引导信息 -message VideoGuide{ +message VideoGuide { // 关注按钮卡片 repeated Attention attention = 1; // 互动弹幕 @@ -1605,6 +2058,24 @@ message ViewMaterial { string jump_url = 5; } +// +message ViewMaterialReply { + // + repeated MaterialRes material_res = 1; + // + MaterialLeft material_left = 2; +} + +// +message ViewMaterialReq { + // + int64 aid = 1; + // + string bvid = 2; + // + int64 cid = 3; +} + // 分P信息 message ViewPage { // 分P基本信息 @@ -1753,6 +2224,20 @@ message ViewReply { Online online = 47; // google.protobuf.Any cm_under_player = 48; + // + repeated ViewMaterial video_source = 49; + // + repeated SpecialCell special_cell_new = 50; + // + PremiereResource premiere = 51; + // + bool refresh_special_cell = 52; + // + MaterialLeft material_left = 53; + // + int64 notes_count = 54; + // + PullClientAction pull_action = 55; } // 视频页详情页-请求 @@ -1791,6 +2276,34 @@ message ViewReq { string biz_extra = 16; // int64 device_type = 17; + // + int64 relates_page = 18; + // + string session_id = 19; + // + int32 in_feed_play = 20; + // + string play_mode = 21; +} + +// +message ViewTagReply { + // + repeated SpecialCell special_cell_new = 1; + // + MaterialLeft material_left = 2; +} + +// +message ViewTagReq { + // + int64 aid = 1; + // + string bvid = 2; + // + int64 cid = 3; + // + string spmid = 4; } // 会员信息 @@ -1822,19 +2335,3 @@ message VipLabel { // string label_theme = 3; } - -// 免流子面板定制化配置 -message subTFPanel { - // 右侧按钮素材 - string right_btn_img = 1; - // 右侧按钮文案 - string right_btn_text = 2; - // 右侧按钮字体颜色 - string right_btn_text_color = 3; - // 右侧按钮跳转链接 - string right_btn_link = 4; - // 中心主文案内容 - string main_label = 5; - // 运营商 - string operator = 6; -}