XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/bilibili-API-collect

update 【gRPC API】 proto files

990bb68
社会易姐QwQ <45892418+SocialSisterYi@users.noreply.github.com>
提交于

代码差异

2 个文件 +222 -88
Modified grpc_api/bilibili/community/service/dm/v1/dm.proto +168 -46
@@ -7,7 +7,7 @@ service DM {
7 7 // 获取分段弹幕
8 8 rpc DmSegMobile (DmSegMobileReq) returns (DmSegMobileReply);
9 9 // 客户端弹幕元数据 字幕、分段、防挡蒙版等
10 rpc DmView (DmViewReq) returns (DmViewReply);
10 rpc DmView(DmViewReq) returns (DmViewReply);
11 11 // 修改弹幕配置
12 12 rpc DmPlayerConfig (DmPlayerConfigReq) returns (Response);
13 13 // ott弹幕列表
@@ -15,7 +15,7 @@ service DM {
15 15 // SDK弹幕列表
16 16 rpc DmSegSDK(DmSegSDKReq) returns(DmSegSDKReply);
17 17 //
18 rpc DmExpoReport (DmExpoReportReq) returns (DmExpoReportRes);
18 rpc DmExpoReport(DmExpoReportReq) returns (DmExpoReportRes);
19 19 }
20 20
21 21 //
@@ -42,6 +42,27 @@ message Bubble {
42 42 string url = 2;
43 43 }
44 44
45 //
46 enum BubbleType {
47 BubbleTypeNone = 0; //
48 BubbleTypeClickButton = 1; //
49 BubbleTypeDmSettingPanel = 2; //
50 }
51
52 //
53 message BubbleV2 {
54 //
55 string text = 1;
56 //
57 string url = 2;
58 //
59 BubbleType bubble_type = 3;
60 //
61 bool exposure_once = 4;
62 //
63 ExposureType exposure_type = 5;
64 }
65
45 66 //
46 67 message Button {
47 68 //
@@ -91,6 +112,16 @@ enum CheckboxType {
91 112 CheckboxTypeColorDM = 2; //
92 113 }
93 114
115 //
116 message CheckBoxV2 {
117 //
118 string text = 1;
119 //
120 int32 type = 2;
121 //
122 bool default_value = 3;
123 }
124
94 125 //
95 126 message ClickButton {
96 127 //
@@ -109,6 +140,26 @@ message ClickButton {
109 140 Bubble bubble = 7;
110 141 }
111 142
143 //
144 message ClickButtonV2 {
145 //
146 repeated string portrait_text = 1;
147 //
148 repeated string landscape_text = 2;
149 //
150 repeated string portrait_text_focus = 3;
151 //
152 repeated string landscape_text_focus = 4;
153 //
154 int32 render_type = 5;
155 //
156 bool text_input_post = 6;
157 //
158 bool exposure_once = 7;
159 //
160 int32 exposure_type = 8;
161 }
162
112 163 // 互动弹幕条目信息
113 164 message CommandDm {
114 165 // 弹幕id
@@ -145,7 +196,7 @@ message DanmakuElem {
145 196 int64 id = 1;
146 197 // 弹幕出现位置(单位ms)
147 198 int32 progress = 2;
148 // 弹幕类型
199 // 弹幕类型 1 2 3:普通弹幕 4:底部弹幕 5:顶部弹幕 6:逆向弹幕 7:高级弹幕 8:代码弹幕 9:BAS弹幕(pool必须为2)
149 200 int32 mode = 3;
150 201 // 弹幕字号
151 202 int32 fontsize = 4;
@@ -157,11 +208,11 @@ message DanmakuElem {
157 208 string content = 7;
158 209 // 发送时间
159 210 int64 ctime = 8;
160 // 权重 区间:[1,10]
211 // 权重 用于屏蔽等级 区间:[1,10]
161 212 int32 weight = 9;
162 213 // 动作
163 214 string action = 10;
164 // 弹幕池
215 // 弹幕池 0:普通池 1:字幕池 2:特殊池(代码/BAS弹幕)
165 216 int32 pool = 11;
166 217 // 弹幕dmid str
167 218 string idStr = 12;
@@ -237,6 +288,12 @@ message DanmuPlayerConfig {
237 288 map<int32, int32> player_danmaku_ai_recommended_level_v2_map = 22; //
238 289 }
239 290
291 //
292 message DanmuPlayerConfigPanel {
293 //
294 string selection_text = 1;
295 }
296
240 297 // 弹幕显示区域自动配置
241 298 message DanmuPlayerDynamicConfig {
242 299 // 时间
@@ -253,6 +310,8 @@ message DanmuPlayerViewConfig {
253 310 DanmuPlayerConfig danmuku_player_config = 2;
254 311 // 弹幕显示区域自动配置列表
255 312 repeated DanmuPlayerDynamicConfig danmuku_player_dynamic_config = 3;
313 //
314 DanmuPlayerConfigPanel danmuku_player_config_panel = 4;
256 315 }
257 316
258 317 // web端用户弹幕配置
@@ -300,9 +359,7 @@ message DmExpoReportReq {
300 359 }
301 360
302 361 //
303 message DmExpoReportRes {
304
305 }
362 message DmExpoReportRes {}
306 363
307 364 // 修改弹幕配置-请求
308 365 message DmPlayerConfigReq {
@@ -453,6 +510,8 @@ message DmViewReply {
453 510 repeated PostPanel post_panel = 17;
454 511 //
455 512 repeated string activity_meta = 18;
513 //
514 repeated PostPanelV2 post_panel2 = 19;
456 515 }
457 516
458 517 // 客户端弹幕元数据-请求
@@ -471,6 +530,7 @@ message DmViewReq {
471 530 }
472 531
473 532 // web端弹幕元数据-响应
533 // https://api.bilibili.com/x/v2/dm/web/view
474 534 message DmWebViewReply {
475 535 // 是否已关闭弹幕
476 536 // 0:未关闭 1:已关闭
@@ -509,6 +569,12 @@ message ExpoReport {
509 569 bool should_report_at_end = 1;
510 570 }
511 571
572 //
573 enum ExposureType {
574 ExposureTypeNone = 0; //
575 ExposureTypeDMSend = 1; //
576 }
577
512 578 //
513 579 message Expression {
514 580 //
@@ -525,6 +591,12 @@ message Expressions {
525 591 repeated Expression data = 1;
526 592 }
527 593
594 // 是否开启弹幕
595 message InlinePlayerDanmakuSwitch {
596 //
597 bool value = 1;
598 }
599
528 600 //
529 601 message Label {
530 602 //
@@ -533,6 +605,18 @@ message Label {
533 605 repeated string content = 2;
534 606 }
535 607
608 //
609 message LabelV2 {
610 //
611 string title = 1;
612 //
613 repeated string content = 2;
614 //
615 bool exposure_once = 3;
616 //
617 int32 exposure_type = 4;
618 }
619
536 620 //
537 621 message Period {
538 622 //
@@ -541,44 +625,24 @@ message Period {
541 625 int64 end = 2;
542 626 }
543 627
544 // 是否开启弹幕
545 message InlinePlayerDanmakuSwitch {bool value = 1;}
546 // 智能云屏蔽等级
547 message PlayerDanmakuAiRecommendedLevel {bool value = 1;}
548 //
549 message PlayerDanmakuAiRecommendedLevelV2 {int32 value = 1;}
550 // 是否开启智能云屏蔽
551 message PlayerDanmakuAiRecommendedSwitch {bool value = 1;}
552 // 是否屏蔽底端弹幕
553 message PlayerDanmakuBlockbottom {bool value = 1;}
554 // 是否屏蔽彩色弹幕
555 message PlayerDanmakuBlockcolorful {bool value = 1;}
556 // 是否屏蔽重复弹幕
557 message PlayerDanmakuBlockrepeat {bool value = 1;}
558 // 是否屏蔽滚动弹幕
559 message PlayerDanmakuBlockscroll {bool value = 1;}
560 // 是否屏蔽高级弹幕
561 message PlayerDanmakuBlockspecial {bool value = 1;}
562 // 是否屏蔽顶端弹幕
563 message PlayerDanmakuBlocktop {bool value = 1;}
564 // 弹幕显示区域
565 message PlayerDanmakuDomain {float value = 1;}
566 // 是否开启屏蔽列表
567 message PlayerDanmakuEnableblocklist {bool value = 1;}
568 // 弹幕不透明度
569 message PlayerDanmakuOpacity {float value = 1;}
570 // 弹幕缩放比例
571 message PlayerDanmakuScalingfactor {float value = 1;}
572 //
573 message PlayerDanmakuSeniorModeSwitch {int32 value = 1;}
574 // 弹幕速度
575 message PlayerDanmakuSpeed {int32 value = 1;}
576 // 是否开启弹幕
577 message PlayerDanmakuSwitch {bool value = 1;bool canIgnore = 2;}
578 // 是否记录弹幕开关设置
579 message PlayerDanmakuSwitchSave {bool value = 1;}
580 // 是否使用推荐弹幕设置
581 message PlayerDanmakuUseDefaultConfig {bool value = 1;}
628 message PlayerDanmakuAiRecommendedLevel {bool value = 1;} // 智能云屏蔽等级
629 message PlayerDanmakuAiRecommendedLevelV2 {int32 value = 1;} //
630 message PlayerDanmakuAiRecommendedSwitch {bool value = 1;} // 是否开启智能云屏蔽
631 message PlayerDanmakuBlockbottom {bool value = 1;} // 是否屏蔽底端弹幕
632 message PlayerDanmakuBlockcolorful {bool value = 1;} // 是否屏蔽彩色弹幕
633 message PlayerDanmakuBlockrepeat {bool value = 1;} // 是否屏蔽重复弹幕
634 message PlayerDanmakuBlockscroll {bool value = 1;} // 是否屏蔽滚动弹幕
635 message PlayerDanmakuBlockspecial {bool value = 1;} // 是否屏蔽高级弹幕
636 message PlayerDanmakuBlocktop {bool value = 1;} // 是否屏蔽顶端弹幕
637 message PlayerDanmakuDomain {float value = 1;} // 弹幕显示区域
638 message PlayerDanmakuEnableblocklist {bool value = 1;} // 是否开启屏蔽列表
639 message PlayerDanmakuOpacity {float value = 1;} // 弹幕不透明度
640 message PlayerDanmakuScalingfactor {float value = 1;} // 弹幕缩放比例
641 message PlayerDanmakuSeniorModeSwitch {int32 value = 1;} //
642 message PlayerDanmakuSpeed {int32 value = 1;} // 弹幕速度
643 message PlayerDanmakuSwitch {bool value = 1; bool can_ignore = 2;} // 是否开启弹幕
644 message PlayerDanmakuSwitchSave {bool value = 1;} // 是否记录弹幕开关设置
645 message PlayerDanmakuUseDefaultConfig {bool value = 1;} // 是否使用推荐弹幕设置
582 646
583 647 //
584 648 message PostPanel {
@@ -612,6 +676,30 @@ enum PostPanelBizType {
612 676 PostPanelBizTypeRecommend = 5; //
613 677 }
614 678
679 //
680 message PostPanelV2 {
681 //
682 int64 start = 1;
683 //
684 int64 end = 2;
685 //
686 int32 biz_type = 3;
687 //
688 ClickButtonV2 click_button = 4;
689 //
690 TextInputV2 text_input = 5;
691 //
692 CheckBoxV2 check_box = 6;
693 //
694 ToastV2 toast = 7;
695 //
696 BubbleV2 bubble = 8;
697 //
698 LabelV2 label = 9;
699 //
700 int32 post_status = 10;
701 }
702
615 703 //
616 704 enum PostStatus {
617 705 PostStatusNormal = 0; //
@@ -695,6 +783,22 @@ message TextInput {
695 783 Label label = 8;
696 784 }
697 785
786 //
787 message TextInputV2 {
788 //
789 repeated string portrait_placeholder = 1;
790 //
791 repeated string landscape_placeholder = 2;
792 //
793 RenderType render_type = 3;
794 //
795 bool placeholder_post = 4;
796 //
797 repeated Avatar avatar = 5;
798 //
799 int32 text_input_limit = 6;
800 }
801
698 802 //
699 803 message Toast {
700 804 //
@@ -707,12 +811,30 @@ message Toast {
707 811 Button button = 4;
708 812 }
709 813
814 //
815 message ToastButtonV2 {
816 //
817 string text = 1;
818 //
819 int32 action = 2;
820 }
821
710 822 //
711 823 enum ToastFunctionType {
712 824 ToastFunctionTypeNone = 0; //
713 825 ToastFunctionTypePostPanel = 1; //
714 826 }
715 827
828 //
829 message ToastV2 {
830 //
831 string text = 1;
832 //
833 int32 duration = 2;
834 //
835 ToastButtonV2 toast_button_v2 = 3;
836 }
837
716 838 // 字幕作者信息
717 839 message UserInfo {
718 840 // 用户mid
Modified grpc_api/bilibili/main/community/reply/v1/reply.proto +54 -42
@@ -22,7 +22,7 @@ service Reply {
22 22 rpc AtSearch(AtSearchReq) returns (AtSearchReply);
23 23 // 查询单条评论接口
24 24 rpc ReplyInfo(ReplyInfoReq) returns (ReplyInfoReply);
25 //
25 // 用户回调上报接口
26 26 rpc UserCallback(UserCallbackReq) returns (UserCallbackReply);
27 27 // 评论分享材料接口
28 28 rpc ShareRepliesInfo(ShareRepliesInfoReq) returns (ShareRepliesInfoResp);
@@ -344,16 +344,28 @@ message MainListReq {
344 344
345 345 // 用户信息
346 346 message Member {
347 // 地区类型
348 enum RegionType {
349 DEFAULT = 0; // 默认
350 MAINLAND = 1; // 大陆地区
351 GAT = 2; //
352 }
347 353 //
354 enum ShowStatus {
355 SHOWDEFAULT = 0; // 默认
356 ZOOMINMAINLAND = 1; //
357 RAW = 2; //
358 }
359 // NFT地区
348 360 message Region {
349 //
350 int32 type = 1;
351 //
361 // 地区类型
362 RegionType type = 1;
363 // 角标url
352 364 string icon = 2;
353 365 //
354 int32 show_status = 3;
366 ShowStatus show_status = 3;
355 367 }
356 //
368 // NFT信息
357 369 message NftInteraction {
358 370 //
359 371 string itype = 1;
@@ -361,7 +373,7 @@ message Member {
361 373 string metadata_url = 2;
362 374 //
363 375 string nft_id = 3;
364 //
376 // NFT地区
365 377 Region region = 4;
366 378 }
367 379 /**********基础信息**********/
@@ -430,11 +442,11 @@ message Member {
430 442 int64 fans_guard_level = 29;
431 443 //
432 444 int32 face_nft = 30;
433 //
445 // 是否NFT头像
434 446 int32 face_nft_new = 31;
435 //
447 // 是否为硬核会员
436 448 int32 is_senior_member = 32;
437 //
449 // NFT信息
438 450 NftInteraction nft_interaction = 33;
439 451 //
440 452 string fans_guard_icon = 34;
@@ -522,22 +534,28 @@ message MemberV2 {
522 534 //
523 535 int64 level_bg_color = 11;
524 536 }
525 //
537 // 地区类型
526 538 enum RegionType {
527 DEFAULT = 0; //
528 MAINLAND = 1; //
539 DEFAULT = 0; // 默认
540 MAINLAND = 1; // 大陆地区
529 541 GAT = 2; //
530 542 }
531 543 //
544 enum ShowStatus {
545 SHOWDEFAULT = 0; //
546 ZOOMINMAINLAND = 1; //
547 RAW = 2; //
548 }
549 // NFT地区
532 550 message Region {
533 //
551 // 地区类型
534 552 RegionType type = 1;
535 //
553 // 角标url
536 554 string icon = 2;
537 555 //
538 int32 show_status = 3;
556 ShowStatus show_status = 3;
539 557 }
540 //
558 // NFT信息
541 559 message Interaction {
542 560 //
543 561 string itype = 1;
@@ -545,7 +563,7 @@ message MemberV2 {
545 563 string metadata_url = 2;
546 564 //
547 565 string nft_id = 3;
548 //
566 // NFT地区
549 567 Region region = 4;
550 568
551 569 }
@@ -563,17 +581,11 @@ message MemberV2 {
563 581 }
564 582 // 契约
565 583 message Contractor {
566 //
584 // 是否和up签订契约
567 585 bool is_contractor = 1;
568 //
586 // 契约显示文案
569 587 string contract_desc = 2;
570 588 }
571 //
572 enum ShowStatus {
573 SHOWDEFAULT = 0; //
574 ZOOMINMAINLAND = 1; //
575 RAW = 2; //
576 }
577 589 // 基本信息
578 590 Basic basic = 1;
579 591 // 认证信息
@@ -594,10 +606,10 @@ message MemberV2 {
594 606
595 607 // 排序方式
596 608 enum Mode {
597 DEFAULT = 0; //
598 UNSPECIFIED = 1; // 默认排序
609 DEFAULT = 0; //
610 UNSPECIFIED = 1; // 默认排序
599 611 MAIN_LIST_TIME = 2; // 按时间
600 MAIN_LIST_HOT = 3; // 按热度
612 MAIN_LIST_HOT = 3; // 按热度
601 613 }
602 614
603 615 //
@@ -714,7 +726,7 @@ message ReplyCardLabel {
714 726 string label_color_night = 5;
715 727 //
716 728 string image = 6;
717 //
729 // 标签类型 0:UP主觉得很赞 1:妙评
718 730 int32 type = 7;
719 731 // 背景url
720 732 string background = 8;
@@ -775,7 +787,7 @@ message ReplyControl {
775 787 string sub_reply_entry_text = 20;
776 788 // 子评论数文案 "相关回复共x条"
777 789 string sub_reply_title_text = 21;
778 //
790 // 契约显示文案
779 791 string contract_desc = 22;
780 792 // 发布时间文案 "x天前发布"
781 793 string time_desc = 23;
@@ -856,13 +868,13 @@ message RichText {
856 868
857 869 // 笔记
858 870 message RichTextNote {
859 //
871 // 预览文本
860 872 string summary = 1;
861 //
873 // 笔记预览图片url列表
862 874 repeated string images = 2;
863 //
875 // 笔记页面url
864 876 string click_url = 3;
865 //
877 // 发布日期 YYYY-mm-dd
866 878 string last_mtime_text = 4;
867 879 }
868 880
@@ -1146,11 +1158,11 @@ message Url {
1146 1158 string app_name = 5;
1147 1159 //
1148 1160 string app_package_name = 6;
1149 // 上报id
1161 // 点击上报数据
1150 1162 string click_report = 7;
1151 1163 // 是否半屏打开
1152 1164 bool is_half_screen = 8;
1153 //
1165 // 展现上报数据
1154 1166 string exposure_report = 9;
1155 1167 // 扩展字段
1156 1168 Extra extra = 10;
@@ -1169,20 +1181,20 @@ enum UserCallbackAction {
1169 1181 Dismiss = 0; //
1170 1182 }
1171 1183
1172 //
1184 // 用户回调上报-响应
1173 1185 message UserCallbackReply {}
1174 1186
1175 //
1187 // 用户回调上报-请求
1176 1188 message UserCallbackReq {
1177 //
1189 // 用户mid
1178 1190 int64 mid = 1;
1179 1191 //
1180 1192 UserCallbackScene scene = 2;
1181 1193 //
1182 1194 UserCallbackAction action = 3;
1183 //
1195 // 目标评论区id
1184 1196 int64 oid = 4;
1185 //
1197 // 目标评论区业务type
1186 1198 int64 type = 5;
1187 1199 }
1188 1200