From 07d0396bbc65e5ed9e6ccfe09c03a46977f06bc7 Mon Sep 17 00:00:00 2001 From: SocialSisterYi <45892418+SocialSisterYi@users.noreply.github.com> Date: Wed, 3 Feb 2021 00:02:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=90readme=E3=80=91=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E3=80=90=E5=AE=89=E5=8D=93=E7=AB=AF=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E3=80=91appsec=20=20=E6=B7=BB=E5=8A=A0=E5=A4=A7?= =?UTF-8?q?=E9=87=8F=E3=80=90proto=E7=BB=93=E6=9E=84=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 26 +- grpc_api/bilibili/account/fission/v1.proto | 62 + grpc_api/bilibili/ad/v1.proto | 632 +++++ grpc_api/bilibili/api/player/v1.proto | 103 + grpc_api/bilibili/api/probe/v1.proto | 84 + grpc_api/bilibili/app/archive/v1.proto | 243 ++ grpc_api/bilibili/app/archive_v1.proto | 102 - grpc_api/bilibili/app/card/v1.proto | 955 +++++++ grpc_api/bilibili/app/interfaces/v1.proto | 594 +++++ grpc_api/bilibili/app/playurl/v1.proto | 844 +++++++ grpc_api/bilibili/app/playurl_v1.proto | 213 -- grpc_api/bilibili/app/show/gateway/v1.proto | 27 + grpc_api/bilibili/app/show/popular/v1.proto | 139 + grpc_api/bilibili/app/show/rank/v1.proto | 146 ++ grpc_api/bilibili/app/show/region/v1.proto | 67 + grpc_api/bilibili/app/space/v1.proto | 139 + grpc_api/bilibili/app/splash/v1.proto | 180 ++ .../app/{view_v1.proto => view/v1.proto} | 2233 ++++++++++++----- grpc_api/bilibili/app/wall/v1.proto | 42 + .../bilibili/broadcast/message/main.proto | 189 ++ .../gateway/player/v1.proto} | 70 +- .../bilibili/community/service/dm/v1.proto | 387 +++ .../bilibili/main/community/reply/v1.proto | 774 ++++++ .../bilibili/main_community_reply_v1.proto | 340 --- grpc_api/bilibili/metadata/device.proto | 26 + grpc_api/bilibili/metadata/locale.proto | 30 +- grpc_api/bilibili/metadata/metadata.proto | 23 +- grpc_api/bilibili/metadata/network.proto | 58 +- grpc_api/bilibili/metadata/restriction.proto | 30 +- grpc_api/bilibili/pgc/gateway/player/v2.proto | 409 +++ grpc_api/bilibili/pgc/gateway_player_v2.proto | 245 -- grpc_api/bilibili/rpc.proto | 12 +- other/API_auth.md | 2 +- 33 files changed, 7848 insertions(+), 1578 deletions(-) create mode 100644 grpc_api/bilibili/account/fission/v1.proto create mode 100644 grpc_api/bilibili/ad/v1.proto create mode 100644 grpc_api/bilibili/api/player/v1.proto create mode 100644 grpc_api/bilibili/api/probe/v1.proto create mode 100644 grpc_api/bilibili/app/archive/v1.proto delete mode 100644 grpc_api/bilibili/app/archive_v1.proto create mode 100644 grpc_api/bilibili/app/card/v1.proto create mode 100644 grpc_api/bilibili/app/interfaces/v1.proto create mode 100644 grpc_api/bilibili/app/playurl/v1.proto delete mode 100644 grpc_api/bilibili/app/playurl_v1.proto create mode 100644 grpc_api/bilibili/app/show/gateway/v1.proto create mode 100644 grpc_api/bilibili/app/show/popular/v1.proto create mode 100644 grpc_api/bilibili/app/show/rank/v1.proto create mode 100644 grpc_api/bilibili/app/show/region/v1.proto create mode 100644 grpc_api/bilibili/app/space/v1.proto create mode 100644 grpc_api/bilibili/app/splash/v1.proto rename grpc_api/bilibili/app/{view_v1.proto => view/v1.proto} (51%) create mode 100644 grpc_api/bilibili/app/wall/v1.proto create mode 100644 grpc_api/bilibili/broadcast/message/main.proto rename grpc_api/bilibili/{cheese_gateway_player_v1.proto => cheese/gateway/player/v1.proto} (54%) create mode 100644 grpc_api/bilibili/community/service/dm/v1.proto create mode 100644 grpc_api/bilibili/main/community/reply/v1.proto delete mode 100644 grpc_api/bilibili/main_community_reply_v1.proto create mode 100644 grpc_api/bilibili/pgc/gateway/player/v2.proto delete mode 100644 grpc_api/bilibili/pgc/gateway_player_v2.proto diff --git a/README.md b/README.md index 42e0b5b..71ad38b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- +

哔哩哔哩-API收集整理

@@ -190,17 +190,27 @@ B站专栏同步推出[《B站api研究记》](https://www.bilibili.com/read/rea (重要的话说三遍,本人不承担任何责任) +**--Project_by [社会易姐QwQ](https://space.bilibili.com/293793435)** + +# 相关协议基础 + +http协议:[传送门](https://www.cnblogs.com/an-wen/p/11180076.html) + +json序列格式:[传送门](https://www.sojson.com/json/json_index.html) + +xml序列格式:[传送门](https://www.w3school.com.cn/xml/xml_intro.asp) + +protobuf序列格式:[传送门](https://www.jianshu.com/p/a24c88c0526a ) + +# 交流 + -**--by [社会易姐QwQ](https://space.bilibili.com/293793435)** +QQ粉丝交流群:[1136462265](https://jq.qq.com/?_wv=1027&k=s1M0LCcu) -备注: +B站空间:https://space.bilibili.com/293793435 -不了解http的请移步,[传送门](https://www.cnblogs.com/an-wen/p/11180076.html) - -不了解json的请移步,[传送门](https://www.sojson.com/json/json_index.html) - -不了解protobuf的请移步,[传送门](https://www.jianshu.com/p/a24c88c0526a ) +个人博客:https://shakaianee.top # 发电 diff --git a/grpc_api/bilibili/account/fission/v1.proto b/grpc_api/bilibili/account/fission/v1.proto new file mode 100644 index 0000000..915c3fb --- /dev/null +++ b/grpc_api/bilibili/account/fission/v1.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; + +package bilibili.account.fission.v1; + +//Fission裂变 +service Fission { + //活动入口 + // + rpc entrance (EntranceReq) returns (EntranceReply); + + //首页弹窗 + // + rpc window (WindowReq) returns (WindowReply); +} + +//活动入口-请求 +message EntranceReq { + +} + +//活动入口-回复 +message EntranceReply { + //展示图标 + string icon = 1; + + //活动名称 + string name = 2; + + //活动跳转链接 + string url = 3; + + //动画效果 + AnimateIcon animateIcon = 4; +} + +//首页弹窗-请求 +message WindowReq { + +} + +//首页弹窗-回复 +message WindowReply { + //弹窗类型 + //0:弹窗 + //1:普通页面 + int32 type = 1; + + //跳转链接 + string url = 2; + + // + string reportData = 3; +} + +// +message AnimateIcon { + //icon文件 + string icon = 1; + + //动效json文件 + string json = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/ad/v1.proto b/grpc_api/bilibili/ad/v1.proto new file mode 100644 index 0000000..4c44c36 --- /dev/null +++ b/grpc_api/bilibili/ad/v1.proto @@ -0,0 +1,632 @@ +syntax = "proto3"; + +package bilibili.ad.v1; + +import "google/protobuf/wrappers.proto"; + +// +message AdAutoPlayVideoDto { + //avid + int64 avid = 1; + + //cid + int64 cid = 2; + + //分P + int64 page = 3; + + // + string from = 4; + + //是否自动播放 + string url = 5; + + //是否自动播放 + string cover = 6; + + //是否自动播放 + bool autoPlay = 7; + + //按钮是否动态变色 + bool btnDycColor = 8; + + //按钮动态变色时间 ms + int32 btnDycTime = 9; + + //用于做联播是否是同一个视频的id + int64 bizId = 10; + + //开始播放三方监控 + repeated string process0Urls = 11; + + //播放3S三方监控 + repeated string play3SUrls = 12; + + //播放5S三方监控 + repeated string play5SUrls = 13; + + //横竖屏 + int32 orientation = 14; +} + +// +message AdBusinessMarkDto { + //商业标样式 + //0:不展示标 + //1:实心+文字 + //2:空心框+文字 + //3:纯文字标 + //4:纯图片标 + int32 type = 1; + + //商业标文案 + string text = 2; + + //商业标文案颜色,如#80FFFFFF RGBA + string textColor = 3; + + //夜间模式文字色 + string textColorNight = 4; + + //背景色 + string bgColor = 5; + + //夜间模式背景色 + string bgColorNight = 6; + + //边框色 + string borderColor = 7; + + //夜间模式边框色 + string borderColorNight = 8; + + //图片商业标 + string imgUrl = 9; + + //图片高度 + int32 imgHeight = 10; + + //图片宽度 + int32 imgWidth = 11; + + // + string bgBorderColor = 12; +} + +// +message AdButtonDto { + //类型 + //1:落地页 + //2:应用唤起 + //3:应用下载 + int32 type = 1; + + //按钮文案 + string text = 2; + + //按钮跳转地址 + string jumpUrl = 3; + + //跳转监测链接 + string reportUrls = 4; + + //唤起schema + string dlsucCallupUrl = 5; +} + +// +message AdCardDto { + //卡片类型 + int32 cardType = 1; + + //标题 + string title = 2; + + //描述 + string desc = 3; + + //额外描述 + string extraDesc = 4; + + //长描述 + string longDesc = 5; + + //短标题, 弹幕广告目录面板标题 + string shortTitle = 6; + + //弹幕/浮层广告的弹幕标题 + string danmuTitle = 7; + + //弹幕/浮层广告的弹幕高度,整型,分母为100 + int32 danmuHeight = 8; + + //弹幕/浮层广告的弹幕宽度,整型,分母为100 + int32 danmuWidth = 9; + + //弹幕/浮层广告生存时间,单位为毫秒 + int32 danmuLife = 10; + + //弹幕/浮层开始时间,单位为毫秒 + int32 danmuBegin = 11; + + //背景色值(含透明度)如#80FFFFFF + string danmuColor = 12; + + //弹幕/浮层广告H5落地页 + string danmuH5Url = 13; + + //弹幕/浮层 广告icon + string danmuIcon = 14; + + //折叠时间,永驻浮层折叠时间,单位为毫秒 + int32 foldTime = 15; + + //广告标文案 + string adTag = 16; + + //cover数组 + repeated AdCoverDto covers = 17; + + //卡片跳转链接 + string jumpUrl = 18; + + // + string imaxLandingPageJsonString = 19; + + //app唤起schema + string callupUrl = 20; + + //univeral link域名 + string universalApp = 21; + + //原价, 单位为分 + string oriPrice = 22; + + //现价, 同上 + int32 curPrice = 23; + + //券后/现价 价格描述 + string priceDesc = 24; + + //价格单位符号 + string priceSymbol = 25; + + //券后价格 "1000" + string goodsCurPrice = 26; + + //原价 "¥1002" + string goodsOriPrice = 27; + + //开放平台商品 + AdGoodDto good = 28; + + //打分? 满分为100 + int32 rank = 29; + + //热度 + int32 hotScore = 30; + + //按钮 + AdButtonDto button = 31; + + //广告主logo + string adverLogo = 32; + + //广告主name + string adverName = 33; + + //广告主主页链接 + string adverPageUrl = 34; + + //视频弹幕,视频广告用 + repeated string videoBarrage = 35; + + //商业标信息 + AdBusinessMarkDto adTagStyle = 36; + + //自动播放视频 + AdAutoPlayVideoDto video = 37; + + //反馈面板功能模块,屏蔽、投诉、广告介绍 + AdFeedbackPanelDto feedbackPanel = 38; + + // + int64 adverMid = 39; + + // + int64 adverAccountId = 40; + + // + string duration = 41; + + // + repeated QualityInfo qualityInfos = 42; + + // + string dynamicText = 43; + + // + AdverDto adver = 44; +} + +// +message AdContentExtraDto { + //动态布局 + string layout = 1; + + //展现监控url + repeated string showUrls = 2; + + //点击监控url + repeated string clickUrls = 3; + + //弹幕创意列表展示第三方上报 + repeated string danmuListShowUrls = 4; + + //弹幕创意列表点击第三方上报 + repeated string danmuListClickUrls = 5; + + //弹幕详情页展示第三方上报 + repeated string danmuDetailShowUrls = 6; + + //弹幕商品添加购物车第三方上报 + repeated string danmuTrolleyAddUrls = 7; + + //useWebView默认false + bool useAdWebV2 = 8; + + //app唤起白名单 + repeated string openWhitelist = 9; + + //app下载白名单 + AppPackageDto downloadWhitelist = 10; + + //卡片相关信息 + AdCardDto card = 11; + + //视频播放和弹幕播放上报控制时间 ms + int32 reportTime = 12; + + //是否优先唤起app store + int32 appstorePriority = 13; + + //广告售卖类型 + int32 salesType = 14; + + //落地页是否预加载 + int32 preloadLandingpage = 15; + + //是否需要展示风险行业提示 + bool specialIndustry = 16; + + //风险行业提示 + string specialIndustryTips = 17; + + //是否展示下载弹框 + bool enableDownloadDialog = 18; + + //是否允许分享 + bool enableShare = 19; + + //个人空间广告入口类型 + //1:橱窗 + //2:商品店铺 + //3:小程序 + int32 upzoneEntranceType = 20; + + //个人空间广告入口上报id,橱窗id(当前用Mid)、店铺id或者小程序id + int32 upzoneEntranceReportId = 21; + + //分享数据 + AdShareInfoDto shareInfo = 22; + + //topview图片链接,闪屏预下载用 + string topviewPicUrl = 23; + + //topview视频链接,闪屏预下载用 + string topviewVideoUrl = 24; + + //点击区域 + //0:表示banner可点击 + //1:表示素材可点击 + int32 clickArea = 25; + + // + int64 shopId = 26; + + // + int64 upMid = 27; + + // + string trackId = 28; + + // + int32 enableStoreDirectLaunch = 29; +} + +// +message AdCoverDto { + //图片链接 + string url = 1; + + //动图循环次数 + //0:无限循环 + int32 loop = 2; + + //图片点击跳转地址,截至目前为空 + string jumpUrl = 3; + + //跳转监测链接, 数组,单个图片的监控,出区别于click_urls,应前端要求。(此字段截至目前为空,使用时需再次确认) + repeated string reportUrls = 4; + + //图片高度 + int32 imageHeight = 5; + + //图片宽度 + int32 imageWidth = 6; +} + +// +message AdDto { + //广告创意ID + int64 creativeId = 1; + + //广告闭环上报回传数据 + string adCb = 2; + + //额外广告数据 + AdContentExtraDto extra = 3; + + //广告标记 + int32 cmMark = 4; + + // + int64 topViewId = 5; + + // + int32 creativeType = 6; + + // + int32 cardType = 7; + + // + int32 creativeStyle = 8; + + // + int32 isAd = 9; + + // + CreativeDto creativeContent = 10; +} + +// +message AdFeedbackPanelDto { + //面板类型,广告、推广 + string panelTypeText = 1; + + //反馈面版信息 + repeated AdFeedbackPanelModuleDto feedbackPanelDetail = 2; +} + +// +message AdFeedbackPanelModuleDto { + //模块id + int32 moduleId = 1; + + //icon url + string iconUrl = 2; + + //跳转类型 + //1:气泡 + //2:H5 + int32 jumpType = 3; + + //跳转地址 + string jumpUrl = 4; + + //文案 + string text = 5; + + //二级文案数组 + AdSecondFeedbackPanelDto secondaryPanel = 6; +} + +// +message AdGoodDto { + //电商商品ID + int64 itemId = 1; + + //电商SKU ID + int64 skuId = 2; + + //店铺ID + int64 shopId = 3; + + //SKU库存 + int64 skuNum = 4; +} + +// +message AdOgvEpDto { + //分集epid + int64 epid = 1; + + //是否显示 "荐" + bool hasRecommend = 2; +} + +// +message AdSecondFeedbackPanelDto { + //屏蔽理由id + int32 reasonId = 1; + + //理由文案 + string text = 2; +} + +// +message AdShareInfoDto { + //分享标题 + string title = 1; + + //分享副标题 + string subtitle = 2; + + //分享图片url + string imageUrl = 3; +} + +// +message AdsControlDto { + //视频是否有弹幕,如有,需请求弹幕广告 + int32 hasDanmu = 1; + + //有弹幕的分P视频的cid + repeated int64 cids = 2; + + //有弹幕的ogv ep + repeated AdOgvEpDto eps = 3; +} + +// +message AdverDto { + // + int64 adverId = 1; + + // + string adverLogo = 2; + + // + string adverName = 3; + + // + int32 adverType = 4; + + // + string adverPageUrl = 5; + + // + string adverDesc = 6; +} + +// +message AppPackageDto { + //包大小, 单位bytes + int64 size = 1; + + // + string displayName = 2; + + // + string apkName = 3; + + //url + string url = 4; + + //bili schema url + string biliUrl = 5; + + //包md5 + string md5 = 6; + + //包icon + string icon = 7; + + // + string devName = 8; + + // + string authUrl = 9; + + // + string authName = 10; + + // + string version = 11; + + // + string updateTime = 12; +} + +// +message CreativeDto { + // + string title = 1; + + // + string description = 2; + + // + string imageUrl = 3; + + // + string imageMd5 = 4; + + // + string url = 5; + + // + string clickUrl = 6; + + // + string showUrl = 7; + + // + int64 videoId = 8; + + // + string thumbnailUrl = 9; + + // + string thumbnailUrlMd5 = 10; + + // + string logoUrl = 11; + + // + string logoMd5 = 12; + + // + string username = 13; +} + +// +message QualityInfo { + // + string icon = 1; + + // + string text = 2; +} + +// +message SourceContentDto { + //广告请求ID + string requestId = 1; + + //广告资源位source ID + int32 sourceId = 2; + + //广告资源位resource ID + int32 resourceId = 3; + + //广告位上报标记,对广告返回数据恒为true + bool isAdLoc = 4; + + //0:内容 + //1:广告 + //与天马现有逻辑一致, 0有含义 + google.protobuf.Int32Value serverType = 5; + + //客户端IP回传拼接 + string clientIp = 6; + + //广告卡片位置在一刷中的位置, 天马用, 0有含义 + google.protobuf.Int32Value cardIndex = 7; + + //广告资源位source 位次 + int32 index = 8; + + //广告内容 + AdDto adContent = 9; +} \ No newline at end of file diff --git a/grpc_api/bilibili/api/player/v1.proto b/grpc_api/bilibili/api/player/v1.proto new file mode 100644 index 0000000..7169715 --- /dev/null +++ b/grpc_api/bilibili/api/player/v1.proto @@ -0,0 +1,103 @@ +syntax = "proto3"; + +package bilibili.api.player.v1; + +// +service Heartbeat { + // + // + rpc mobile (HeartbeatReq) returns (HeartbeatReply); +} + +//-请求 +message HeartbeatReq { + // + int64 serverTime = 1; + + // + string session = 2; + + // + int64 mid = 3; + + // + int64 aid = 4; + + // + int64 cid = 5; + + // + string sid = 6; + + // + int64 epid = 7; + + // + string type = 8; + + // + int32 subType = 9; + + // + int32 quality = 10; + + // + int64 totalTime = 11; + + // + int64 pausedTime = 12; + + // + int64 playedTime = 13; + + // + int64 videoDuration = 14; + + // + string playType = 15; + + // + int64 networkType = 16; + + // + int64 lastPlayProgressTime = 17; + + // + int64 maxPlayProgressTime = 18; + + // + int32 from = 19; + + // + string fromSpmid = 20; + + // + string spmid = 21; + + // + string epidStatus = 22; + + // + string playStatus = 23; + + // + string userStatus = 24; + + // + int64 actualPlayedTime = 25; + + // + int32 autoPlay = 26; + + // + int64 listPlayTime = 27; + + // + int64 detailPlayTime = 28; +} + +//-回复 +message HeartbeatReply { + // + int64 ts = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/api/probe/v1.proto b/grpc_api/bilibili/api/probe/v1.proto new file mode 100644 index 0000000..c507107 --- /dev/null +++ b/grpc_api/bilibili/api/probe/v1.proto @@ -0,0 +1,84 @@ +syntax = "proto3"; + +package bilibili.api.probe.v1; + +// +service Probe { + // + // + rpc testCode (CodeReq) returns (CodeReply); + + // + // + rpc testReq (ProbeReq) returns (ProbeReply); + + // + // + rpc testStream (ProbeStreamReq) returns (ProbeStreamReply); + + // + // + rpc testSub (ProbeSubReq) returns (ProbeSubReply); +} + +//-请求 +message CodeReq { + // + int64 code = 1; +} + +//-回复 +message CodeReply { + +} + +//-请求 +message ProbeReq { + // + int64 mid = 1; + + // + string buvid = 2; +} + +//-回复 +message ProbeReply { + // + string content = 1; + + // + int64 timestamp = 2; +} + +//-请求 +message ProbeStreamReq { + // + int64 mid = 1; + + // + int64 sequence = 2; +} + +//-回复 +message ProbeStreamReply { + // + int64 sequence = 1; + + // + int64 timestamp = 2; + + // + string content = 3; +} + +//-请求 +message ProbeSubReq { + // + int64 buvid = 1; +} + +//-回复 +message ProbeSubReply { + // + int64 messageId = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/archive/v1.proto b/grpc_api/bilibili/app/archive/v1.proto new file mode 100644 index 0000000..faeea04 --- /dev/null +++ b/grpc_api/bilibili/app/archive/v1.proto @@ -0,0 +1,243 @@ +//稿件信息v1模块 +syntax = "proto3"; + +package bilibili.app.archive.v1; + +//稿件基本信息 +message Arc{ + //稿件avid + int64 aid = 1; + + //稿件分P数 + int64 videos = 2; + + //分区tid + int32 typeId = 3; + + //二级分区名 + string typeName = 4; + + //稿件版权 + //1:原创 2:转载 + int32 copyright = 5; + + //稿件封面url + string pic = 6; + + //稿件标题 + string title = 7; + + //稿件发布时间 + int64 pubdate = 8; + + //用户投稿时间 + int64 ctime = 9; + + //稿件简介 + string desc = 10; + + //稿件状态 + int32 state = 11; + + //访问属性 + //0:全部可见 10000:登录可见 + int32 access = 12; + + //属性位配置 + int32 attribute = 13; + + //空 + string tag = 14; + + //空 + repeated string tags = 15; + + //稿件总时长 + int64 duration = 16; + + //参与的活动id + int64 missionId = 17; + + //绑定的商单id + int64 orderId = 18; + + //pgc稿件强制重定向url + string redirectUrl = 19; + + //??? + int64 forward = 20; + + //控制标志 + Rights rights = 21; + + //UP主信息 + Author author = 22; + + //状态数 + Stat stat = 23; + + //??? + string reportResult = 24; + + //投稿时发送的动态内容 + string dynamic = 25; + + //稿件1P cid + int64 firstCid = 26; + + //稿件1P 分辨率 + Dimension dimension = 27; + + //合作组成员列表 + repeated StaffInfo staffInfo = 28; + + //ugc合集id + int64 seasonId = 29; + + //新版属性位配置 + int64 attributeV2 = 30; +} + +//作者信息 +message Author{ + //UID + int64 mid = 1; + + //昵称 + string name = 2; + + //头像url + string face = 3; +} + +//分辨率信息 +message Dimension{ + //宽度 + int64 width = 1; + + //高度 + int64 height = 2; + + //方向 + //0:横屏 1:竖屏 + int64 rotate = 3; +} + +//分P视频 +message Page{ + //视频cid + int64 cid = 1; + + //分P序号 + int32 page = 2; + + //源类型 + //vupload:B站 qq:腾讯 hunan:芒果 + string from = 3; + + //分P标题 + string part = 4; + + //分P时长 + int64 duration = 5; + + //外链vid + string vid = 6; + + //分P简介 + string desc = 7; + + //外链url + string webLink = 8; + + //分P分辨率 + Dimension dimension = 9; +} + +//稿件控制标志 +message Rights{ + //老版是否付费 + int32 bp = 1; + + //允许充电 + int32 elec = 2; + + //允许下载 + int32 download = 3; + + //是否电影 + int32 movie = 4; + + //pgc稿件需要付费 + int32 pay = 5; + + //是否高码率 + int32 hd5 = 6; + + //是否显示禁止转载标志 + int32 noReprint = 7; + + //是否允许自动播放 + int32 autoplay = 8; + + //ugc稿件需要付费 + int32 ugcPay = 9; + + //是否合作视频 + int32 isCooperation = 10; + + //是否ugc付费预览 + int32 ugcPayPreview = 11; + + //是否禁止后台播放 + int32 noBackground = 12; +} + +//合作成员信息 +message StaffInfo{ + //成员UID + int64 mid = 1; + + //成员角色 + string title = 2; + + //属性位 + int64 attribute = 3; +} + +//状态数 +message Stat{ + //稿件avid + int64 aid = 1; + + //播放数 + int32 view = 2; + + //弹幕数 + int32 danmaku = 3; + + //评论数 + int32 reply = 4; + + //收藏数 + int32 fav = 5; + + //投币数 + int32 coin = 6; + + //分享数 + int32 share = 7; + + //当前排名 + int32 nowRank = 8; + + //历史最高排名 + int32 hisRank = 9; + + //点赞数 + int32 like = 10; + + //点踩数 + //前端恒为0 + int32 dislike = 11; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/archive_v1.proto b/grpc_api/bilibili/app/archive_v1.proto deleted file mode 100644 index 5d02699..0000000 --- a/grpc_api/bilibili/app/archive_v1.proto +++ /dev/null @@ -1,102 +0,0 @@ -//稿件信息v1模块 -syntax = "proto3"; -package bilibili.app.archive.v1; - -//用户信息 -message Author{ - int64 mid = 1;//UID - string name = 2;//昵称 - string face = 3;//头像url -} - -//分辨率信息 -message Dimension{ - int64 width = 1;//宽 - int64 height = 2;//高 - int64 rotate = 3;//旋转 -} - -//分P视频 -message Page{ - int64 cid = 1;//cid - int32 page = 2;//分P - string from = 3;//源类型 - string part = 4; - int64 duration = 5; - string vid = 6; - string desc = 7; - string webLink = 8; - Dimension dimension = 9;//分辨率 -} - -//允许配置 -message Rights{ - int32 bp = 1; - int32 elec = 2; - int32 download = 3; - int32 movie = 4; - int32 pay = 5; - int32 hd5 = 6; - int32 noReprint = 7; - int32 autoplay = 8; - int32 ugcPay = 9; - int32 isCooperation = 10; - int32 ugcPayPreview = 11; - int32 noBackground = 12; -} - -//合作成员 -message StaffInfo{ - int64 mid = 1;//UID - string title = 2;//成员备注 - int64 attribute = 3;// -} - -//状态数 -message Stat{ - int64 aid = 1;//avid - int32 view = 2;//播放 - int32 danmaku = 3;//弹幕 - int32 reply = 4;//评论 - int32 fav = 5;//收藏 - int32 coin = 6;//投币 - int32 share = 7;//分享 - int32 nowRank = 8;//当前排名 - int32 hisRank = 9;//历史最好排名 - int32 like = 10;//点赞 - int32 dislike = 11;//点踩 -} - -//稿件基本信息 -message Arc{ - int64 aid = 1; //稿件avid - int64 videos = 2; //稿件分P数 - int32 typeId = 3; //分区tid - string typeName = 4; //子分区名 - int32 copyright = 5; //稿件类型 - string pic = 6; //稿件封面url - string title = 7; //稿件标题 - int64 pubdate = 8; - int64 ctime = 9; - string desc = 10; //简介 - int32 state = 11; //稿件状态 - int32 access = 12; - int32 attribute = 13; //属性位配置 - string tag = 14; - repeated string tags = 15; - int64 duration = 16; //总时长 - int64 missionId = 17; //参与的活动id - int64 orderId = 18; - string redirectUrl = 19; //重定向url - int64 forward = 20; - Rights rights = 21; - Author author = 22; //UP主信息 - Stat stat = 23; //状态数 - string reportResult = 24; - string dynamic = 25; //动态内容 - int64 firstCid = 26; //1P cid - Dimension dimension = 27; //1P 分辨率 - repeated StaffInfo staffInfo = 28; //合作组成员列表 - int64 seasonId = 29; - int64 attributeV2 = 30; -} \ No newline at end of file diff --git a/grpc_api/bilibili/app/card/v1.proto b/grpc_api/bilibili/app/card/v1.proto new file mode 100644 index 0000000..f17e832 --- /dev/null +++ b/grpc_api/bilibili/app/card/v1.proto @@ -0,0 +1,955 @@ +syntax = "proto3"; + +package bilibili.app.card.v1; + +message AdInfo { + // + int64 creativeId = 1; + + // + int32 creativeType = 2; + + // + int32 cardType = 3; + + // + CreativeContent creativeContent = 4; + + // + string adCb = 5; + + // + int64 resource = 6; + + // + int32 source = 7; + + // + string requestId = 8; + + // + bool isAd = 9; + + // + int64 cmMark = 10; + + // + int32 index = 11; + + // + bool isAdLoc = 12; + + // + int32 cardIndex = 13; + + // + string clientIp = 14; + + // + bytes extra = 15; + + // + int32 creativeStyle = 16; +} + +// +message Args { + // + int32 type = 1; + + // + int64 upId = 2; + + // + string upName = 3; + + // + int32 rid = 4; + + // + string rname = 5; + + // + int64 tid = 6; + + // + string tname = 7; + + // + string trackId = 8; + + // + string state = 9; + + // + int32 convergeType = 10; + + // + int64 aid = 11; +} + +// +message Avatar { + // + string cover = 1; + + // + string text = 2; + + // + string uri = 3; + + // + int32 type = 4; + + // + string event = 5; + + // + string eventV2 = 6; + + // + int32 defalutCover = 7; +} + +// +message Base { + // + string cardType = 1; + + // + string cardGoto = 2; + + // + string goto = 3; + + // + string param = 4; + + // + string cover = 5; + + // + string title = 6; + + // + string uri = 7; + + // + ThreePoint threePoint = 8; + + // + Args args = 9; + + // + PlayerArgs playerArgs = 10; + + // + int64 idx = 11; + + // + AdInfo adInfo = 12; + + // + Mask mask = 13; + + // + string fromType = 14; + + // + repeated ThreePointV2 threePointV2 = 15; + + // + repeated ThreePointV3 threePointV3 = 16; + + // + Button descButton = 17; + + // + ThreePointV4 threePointV4 = 18; +} + +// +message Bubble { + // + string bubbleContent = 1; + + // + int32 version = 2; + + // + int64 stime = 3; +} + +// +message Button { + // + string text = 1; + + // + string param = 2; + + // + string uri = 3; + + // + string event = 4; + + // + int32 selected = 5; + + // + int32 type = 6; + + // + string eventV2 = 7; + + // + Relation relation = 8; +} + +// +message Card { + oneof itemCase { + // + SmallCoverV5 smallCoverV5 = 1; + + // + LargeCoverV1 largeCoverV1 = 2; + + // + ThreeItemAllV2 threeItemAllV2 = 3; + + // + ThreeItemV1 threeItemV1 = 4; + + // + HotTopic hotTopic = 5; + + // + DynamicHot dynamicHot = 6; + + // + MiddleCoverV3 middleCoverV3 = 7; + + // + LargeCoverV4 largeCoverV4 = 8; + + // + PopularTopEntrance popularTopEntrance = 9; + + // + RcmdOneItem rcmdOneItem = 10; + } +} + +// +message CreativeContent { + // + string title = 1; + + // + string description = 2; + + // + int64 videoId = 3; + + // + string username = 4; + + // + string imageUrl = 5; + + // + string imageMd5 = 6; + + // + string logUrl = 7; + + // + string logMd5 = 8; + + // + string url = 9; + + // + string clickUrl = 10; + + // + string showUrl = 11; +} + +// +message DislikeReason { + // + int64 id = 1; + + // + string name = 2; +} + +// +message DynamicHot { + // + Base base = 1; + + // + string topLeftTitle = 2; + + // + string desc1 = 3; + + // + string desc2 = 4; + + // + string moreUri = 5; + + // + string moreText = 6; + + // + repeated string covers = 7; + + // + string coverRightText = 8; + + // + ReasonStyle topRcmdReasonStyle = 9; +} + +// +message EntranceItem { + // + string goto = 1; + + // + string icon = 2; + + // + string title = 3; + + // + string moduleId = 4; + + // + string uri = 5; + + // + int64 entranceId = 6; + + // + Bubble bubble = 7; + + // + int32 entranceType = 8; +} + +// +message HotTopic { + // + Base base = 1; + + // + string desc = 2; + + // + repeated HotTopicItem items = 3; +} + +// +message HotTopicItem { + // + string cover = 1; + + // + string uri = 2; + + // + string param = 3; + + // + string name = 4; +} + +// +message HotwordEntrance { + // + int64 hotwordId = 1; + + // + string hotText = 2; + + // + string h5Url = 3; + + // + string icon = 4; +} + +// +message LargeCoverV1 { + // + Base base = 1; + + // + string coverGif = 2; + + // + Avatar avatar = 3; + + // + string coverLeftText1 = 4; + + // + string coverLeftText2 = 5; + + // + string coverLeftText3 = 6; + + // + string coverBadge = 7; + + // + string topRcmdReason = 8; + + // + string bottomRcmdReason = 9; + + // + string desc = 10; + + // + int32 officialIcon = 11; + + // + int32 canPlay = 12; + + // + ReasonStyle topRcmdReasonStyle = 13; + + // + ReasonStyle bottomRcmdReasonStyle = 14; + + // + ReasonStyle rcmdReasonStyleV2 = 15; + + // + ReasonStyle leftCoverBadgeStyle = 16; + + // + ReasonStyle rightCoverBadgeStyle = 17; + + // + string coverBadge2 = 18; + + // + LikeButton likeButton = 19; + + // + int32 titleSingleLine = 20; + + // + string coverRightText = 21; +} + +// +message LargeCoverV4 { + // + Base base = 1; + + // + string coverLeftText1 = 2; + + // + string coverLeftText2 = 3; + + // + string coverLeftText3 = 4; + + // + string coverBadge = 5; + + // + int32 canPlay = 6; + + // + Up up = 7; + + // + string shortLink = 8; + + // + string shareSubtitle = 9; + + // + string playNumber = 10; + + // + string bvid = 11; + + // + string subParam = 12; +} + +// +message LikeButton { + // + int64 aid = 1; + + // + int32 count = 2; + + // + bool showCount = 3; + + // + string event = 4; + + // + int32 selected = 5; + + // + string eventV2 = 6; +} + +// +message Mask { + // + Avatar avatar = 1; + + // + Button button = 2; +} + +// +message MiddleCoverV3 { + // + Base base = 1; + + // + string desc1 = 2; + + // + string desc2 = 3; + + // + ReasonStyle coverBadgeStyle = 4; +} + +// +message PlayerArgs { + // + int32 isLive = 1; + + // + int64 aid = 2; + + // + int64 cid = 3; + + // + int32 subType = 4; + + // + int64 roomId = 5; + + // + int64 epId = 7; + + // + int32 isPreview = 8; + + // + string type = 9; + + // + int64 duration = 10; + + // + int64 seasonId = 11; +} + +// +message PopularTopEntrance { + // + Base base = 1; + + // + repeated EntranceItem items = 2; +} + +// +message RcmdOneItem { + // + Base base = 1; + + // + ReasonStyle topRcmdReasonStyle = 2; + + // + SmallCoverRcmdItem item = 3; +} + +// +message ReasonStyle { + // + string text = 1; + + // + string textColor = 2; + + // + string bgColor = 3; + + // + string borderColor = 4; + + // + string iconUrl = 5; + + // + string textColorNight = 6; + + // + string bgColorNight = 7; + + // + string borderColorNight = 8; + + // + string iconNightUrl = 9; + + // + int32 bgStyle = 10; + + // + string uri = 11; + + // + string iconBgUrl = 12; + + // + string event = 13; + + // + string eventV2 = 14; + + // + int32 rightIconType = 15; + + // + string leftIconType = 16; +} + +// +message Relation { + // + int32 status = 1; + + // + int32 isFollow = 2; + + // + int32 isFollowed = 3; +} + +// +message SharePlane { + // + string title = 1; + + // + string shareSubtitle = 2; + + // + string desc = 3; + + // + string cover = 4; + + // + int64 aid = 5; + + // + string bvid = 6; + + // + map shareTo = 7; + + // + string author = 8; + + // + int64 authorId = 9; + + // + string shortLink = 10; + + // + string playNumber = 11; +} + +// +message SmallCoverRcmdItem { + // + string title = 1; + + // + string cover = 2; + + // + string uri = 3; + + // + string param = 4; + + // + string goto = 5; + + // + string coverRightText1 = 6; + + // + string rightDesc1 = 7; + + // + string rightDesc2 = 8; + + // + string coverGif = 9; + + // + int32 rightIcon1 = 10; + + // + int32 rightIcon2 = 11; +} + +// +message SmallCoverV5 { + // + Base base = 1; + + // + string coverGif = 2; + + // + Up up = 3; + + // + string coverRightText1 = 4; + + // + string rightDesc1 = 5; + + // + string rightDesc2 = 6; + + // + ReasonStyle rcmdReasonStyle = 7; + + // + HotwordEntrance hotwordEntrance = 8; + + // + ReasonStyle cornerMarkStyle = 9; + + // + int32 rightIcon1 = 10; + + // + int32 rightIcon2 = 11; + + // + ReasonStyle leftCornerMarkStyle = 12; +} + +// +message ThreeItemAllV2 { + // + Base base = 1; + + // + ReasonStyle topRcmdReasonStyle = 2; + + // + repeated TwoItemHV1Item item = 3; +} + +// +message ThreeItemV1 { + // + Base base = 1; + + // + int32 titleIcon = 2; + + // + string moreUri = 3; + + // + string moreText = 4; + + // + repeated ThreeItemV1Item items = 5; +} + +// +message ThreeItemV1Item { + // + Base base = 1; + + // + string coverLeftText = 2; + + // + int32 coverLeftIcon = 3; + + // + string desc1 = 4; + + // + string desc2 = 5; + + // + string badge = 6; +} + +// +message ThreePoint { + // + repeated DislikeReason dislikeReasons = 1; + + // + repeated DislikeReason feedbacks = 2; + + // + int32 watchLater = 3; +} + +// +message ThreePointV2 { + // + string title = 1; + + // + string subtitle = 2; + + // + repeated DislikeReason reasons = 3; + + // + string type = 4; + + // + int64 id = 5; +} + +// +message ThreePointV3 { + // + string title = 1; + + // + string selectedTitle = 2; + + // + string subtitle = 3; + + // + repeated DislikeReason reasons = 4; + + // + string type = 5; + + // + int64 id = 6; + + // + int32 selected = 7; + + // + string icon = 8; + + // + string selectedIcon = 9; + + // + string url = 10; + + // + int32 defaultId = 11; +} + +// +message ThreePointV4 { + // + SharePlane sharePlane = 1; + + // + WatchLater watchLater = 2; +} + +// +message TwoItemHV1Item { + // + string title = 1; + + // + string cover = 2; + + // + string uri = 3; + + // + string param = 4; + + // + Args args = 5; + + // + string goto = 6; + + // + string coverLeftText1 = 7; + + // + int32 coverLeftIcon1 = 8; + + // + string coverRightText = 9; +} + +// +message Up { + // + int64 id = 1; + + // + string name = 2; + + // + string desc = 3; + + // + Avatar avatar = 4; + + // + int32 officialIcon = 5; + + // + Button descButton = 6; + + // + string cooperation = 8; +} + +// +message WatchLater { + // + int64 aid = 1; + + // + string bvid = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/interfaces/v1.proto b/grpc_api/bilibili/app/interfaces/v1.proto new file mode 100644 index 0000000..eb76884 --- /dev/null +++ b/grpc_api/bilibili/app/interfaces/v1.proto @@ -0,0 +1,594 @@ +syntax = "proto3"; + +package bilibili.app.interfaces.v1; + +import "bilibili/app/playurl/v1.proto"; + +//历史记录接口 +service History { + //搜索历史记录 + //https://app.bilibili.com/bilibili.app.interface.v1.History/Search + rpc search (SearchReq) returns (SearchReply); + + //? + //https://app.bilibili.com/bilibili.app.interface.v1.History/LatestHistory + rpc latestHistory (LatestHistoryReq) returns (LatestHistoryReply); + + //获取历史记录业务类型 + //https://app.bilibili.com/bilibili.app.interface.v1.History/HistoryTab + rpc historyTab (HistoryTabReq) returns (HistoryTabReply); + + //删除历史记录 + //https://app.bilibili.com/bilibili.app.interface.v1.History/Delete + rpc delete (DeleteReq) returns (NoReply); + + //获取历史记录列表v2接口 + //https://app.bilibili.com/bilibili.app.interface.v1.History/CursorV2 + rpc cursorV2 (CursorV2Req) returns (CursorV2Reply); + + //获取历史记录列表v1接口 + //https://app.bilibili.com/bilibili.app.interface.v1.History/Cursor + rpc cursor (CursorReq) returns (CursorReply); + + //清空历史记录 + //https://app.bilibili.com/bilibili.app.interface.v1.History/Clear + rpc clear (ClearReq) returns (NoReply); +} + +//搜索接口 +service Search { + //获取搜索建议 + //https://app.bilibili.com/bilibili.app.interface.v1.Search/Suggest3 + rpc suggest3 (SuggestionResult3Req) returns (SuggestionResult3Reply); +} + +//搜索历史记录-请求 +message SearchReq { + //关键词 + string keyword = 1; + + //页码 + int64 pn = 2; + + //业务选择 + string business = 3; +} + +//搜索历史记录-回复 +message SearchReply { + //历史记录条目列表 + repeated CursorItem items = 1; + + //是否未拉取完 + bool hasMore = 2; + + //页面信息 + Page page = 3; +} + +//?-请求 +message LatestHistoryReq { + //业务选择 + string business = 1; + + //视频预加载配置 + PlayerPreloadParams playerPreload = 2; +} + +//?-回复 +message LatestHistoryReply { + //历史记录条目 + CursorItem items = 1; + + // + string scene = 2; +} + +//获取历史记录业务类型-请求 +message HistoryTabReq { + // + string business = 1; + + // + HistorySource source = 2; + + // + string keyword = 3; +} + +//获取历史记录业务类型-回复 +message HistoryTabReply { + // + repeated CursorTab tab = 1; +} + +//删除历史记录-请求 +message DeleteReq { + //历史记录信息 + HisInfo hisInfo = 1; +} + +//获取历史记录列表v2接口-请求 +message CursorV2Req { + //游标信息 + Cursor cursor = 1; + + //业务选择 + string business = 2; + + //视频预加载配置 + PlayerPreloadParams playerPreload = 3; + + // + bilibili.app.playurl.v1.PlayerArgs playerArgs = 4; +} + +//获取历史记录列表v2接口-回复 +message CursorV2Reply { + //历史记录条目列表 + repeated CursorItem items = 1; + + //游标信息 + Cursor cursor = 2; + + //是否未拉取完 + bool hasMore = 3; +} + +//获取历史记录列表v1接口-请求 +message CursorReq { + //游标信息 + Cursor cursor = 1; + + //业务选择 + string business = 2; + + //视频预加载配置 + PlayerPreloadParams playerPreload = 3; +} + +//获取历史记录列表v1接口-回复 +message CursorReply { + //历史记录条目列表 + repeated CursorItem items = 1; + + //业务类型表 + repeated CursorTab tab = 2; + + //游标信息 + Cursor cursor = 3; + + //是否未拉取完 + bool hasMore = 4; +} + +//清空历史记录-请求 +message ClearReq { + //业务选择 + string business = 1; +} + +//空回复 +message NoReply { + +} + +//获取搜索建议-请求 +message SuggestionResult3Req { + //关键字 + string keyword = 1; + + //是否语法高亮 + int32 highlight = 2; + + //是否青少年模式 + int32 teenagersMode = 3; +} + +//获取搜索建议-回复 +message SuggestionResult3Reply { + //搜索追踪id + string trackid = 1; + + //搜索建议条目列表 + repeated ResultItem list = 2; + + // + string expStr = 3; +} + +//专栏条目类型 +message CardArticle { + //封面uel + repeated string covers = 1; + + //作者昵称 + string name = 2; + + //作者UID + int64 mid = 3; + + // + bool displayAttention = 4; + + //标志名 + string badge = 5; + + // + Relation relation = 6; +} + +//课程条目类型 +message CardCheese { + //封面url + string cover = 1; + + //观看进度 + int64 progress = 2; + + //总计时长 + int64 duration = 3; + + //单集标题 + string subtitle = 4; +} + +//直播条目类型 +message CardLive { + //封面url + string cover = 1; + + //主播昵称 + string name = 2; + + //主播UID + int64 mid = 3; + + //直播分区名 + string tag = 4; + + // + int32 ststus = 5; + + // + bool displayAttention = 6; + + // + Relation relation = 7; +} + +//pgc稿件条目类型 +message CardOGV { + //封面url + string cover = 1; + + //观看进度 + int64 progress = 2; + + //总计时长 + int64 duration = 3; + + //单集标题 + string subtitle = 4; +} + +//ugc稿件条目类型 +message CardUGC { + //封面url + string cover = 1; + + //观看进度 + int64 progress = 2; + + //视频长度 + int64 duration = 3; + + //UP主昵称 + string name = 4; + + //UP主UID + int64 mid = 5; + + // + bool displayAttention = 6; + + //观看视频cid + int64 cid = 7; + + //观看视频分P + int32 page = 8; + + // + string subtitle = 9; + + // + Relation relation = 10; + + //稿件bvid + string bvid = 11; + + //总分P数 + int64 videos = 12; + + //短链接 + string shortLink = 13; + + //副标题文案 + string shareSubtitle = 14; + + //播放数 + int64 view = 15; +} + +//游标信息 +message Cursor { + //起始时间戳 + int64 max = 1; + + // + int32 maxTp = 2; +} + +//历史记录条目 +message CursorItem { + //主体数据 + oneof cardItemCase { + //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; + + //业务类型 + string business = 11; + + //业务类型代码 + int32 tp = 12; + + //设备标识 + DeviceType dt = 13; + + // + bool hasShare = 14; +} + +//业务分类表 +message CursorTab { + //业务名 + string business = 1; + + //名称 + string name = 2; + + //路由uri + string router = 3; + + // + bool focus = 4; +} + +//设备标识代码 +enum DT { + //未知 + Unknown_VALUE = 0; + + //手机端 + Phone_VALUE = 1; + + //ipad端 + Pad_VALUE = 2; + + //web端 + PC_VALUE = 3; +} + +//设备标识 +message DeviceType { + //设备标识代码 + DT type = 1; + + //图标url + string icon = 2; +} + +//历史记录信息 +message HisInfo { + //业务选择 + string business = 1; + + //历史记录id + int64 kid = 2; +} + +// +enum HistorySource { + // + history_VALUE = 0; + + // + shopping_VALUE = 1; +} + +// +message OfficialVerify { + // + int32 type = 1; + + // + string desc = 2; +} + +//页面信息 +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 ReasonStyle { + // + string text = 1; + + // + string textColor = 2; + + // + string textColorNight = 3; + + // + string bgColor = 4; + + // + string bgColorNight = 5; + + // + string borderColor = 6; + + // + string borderColorNight = 7; + + // + int32 bgStyle = 8; +} + +// +message Relation { + // + int32 status = 1; + + // + int32 isFollow = 2; + + // + int32 isFollowed = 3; +} + +//搜索建议条目 +message ResultItem { + //来源 + string from = 1; + + //显示结果(语法高亮) + string title = 2; + + //结果 + string keyword = 3; + + //序号 + int32 position = 4; + + // + string cover = 5; + + // + double coverSize = 6; + + // + string sugType = 7; + + // + int32 termType = 8; + + // + string goto = 9; + + // + string uri = 10; + + // + OfficialVerify officialVerify = 11; + + // + string param = 12; + + // + int64 mid = 13; + + // + int32 fans = 14; + + // + int32 level = 15; + + // + int32 archives = 16; + + // + int64 ptime = 17; + + // + 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; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/playurl/v1.proto b/grpc_api/bilibili/app/playurl/v1.proto new file mode 100644 index 0000000..9b8f7a3 --- /dev/null +++ b/grpc_api/bilibili/app/playurl/v1.proto @@ -0,0 +1,844 @@ +//APP端视频播放v1接口 +syntax = "proto3"; + +package bilibili.app.playurl.v1; + +// +service PlayURL { + //获取播放界面配置 + //https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayConf + rpc playConf (PlayConfReq) returns (PlayConfReply); + + // + // + rpc playConfEdit (PlayConfEditReq) returns (PlayConfEditReply); + + //视频url + // + rpc playURL (PlayURLReq) returns (PlayURLReply); + + //视频播放业务数据 + //https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayView + rpc playView (PlayViewReq) returns (PlayViewReply); + + // + // + rpc project (ProjectReq) returns (ProjectReply); +} + +//获取播放界面配置-请求 +message PlayConfReq { + +} + +//获取播放界面配置-回复 +message PlayConfReply { + //播放控件用户自定义配置 + PlayAbilityConf playConf = 1; +} + +//-请求 +message PlayConfEditReq { + // + repeated PlayConfState playConf = 1; +} + +//-回复 +message PlayConfEditReply { + +} + +//视频url-请求 +message PlayURLReq { + //稿件avid + int64 aid = 1; + + //视频cid + int64 cid = 2; + + //清晰度 + int64 qn = 3; + + //流类型 + int32 fnver = 4; + + // + int32 fnval = 5; + + //下载模式 + //0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + + //流url强制是用域名 + //0:允许使用ip 1:使用http 2:使用https + int32 forceHost = 7; + + //允许4K + bool fourk = 8; + + // + string spmid = 9; + + // + string fromSpmid = 10; +} + +//视频url-回复 +message PlayURLReply { + // + uint32 quality = 1; + + // + string format = 2; + + // + uint64 timelength = 3; + + // + uint32 videoCodecid = 4; + + // + uint32 fnver = 5; + + // + uint32 fnval = 6; + + // + bool videoProject = 7; + + // + repeated ResponseUrl durl = 8; + + // + ResponseDash dash = 9; + + // + int32 noRexcode = 10; + + // + UpgradeLimit upgradeLimit = 11; + + // + repeated FormatDescription supportFormats = 12; + + // + VideoType type = 13; +} + +//-请求 +message PlayViewReq { + //稿件avid + int64 aid = 1; + + //视频cid + int64 cid = 2; + + //清晰度 + int64 qn = 3; + + //流类型 + int32 fnver = 4; + + // + int32 fnval = 5; + + //下载模式 + //0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + + //流url强制是用域名 + //0:允许使用ip 1:使用http 2:使用https + int32 forceHost = 7; + + //允许4K + bool fourk = 8; + + // + string spmid = 9; + + // + string fromSpmid = 10; + + // + int32 teenagersMode = 11; + + // + CodeType preferCodecType = 12; +} + +//-回复 +message PlayViewReply { + //视频流信息 + VideoInfo info = 1; + + //播放控件用户自定义配置 + PlayAbilityConf PlayConf = 2; + + //互动视频升级提示 + UpgradeLimit upgradeLimit = 3; + + // + Chronos chronos = 4; + + //播放控件稿件配置 + PlayArcConf playArc = 5; + + //事件 + Event event = 6; +} + +//-请求 +message ProjectReq { + //稿件avid + int64 aid = 1; + + //视频cid + int64 cid = 2; + + //清晰度 + int64 qn = 3; + + //流类型 + int32 fnver = 4; + + // + int32 fnval = 5; + + //下载模式 + //0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + + //流url强制是用域名 + //0:允许使用ip 1:使用http 2:使用https + int32 forceHost = 7; + + //允许4K + bool fourk = 8; + + // + string spmid = 9; + + // + string fromSpmid = 10; + + // + int32 protocol = 11; + + // + int32 deviceType = 12; +} + +//-回复 +message ProjectReply { + // + PlayURLReply project = 1; +} + +//配置项 +message ArcConf { + //是否开启 + bool isSupport=1; +} + +// +message Chronos { + // + string md5=1; + + // + string file=2; +} + +// +message CloudConf { + // + bool show = 1; + + // + ConfType confType = 2; + + // + FieldValue fieldValue = 3; +} + +// +enum CodeType { + // + NOCODE_VALUE = 0; + + // + CODE264_VALUE = 1; + + // + CODE265_VALUE = 2; +} + +// +enum ConfType { + // + NoType_VALUE = 0; + + // + FLIPCONF_VALUE = 1; + + // + CASTCONF_VALUE = 2; + + // + FEEDBACK_VALUE = 3; + + // + SUBTITLE_VALUE = 4; + + // + PLAYBACKRATE_VALUE = 5; + + // + TIMEUP_VALUE = 6; + + // + PLAYBACKMODE_VALUE = 7; + + // + SCALEMODE_VALUE = 8; + + // + BACKGROUNDPLAY_VALUE = 9; + + // + LIKE_VALUE = 10; + + // + DISLIKE_VALUE = 11; + + // + COIN_VALUE = 12; + + // + ELEC_VALUE = 13; + + // + SHARE_VALUE = 14; + + // + SCREENSHOT_VALUE = 15; + + // + LOCKSCREEN_VALUE = 16; + + // + RECOMMEND_VALUE = 17; + + // + PLAYBACKSPEED_VALUE = 18; + + // + DEFINITION_VALUE = 19; + + // + SELECTIONS_VALUE = 20; + + // + NEXT_VALUE = 21; + + // + EDITDM_VALUE = 22; + + // + SMALLWINDOW_VALUE = 23; + + // + SHAKE_VALUE = 24; + + // + OUTERDM_VALUE = 25; + + // + INNERDM_VALUE = 26; + + // + PANORAMA_VALUE = 27; + + // + DOLBY_VALUE = 28; +} + +// +message DashItem { + // + uint32 id=1; + + //主线流 + string baseUrl=2; + + //备用流 + repeated string backupUrl=3; + + //带宽 + uint32 bandwidth=4; + + // + uint32 codecid=5; + + //md5 + string md5=6; + + //大小 + uint64 size=7; +} + +//dash视频流 +message DashVideo{ + //主线流 + string baseUrl=1; + + //备用流 + repeated string backupUrl=2; + + //带宽 + uint32 bandwidth=3; + + // + uint32 codecid=4; + + //md5 + string md5=5; + + //大小 + uint64 size=6; + + // + uint32 audioId=7; + + //是否非全二压 + bool noRexcode=8; +} + +//杜比音频信息 +message DolbyItem{ + // + int32 type=1; + + //音频流 + DashItem audio=2; +} + +//事件 +message Event{ + //震动 + Shake shake=1; +} + +// +message FieldValue { + // + oneof valueCase { + // + bool value = 1; + } +} + +// +message FormatDescription { + // + int32 quality = 1; + + // + string format = 2; + + // + string description = 3; + + // + string newDescription = 4; + + // + string displayDesc = 5; + + // + string superscript = 6; +} + +//播放控件用户自定义配置 +message PlayAbilityConf{ + // + bool backgroundPlayDisable=1; + + // + bool flipDisable=2; + + // + bool castDisable=3; + + // + bool feedbackDisable=4; + + // + bool subtitleDisable=5; + + // + bool playbackRateDisable=6; + + // + bool timeUpDisable=7; + + // + bool playbackModeDisable=8; + + // + bool scaleModeDisable=9; + + // + bool likeDisable=10; + + // + bool dislikeDisable=11; + + // + bool coinDisable=12; + + // + bool elecDisable=13; + + // + bool shareDisable=14; + + // + bool screenShotDisable=15; + + // + bool lockScreenDisable=16; + + // + bool recommendDisable=17; + + // + bool playbackSpeedDisable=18; + + // + bool definitionDisable=19; + + // + bool selectionsDisable=20; + + // + bool nextDisable=21; + + // + bool editDmDisable=22; + + // + bool smallWindowDisable=23; + + // + bool shakeDisable=24; + + // + bool outerDmDisable=25; + + // + bool innerDmDisable=26; + + // + bool freyaEnterDisable=27; + + // + bool dolbyDisable=28; +} + +//播放控件稿件配置 +message PlayArcConf{ + //后台播放 + ArcConf backgroundPlayConf=1; + + //镜像反转 + ArcConf flipConf=2; + + //投屏 + ArcConf castConf=3; + + //反馈 + ArcConf feedbackConf=4; + + //字幕 + ArcConf subtitleConf=5; + + //播放速度 + ArcConf playbackRateConf=6; + + //定时停止 + ArcConf timeUpConf=7; + + //播放方式 + ArcConf playbackModeConf=8; + + //画面尺寸 + ArcConf scaleModeConf=9; + + //赞 + ArcConf likeConf=10; + + //踩 + ArcConf dislikeConf=11; + + //投币 + ArcConf coinConf=12; + + //充电 + ArcConf elecConf=13; + + //分享 + ArcConf shareConf=14; + + //截图 + ArcConf screenShotConf=15; + + //锁定 + ArcConf lockScreenConf=16; + + //相关推荐 + ArcConf recommendConf=17; + + //播放速度 + ArcConf playbackSpeedConf=18; + + //清晰度 + ArcConf definitionConf=19; + + //选集 + ArcConf selectionsConf=20; + + //下一集 + ArcConf nextConf=21; + + //编辑弹幕 + ArcConf editDmConf=22; + + //小窗 + ArcConf smallWindowConf=23; + + //震动 + ArcConf shakeConf=24; + + // + ArcConf outerDmConf=25; + + // + ArcConf innerDmConf=26; + + // + ArcConf freyaEnterConf=27; + + // + ArcConf dolbyConf=28; +} + +// +message PlayConfState { + // + ConfType confType = 1; + + // + bool show = 2; + + // + FieldValue fieldValue = 3; +} + +// +enum PlayErr { + // + NoErr_VALUE = 0; + + // + WithMultiDeviceLoginErr_VALUE = 1; +} + +// +message PlayerArgs { + // + int64 qn = 1; + + // + int64 fnver = 2; + + // + int64 fnval = 3; + + // + int64 forceHost = 4; +} + +// +message ResponseDash { + // + repeated DashItem video = 1; + + // + repeated DashItem audio = 2; +} + +//分段流条目 +message ResponseUrl{ + //分段序号 + uint32 order = 1; + + //分段时长 + uint64 length = 2; + + //分段大小 + uint64 size = 3; + + //主线流 + string url = 4; + + //备用流 + repeated string backupUrl = 5; + + //md5 + string md5 = 6; +} + +//分段视频流 +message SegmentVideo{ + //分段视频流列表 + repeated ResponseUrl segment=1; +} + +//震动 +message Shake{ + // + string file=1; +} + +//视频流信息 +message Stream{ + //元数据 + StreamInfo info=1; + + // + oneof contentCase { + //dash流 + DashVideo dashvideo=2; + + //分段流 + SegmentVideo segmentvideo=3; + } +} + +//流媒体元数据 +message StreamInfo{ + //清晰度 qn + uint32 quality=1; + + //格式 + string format=2; + + //格式描述 + string description=3; + + //错误码 + uint32 errCode=4; + + //不满足条件信息 + Limit limit=5; + + //是否需要vip + bool needVip=6; + + //是否需要登录 + bool needLogin=7; + + //是否完整 + bool intact=8; + + //是否非全二压 + bool noRexcode=9; + + // + int64 attribute=10; + + //新版格式描述 + string newDescription=11; + + //格式文字 + string displayDesc=12; + + //新版格式描述备注 + string superscript=13; +} + +//不满足条件信息 +message Limit{ + // + string title=1; + + // + string uri=2; + + // + string msg=3; +} + +// +message UpgradeButton { + // + string title = 1; + + // + string link = 2; +} + +//互动视频升级提示 +message UpgradeLimit{ + //错误码 + int32 code =1; + + //错误信息 + string message =2; + + //图片url + string image =3; + + //按钮信息 + UpgradeButton button=4; +} + +//视频url信息 +message VideoInfo{ + //视频清晰度 + uint32 quality=1; + + //视频格式 + string format=2; + + //视频时长 + uint64 timelength=3; + + // + uint32 videoCodecid=4; + + //视频流 + repeated Stream streamList=5; + + //伴音流 + repeated DashItem audio=6; + + //杜比伴音流 + DolbyItem dolby=7; +} + +// +enum VideoType { + // + Unknown_VALUE = 0; + + // + FLV_VALUE = 1; + + // + DASH_VALUE = 2; + + // + MP4_VALUE = 3; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/playurl_v1.proto b/grpc_api/bilibili/app/playurl_v1.proto deleted file mode 100644 index 55d942d..0000000 --- a/grpc_api/bilibili/app/playurl_v1.proto +++ /dev/null @@ -1,213 +0,0 @@ -//APP端视频播放v1接口 -syntax = "proto3"; -package bilibili.app.playurl.v1; - -message VideoInfo{ - message stream{ - message streamInfo{ - message Limit{ - string title=1; - string uri=2; - string msg=3; - } - uint32 quality=1;//清晰度 - string format=2;//格式 - string description=3;//格式描述 - uint32 errCode=4; - Limit limit=5; - bool needVip=6;//需要vip - bool needLogin=7;//需要登录 - bool intact=8; - bool noRexcode=9; - int64 attribute=10; - string newDescription=11;//新版格式描述 - string displayDesc=12;//格式文字 - string superscript=13;//新版格式描述备注 - } - message DashVideo{ - string baseUrl=1;//主线流 - repeated string backupUrl=2;//备用流 - uint32 bandwidth=3;//带宽 - uint32 codecid=4; - string md5=5;//md5 - uint64 size=6;//大小 - uint32 audioId=7; - bool noRexcode=8; - } - message SegmentVideo{ - message ResponseUrl{ - uint32 order=1; - uint64 length=2; - uint64 size=3; - string url=4; - repeated string backupUrl=5; - string md5=6; - } - repeated ResponseUrl segment=1; - } - streamInfo info=1;//元数据 - DashVideo dashvideo=2;//dash流 - SegmentVideo segmentvideo=3;//flv流 - } - message DashAudio{ - uint32 id=1; - string baseUrl=2;//主线流 - repeated string backupUrl=3;//备用流 - uint32 bandwidth=4;//带宽 - uint32 codecid=5;// - string md5=6;//md5 - uint64 size=7;//大小 - } - message DolbyItem{ - int32 type=1; - DashAudio audio=2; - } - uint32 quality=1;//视频清晰度 - string format=2;//视频格式 - uint64 timelength=3;//视频时长 - uint32 videoCodecid=4;// - repeated stream streamList=5;//视频流 - repeated DashAudio audio=6;//伴音流 - DolbyItem dolby=7;//杜比伴音流 -} - -message PlayAbilityConf{ - bool backgroundPlayDisable=1; - bool flipDisable=2; - bool castDisable=3; - bool feedbackDisable=4; - bool subtitleDisable=5; - bool playbackRateDisable=6; - bool timeUpDisable=7; - bool playbackModeDisable=8; - bool scaleModeDisable=9; - bool likeDisable=10; - bool dislikeDisable=11; - bool coinDisable=12; - bool elecDisable=13; - bool shareDisable=14; - bool screenShotDisable=15; - bool lockScreenDisable=16; - bool recommendDisable=17; - bool playbackSpeedDisable=18; - bool definitionDisable=19; - bool selectionsDisable=20; - bool nextDisable=21; - bool editDmDisable=22; - bool smallWindowDisable=23; - bool shakeDisable=24; - bool outerDmDisable=25; - bool innerDmDisable=26; - bool freyaEnterDisable=27; - bool dolbyDisable=28; -} - -message UpgradeLimit{ - message Report{ - string showEventId=1; - string clickEventId=2; - string extends=3; - } - message ButtonInfo{ - message BadgeInfo{ - string text=1; - string bgColor=2; - string bgColorNight=3; - } - string text=1; - string textColor=2; - string textColorNight=3; - string bgColor=4; - string bgColorNight=5; - string link=6; - string actionType=7; - BadgeInfo badgeInfo=8; - Report report=9; - } - int32 code =1; - string message =2; - string image =3; - ButtonInfo button=4; -} - -message Chronos{ - string md5=1; - string file=2; -} - -message PlayArcConf{ - message ArcConf{ - bool isSupport=1; - } - ArcConf backgroundPlayConf=1; - ArcConf flipConf=2; - ArcConf castConf=3; - ArcConf feedbackConf=4; - ArcConf subtitleConf=5; - ArcConf playbackRateConf=6; - ArcConf timeUpConf=7; - ArcConf playbackModeConf=8; - ArcConf scaleModeConf=9; - ArcConf likeConf=10; - ArcConf dislikeConf=11; - ArcConf coinConf=12; - ArcConf elecConf=13; - ArcConf shareConf=14; - ArcConf screenShotConf=15; - ArcConf lockScreenConf=16; - ArcConf recommendConf=17; - ArcConf playbackSpeedConf=18; - ArcConf definitionConf=19; - ArcConf selectionsConf=20; - ArcConf nextConf=21; - ArcConf editDmConf=22; - ArcConf smallWindowConf=23; - ArcConf shakeConf=24; - ArcConf outerDmConf=25; - ArcConf innerDmConf=26; - ArcConf freyaEnterConf=27; - ArcConf dolbyConf=28; -} - -message Event{ - message Shake{ - string file=1; - } - Shake shake=1; -} - -//获取视频url -//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayView -//请求 -message PlayURLReq{ - int64 aid = 1; //avid - int64 cid = 2; //cid - int64 qn = 3; //清晰度 - int32 fnver = 4; //流类型 - int32 fnval = 5; - uint32 download = 6; //下载配置 0:播放 1:flv下载 2:dash下载 - int32 forceHost = 7; - bool fourk = 8; //是否4K - string spmid = 9; - string fromSpmid = 10; -} -//回复 -message PlayViewReply{ - VideoInfo info = 1; //视频信息 - PlayAbilityConf PlayConf = 2; //播放界面配置 - UpgradeLimit upgradeLimit = 3; - Chronos chronos = 4; - PlayArcConf playArc = 5; - Event event = 6; -} - -//获取播放界面配置 -//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayConf -//请求 -message PlayConfReq{ - -} -//回复 -message PlayConfReply{ - PlayAbilityConf playConf = 1; -} \ No newline at end of file diff --git a/grpc_api/bilibili/app/show/gateway/v1.proto b/grpc_api/bilibili/app/show/gateway/v1.proto new file mode 100644 index 0000000..b74d25e --- /dev/null +++ b/grpc_api/bilibili/app/show/gateway/v1.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package bilibili.app.show.gateway.v1; + +import "bilibili/broadcast/message/main.proto"; + +// +service AppShow { + // + // + rpc getActProgress (GetActProgressReq) returns (GetActProgressReply); +} + +//-请求 +message GetActProgressReq { + // + int64 pageID = 1; + + // + int64 mid = 2; +} + +//-回复 +message GetActProgressReply { + // + bilibili.broadcast.message.main.NativePageEvent event = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/show/popular/v1.proto b/grpc_api/bilibili/app/show/popular/v1.proto new file mode 100644 index 0000000..3a189a9 --- /dev/null +++ b/grpc_api/bilibili/app/show/popular/v1.proto @@ -0,0 +1,139 @@ +syntax = "proto3"; + +package bilibili.app.show.popular.v1; + +import "bilibili/app/playurl/v1.proto"; +import "bilibili/app/card/v1.proto"; + +// +service Popular { + // + // + rpc index (PopularResultReq) returns (PopularReply); +} + +//-请求 +message PopularResultReq { + // + int64 idx = 1; + + // + int32 loginEvent = 2; + + // + int32 qn = 3; + + // + int32 fnver = 4; + + // + int32 fnval = 5; + + // + int32 forceHost = 6; + + // + int32 fourk = 7; + + // + sfixed32 spmid = 8; + + // + sfixed32 lastParam = 9; + + // + sfixed32 ver = 10; + + // + int64 entranceId = 11; + + // + sfixed32 locationIds = 12; + + // + int32 sourceId = 13; + + // + int32 flush = 14; + + // + bilibili.app.playurl.v1.PlayerArgs playerArgs = 15; +} + +//-回复 +message PopularReply { + // + repeated bilibili.app.card.v1.Card items = 1; + + // + Config config = 2; + + // + string ver = 3; +} + +// +message Bubble { + // + string bubbleContent = 1; + + // + int32 version = 2; + + // + int64 stime = 3; +} + +// +message Config { + // + string itemTitle = 1; + + // + string bottomText = 2; + + // + string bottomTextCover = 3; + + // + string bottomTextUrl = 4; + + // + repeated EntranceShow topItems = 5; + + // + string headImage = 6; + + // + repeated EntranceShow pageItems = 7; + + // + int32 hit = 8; +} + +// +message EntranceShow { + // + string icon = 1; + + // + string title = 2; + + // + string moduleId = 3; + + // + string uri = 4; + + // + Bubble bubble = 5; + + // + int64 entranceId = 6; + + // + string topPhoto = 7; + + // + int32 entranceType = 8; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/show/rank/v1.proto b/grpc_api/bilibili/app/show/rank/v1.proto new file mode 100644 index 0000000..a250336 --- /dev/null +++ b/grpc_api/bilibili/app/show/rank/v1.proto @@ -0,0 +1,146 @@ +syntax = "proto3"; + +package bilibili.app.show.rank.v1; + +// +service Rank { + // + // + rpc rankAll (RankAllResultReq) returns (RankListReply); + + // + // + rpc rankRegion (RankRegionResultReq) returns (RankListReply); +} + +//-请求 +message RankAllResultReq { + // + string order = 1; + + // + int32 pn = 2; + + // + int32 ps = 3; +} + +//-请求 +message RankRegionResultReq { + // + int32 rid = 1; + + // + int32 pn = 2; + + // + int32 ps = 3; +} + +//-回复 +message RankListReply { + // + repeated Item items = 1; +} + +// +message Item { + // + string title = 1; + + // + string cover = 2; + + // + string param = 3; + + // + string uri = 4; + + // + string redirectUrl = 5; + + // + string goto = 6; + + // + int32 play = 7; + + // + int32 danmaku = 8; + + // + int64 mid = 9; + + // + string name = 10; + + // + string face = 11; + + // + int32 reply = 12; + + // + int32 favourite = 13; + + // + int64 pubDate = 14; + + // + int32 rid = 15; + + // + string rname = 16; + + // + int64 duration = 17; + + // + int32 like = 18; + + // + int64 cid = 19; + + // + int64 pts = 20; + + // + string cooperation = 21; + + // + int32 attribute = 22; + + // + int64 follower = 23; + + // + OfficialVerify officialVerify = 24; + + // + repeated Item children = 25; + + // + Relation relation = 26; +} + +// +message OfficialVerify { + // + int32 type = 1; + + // + string desc = 2; +} + +// +message Relation { + // + int32 status = 1; + + // + int32 isFollow = 2; + + // + int32 isFollowed = 3; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/show/region/v1.proto b/grpc_api/bilibili/app/show/region/v1.proto new file mode 100644 index 0000000..53e9cd1 --- /dev/null +++ b/grpc_api/bilibili/app/show/region/v1.proto @@ -0,0 +1,67 @@ +syntax = "proto3"; + +package bilibili.app.show.region.v1; + +// +service Region { + // + // + rpc region (RegionReq) returns (RegionReply); +} + +// +message RegionReq { + // + string lang = 1; +} + +// +message RegionReply { + // + repeated RegionInfo regions = 1; +} + +// +message RegionConfig { + // + string scenesName = 1; + + // + string scenesType = 2; +} + +// +message RegionInfo { + // + int32 tid = 1; + + // + int32 reid = 2; + + // + string name = 3; + + // + string logo = 4; + + // + string goto = 5; + + // + string param = 6; + + // + string uri = 7; + + // + int32 type = 8; + + // + int32 isBangumi = 9; + + // + repeated RegionInfo children = 10; + + // + repeated RegionConfig config = 11; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/space/v1.proto b/grpc_api/bilibili/app/space/v1.proto new file mode 100644 index 0000000..b365f6d --- /dev/null +++ b/grpc_api/bilibili/app/space/v1.proto @@ -0,0 +1,139 @@ +syntax = "proto3"; + +package bilibili.app.space.v1; + +// +service Space { + // + // + rpc archive (ArchiveReq) returns (ArchiveReply); +} + +//-请求 +message ArchiveReq { + // + int64 vmid = 1; + + // + int32 pn = 2; + + // + int32 ps = 3; + + // + string order = 4; +} + +//-回复 +message ArchiveReply { + // + repeated BiliSpaceVideo item = 1; + + // + int32 count = 2; + + // + EpisodicButton episodicButton = 3; + + // + repeated OrderConfig order = 4; +} + +// +message Badge { + // + string text = 1; + + // + string textColor = 2; + + // + string textColorNight = 3; + + // + string bgColor = 4; + + // + string bgColorNight = 5; + + // + string borderColor = 6; + + // + string borderColorNight = 7; + + // + int32 bgStyle = 8; +} + +// +message BiliSpaceVideo { + // + string title = 1; + + // + string tname = 2; + + // + int64 duration = 3; + + // + string cover = 4; + + // + string uri = 5; + + // + string param = 6; + + // + string danmaku = 7; + + // + int32 play = 8; + + // + int64 ctime = 9; + + // + bool state = 10; + + // + bool isPopular = 11; + + // + repeated Badge badges = 12; + + // + string coverRight = 13; + + // + string bvid = 14; + + // + bool isSteins = 15; + + // + bool isUgcpay = 16; + + // + bool isCooperation = 17; +} + +// +message EpisodicButton { + // + string text = 1; + + // + string uri = 2; +} + +// +message OrderConfig { + // + string title = 1; + + // + string value = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/splash/v1.proto b/grpc_api/bilibili/app/splash/v1.proto new file mode 100644 index 0000000..54b342c --- /dev/null +++ b/grpc_api/bilibili/app/splash/v1.proto @@ -0,0 +1,180 @@ +syntax = "proto3"; + +package bilibili.app.splash.v1; + +import "google/protobuf/any.proto"; + +// +service Splash { + // + // + rpc list (SplashReq) returns (SplashReply); +} + +//-请求 +message SplashReq { + // + int32 width = 1; + + // + int32 height = 2; + + // + string birth = 3; + + // + string adExtra = 4; + + // + string network = 5; +} + +//-回复 +message SplashReply { + // + int32 maxTime = 1; + + // + int32 minInterval = 2; + + // + int32 pullInterval = 3; + + // + repeated SplashItem list = 4; + + // + repeated ShowStrategy show = 5; +} + +// +message ShowStrategy { + // + int32 id = 1; + + // + int64 stime = 2; + + // + int64 etime = 3; +} + +// +message SplashItem { + // + int32 id = 1; + + // + int32 type = 2; + + // + int32 cardType = 3; + + // + int32 duration = 4; + + // + int64 beginTime = 5; + + // + int64 endTime = 6; + + // + string thumb = 7; + + // + string hash = 8; + + // + string logoUrl = 9; + + // + string logoHash = 10; + + // + string videoUrl = 11; + + // + string videoHash = 12; + + // + int32 videoWidth = 13; + + // + int32 videoHeight = 14; + + // + string schema = 15; + + // + string schemaTitle = 16; + + // + string schemaPackageName = 17; + + // + repeated string schemaCallupWhiteList = 18; + + // + int32 skip = 19; + + // + string uri = 20; + + // + string uriTitle = 21; + + // + int32 source = 22; + + // + int32 cmMark = 23; + + // + string adCb = 24; + + // + int64 resourceId = 25; + + // + string requestId = 26; + + // + string clientIp = 27; + + // + bool isAd = 28; + + // + bool isAdLoc = 29; + + // + google.protobuf.Any extra = 30; + + // + int64 cardIndex = 31; + + // + int64 serverType = 32; + + // + int64 index = 33; + + // + string clickUrl = 34; + + // + string showUrl = 35; + + // + int32 timeTarget = 36; + + // + int32 encryption = 37; + + // + bool enablePreDownload = 38; + + // + bool enableBackgroundDownload = 39; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/view_v1.proto b/grpc_api/bilibili/app/view/v1.proto similarity index 51% rename from grpc_api/bilibili/app/view_v1.proto rename to grpc_api/bilibili/app/view/v1.proto index 9f10a94..9252ddb 100644 --- a/grpc_api/bilibili/app/view_v1.proto +++ b/grpc_api/bilibili/app/view/v1.proto @@ -3,648 +3,121 @@ syntax = "proto3"; package bilibili.app.view.v1; import "google/protobuf/any.proto"; -import public "bilibili/app/archive_v1.proto"; +import "bilibili/app/archive/v1.proto"; +import "bilibili/app/playurl/v1.proto"; -message ActivityResource{ - string modPoolName = 1; - string modResourceName = 2; - string bgColor = 3; - string selectedBgColor = 4; - string textColor = 5; - string lightTextColor = 6; - string darkTextColor = 7; - string dividerColor = 8; +service View { + // + // + rpc addContract (AddContractReq) returns (NoReply); + + // + // + rpc clickActivitySeason (ClickActivitySeasonReq) returns (NoReply); + + // + // + rpc clickPlayerCard (ClickPlayerCardReq) returns (NoReply); + + // + // + rpc exposePlayerCard (ExposePlayerCardReq) returns (NoReply); + + // + // + rpc season (SeasonReq) returns (SeasonReply); + + // + // + rpc shortFormVideoDownload (ShortFormVideoDownloadReq) returns (ShortFormVideoDownloadReply); + + //视频页信息 + //https://app.bilibili.com/bilibili.app.view.v1.View/View + rpc view (ViewReq) returns (ViewReply); + + //视频播放时数据 + //https://app.bilibili.com/bilibili.app.view.v1.View/ViewProgress + rpc viewProgress (ViewProgressReq) returns (ViewProgressReply); } -message Attention{ - int32 startTime = 1; - int32 endTime = 2; - double posX = 3; - double posY = 4; +//-请求 +message AddContractReq { + // + int64 aid = 1; + + // + int64 upMid = 2; + + // + string spmid = 3; } -message ActivitySeason{ - bilibili.app.archive.v1.Arc arc = 1; - repeated ViewPage pages = 2; - OnwerExt ownerExt = 3; - ReqUser reqUser = 4; - ElecRank elecRank = 5; - History history = 6; - string bvid = 7; - Honor honor = 8; - repeated Staff staff = 9; - UgcSeason ugcSeason = 10; - Tab tab = 11; - Rank rank = 12; - Order order = 13; - bool supportDislike = 14; - OperationRelate operationRelate = 15; - ActivityResource activityResource = 16; - string shortLink = 17; - Label label = 18; - Dislike dislike = 19; - PlayerIcon playerIcon = 20; - string shareSubtitle = 21; - CMConfig cmConfig = 22; - TFPanelCustomized tfPanelCustomized = 23; - string argueMsg = 24; - ECode ecode = 25; - CustomConfig customConfig = 26; +//-请求 +message ClickActivitySeasonReq { + // + BizType orderType = 1; + + // + string spmid = 2; + + oneof orderParamCase { + // + BizReserveActivityParam bizReserveActivityParam = 3; + + // + BizFavSeasonParam bizFavSeasonParam = 4; + } + + // + int64 action = 5; } -message Audio{ - string title = 1; - string coverUrl = 2; - int64 songId = 3; - int64 playCount = 4; - int64 replyCount = 5; - int64 upperId = 6; - string entrance = 7; - int64 songAttr = 8; -} - -message Bgm { - int64 sid = 1; - int64 mid = 2; - string title = 3; - string author = 4; - string jumpUrl = 5; - string cover = 6; -} - -message BizFavSeasonParam{ - int64 seasonId = 1; -} - -message BizFollowVideoParam{ - int64 seasonId = 1; -} - -message BizJumpLinkParam{ - string url = 1; -} - -message BizReserveActivityParam{ - int64 activityId = 1; - string from = 2; - string type = 3; - int64 oid = 4; -} - -enum BizType{ - BizTypeNone = 0; - BizTypeFollowVideo = 1; - BizTypeReserveActivity = 2; - BizTypeJumpLink = 3; - BizTypeFavSeason = 4; -} - -message Button{ - string title = 1; - string uri = 2; -} - -message CM{ - google.protobuf.Any sourceContent = 1; -} - -message CMConfig { - google.protobuf.Any adsControl = 1; -} - -message Chronos{ - string md5 = 1; - string file = 2; -} - -message CustomConfig { - string redirectUrl = 1; -} - -message CommandDm{ +//-请求 +message ClickPlayerCardReq { + // int64 id = 1; - int64 oid = 2; - string mid = 3; - string command = 4; - string content = 5; - int32 progress = 6; - string ctime = 7; - string mtime = 8; - string extra = 9; - string idStr = 10; -} -message Config { - string relatesTitle = 1; - int32 relatesStyle = 2; - int32 relateGifExp = 3; - int32 endPageHalf = 4; - int32 endPageFull = 5; -} - -message DM{ - bool closed = 1; - bool realName = 2; - int64 count = 3; -} - -//不喜欢原因项 -message Dislike { - string title = 1; - string subtitle = 2; - repeated DislikeReasons reasons = 3; -} - -message DislikeReasons{ - int64 id = 1; - int64 mid = 2; - int32 rid = 3; - int64 tagId = 4; - string name = 5; -} - -enum ECode{ - DEFAULT = 0; - CODE404 = 1; -} - -message ElecRank { - repeated ElecRankItem list = 1; - int64 count = 2; -} - -message ElecRankItem{ - string avatar = 1; - string nickname = 2; - string message = 3; - int64 mid = 4; -} - -message Episode{ - int64 id = 1; + // int64 aid = 2; + + // int64 cid = 3; - string title = 4; - string cover = 5; - string coverRightText = 6; - bilibili.app.archive.v1.Page page = 7; - bilibili.app.archive.v1.Stat stat = 8; - string bvid = 9; + + // + int64 action = 4; + + // + string spmid = 5; } -message History { - int64 cid = 1; - int64 progress = 2; -} +//-请求 +message ExposePlayerCardReq { + // + PlayerCardType cardType = 1; -message Honor { - string icon = 1; - string iconNight = 2; - string text = 3; - string textExtra = 4; - string textColor = 5; - string textColorNight = 6; - string bgColor = 7; - string bgColorNight = 8; - string url = 9; - string urlText = 10; -} + // + int64 aid = 2; -message Interaction { - Node historyNode = 1; - int64 graphVersion = 2; - string msg = 3; - string evaluation = 4; - int64 mark = 5; -} - -message Label { - int32 type = 1; - string uri = 2; -} - -message Live{ - int64 mid = 1; - int64 roomid = 2; - string uri = 3; -} - -message Node{ - int64 nodeId = 1; - string title = 2; + // int64 cid = 3; + + // + string spmid = 4; } -message Notice{ - string title = 1; - string desc = 2; -} - -message OfficialVerify{ - int32 type = 1; - string desc = 2; -} - -message OnwerExt { - OfficialVerify officialVerify = 1; - Live live = 2; - Vip vip = 3; - repeated int64 assists = 4; - int64 fans = 5; -} - -message OperationCard{ - int32 startTime = 1; - int32 endTime = 2; - string icon = 3; - string title = 4; - string buttonText = 5; - string url = 6; - string content = 7; -} - -message OperationCardNew{ - int64 id = 1; - int32 from = 2; - int32 to = 3; - bool status = 4; - OperationCardType cardType = 5; - StandardCard standardCard= 6; - OperationCard operationCard = 7; - BizType bizType = 8; - BizFollowVideoParam FollowVideoParam = 9; - BizReserveActivityParam ReserveActivityParam = 10; - BizJumpLinkParam LinkParam = 11; -} - -enum OperationCardType{ - CardTypeNone = 0; - CardTypeStandard = 1; - CardTypeSkip = 2; -} - -message OperationRelate{ - string title = 1; - repeated RelateItem relateItem = 2; -} - -message Order{ - bool status = 1; - string title = 2; - string buttonTitle = 3; - string buttonSelectedTitle = 4; - int64 seasonStatView = 5; - int64 seasonStatDanmaku = 6; - BizType orderType = 7; - BizReserveActivityParam reserve = 8; - BizFavSeasonParam favSeason = 9; - string intro = 10; -} - -message PackInfo{ - string title = 1; - string uri = 2; -} - -message PlayerIcon { - string url1 = 1; - string hash1 = 2; - string url2 = 3; - string hash2 = 4; -} - -message Rank{ - string icon = 1; - string iconNight = 2; - string text = 3; -} - -message ReasonStyle{ - string text = 1; - string textColor = 2; - string bgColor = 3; - string borderColor = 4; - string textColorNight = 5; - string bgColorNight = 6; - string borderColorNight = 7; - int32 bgStyle = 8; - int32 selected = 9; -} - -//推荐视频 -message Relate { - int64 aid = 1; - string pic = 2; - string title = 3; - bilibili.app.archive.v1.Author author = 4; - bilibili.app.archive.v1.Stat stat = 5; - int64 duration = 6; - string goto = 7; - string param = 8; - string uri = 9; - string jumpUrl = 10; - double rating = 11; - string reserve = 12; - string from = 13; - string desc = 14; - string rcmdReason = 15; - string badge = 16; - int64 cid = 17; - int32 seasonType = 18; - int32 ratingCount = 19; - string tagName = 20; - PackInfo packInfo = 21; - Notice notice = 22; - Button button = 23; - string trackid = 24; - int32 newCard = 25; - ReasonStyle rcmdReasonStyle = 26; - string coverGif = 27; - CM cm = 28; -} - -message RelateItem{ - string url = 1; - string cover = 2; -} - -message RelateTab { - string id = 1; - string title = 2; -} - -message ReqUser { - int32 attention = 1; - int32 guestAttention = 2; - int32 favorite = 3; - int32 like = 4; - int32 dislike = 5; - int32 coin = 6; - int32 attentionLevel = 7; -} - -message Season { - string allowDownload = 1; - int64 seasonId = 2; - int32 isJump = 3; - string title = 4; - string cover = 5; - int32 isFinish = 6; - int64 newestEpId = 7; - string newestEpIndex = 8; - int64 totalCount = 9; - int32 weekday = 10; - UserSeason userSeason = 11; - SeasonPlayer player = 12; - string ogvPlayurl = 13; -} - -message SeasonPlayer{ - int64 aid = 1; - string vid = 2; - int64 cid = 3; - string from = 4; -} - -message Section{ - int64 id = 1; - string title = 2; - int64 type = 3; - repeated Episode episodes = 4; -} - -message Staff { - int64 mid = 1; - string title = 2; - string face = 3; - string name = 4; - OfficialVerify officialVerify = 5; - Vip vip = 6; - int32 attention = 7; - int32 labelStyle = 8; -} - -message StandardCard{ - string title = 1; - string buttonTitle = 2; - string buttonSelectedTitle = 3; - bool showSelected = 4; -} - -message TFPanelCustomized{ - string rightBtnImg = 1; - string rightBtnText = 2; - string rightBtnTextColor = 3; - string rightBtnLink = 4; - string mainLabel = 5; - string operator = 6; - map entry = 7; -} - -//TAG图标 -message TIcon { - string icon = 1; -} - -message Tab{ - string background = 1; - TabOtype otype = 2; - int64 oid = 3; - string uri = 4; - TabStyle style = 5; - string text = 6; - string textColor = 7; - string textColorSelected = 8; - string pic = 9; - int64 id = 10; -} - -enum TabOtype{ - UnknownOtype = 0; - URL = 1; - TopicNA = 2; -} - -enum TabStyle{ - UnknownStyle = 0; - Text = 1; - Pic = 2; -} - -//TAG信息 -message Tag { - int64 id = 1; - string name = 2; - int64 likes = 3; - int64 hates = 4; - int32 liked = 5; - int32 hated = 6; - string uri = 7; - string tagType = 8; -} - -message UgcSeason { - int64 id = 1; - string title = 2; - string cover = 3; - string intro = 4; - repeated Section sections = 5; - UgcSeasonStat stat = 6; - string labelText = 7; - string labelTextColor = 8; - string labelBgColor = 9; - string labelBgNightColor = 11; - string labelTextNightColor = 10; - string descRight = 12; - int64 epCount = 13; -} - -message UgcSeasonStat{ +//-请求 +message SeasonReq { + // int64 seasonId = 1; - int32 view = 2; - int32 danmaku = 3; - int32 reply = 4; - int32 fav = 5; - int32 coin = 6; - int32 share = 7; - int32 nowRank = 8; - int32 hisRank = 9; - int32 like = 10; } -message UpAct{ - int64 sid = 1; - int64 mid = 2; - string title = 3; - string statement = 4; - string image = 5; - string url = 6; - string button = 7; +//-回复 +message SeasonReply { + // + UgcSeason season = 1; } -message UserGarb{ - string urlImageAniCut = 1; -} - -message UserSeason{ - string attention = 1; -} - -message VideoGuide{ - repeated Attention attention = 1; //关注按钮卡片 - repeated CommandDm commandDms = 2; //互动弹幕 - repeated OperationCard operationCard = 3; - repeated OperationCardNew operationCardNew = 4; -} - -//分P明细 -message ViewPage { - bilibili.app.archive.v1.Page page = 1;//分P视频 - Audio audio = 2; - DM dm =3; - string downloadTitle = 4; - string downloadSubtitle = 5; -} - -message Vip{ - int32 type = 1; - int64 dueDate = 2; - string dueRemark = 3; - int32 accessStatus = 4; - int32 vipStatus = 5; - string vipStatusWarn = 6; - int32 themeType = 7; - VipLabel label = 8; -} - -message VipLabel{ - string path = 1; -} - -message subTFPanel{ - string rightBtnImg = 1; - string rightBtnText = 2; - string rightBtnTextColor = 3; - string rightBtnLink = 4; - string mainLabel = 5; - string operator = 6; -} - -//视频页信息 -//https://app.bilibili.com/bilibili.app.view.v1.View/View -//请求 -message ViewReq { - int64 aid = 1; //avid - string bvid = 2; //bvid - string from = 3; - string trackid = 4; - string adExtra = 5; - int32 qn = 6; - int32 fnver = 7; - int32 fnval = 8; - int32 forceHost = 9; - int32 fourk = 10; - string spmid = 11; - string fromSpmid = 12; - int32 autoplay = 13; -} -//回复 -message ViewReply { - bilibili.app.archive.v1.Arc arc = 1; //稿件基本信息 - repeated ViewPage pages = 2; //分P信息 - OnwerExt ownerExt = 3; - ReqUser reqUser = 4; - repeated Tag tag = 5; //稿件TAG - map tIcon = 6; //TAG图标 - Season season = 7; - ElecRank elecRank = 8; - History history = 9; - repeated Relate relates = 10; //推荐视频 - Dislike dislike = 11; //不喜欢原因项 - PlayerIcon playerIcon = 12; - string vipActive_ = 13; - string bvid = 14;//稿件bvid - Honor honor = 15; - repeated RelateTab relateTab = 16; - string activityUrl = 17; - repeated Bgm bgm = 18; - repeated Staff staff = 19; - string argueMsg = 20;//警告信息 - string shortLink = 21; - int32 playParam = 22; - Label label = 23; - UgcSeason ugcSeason = 24; - Config config = 25; - string shareSubtitle_ = 26; - Interaction interaction = 27; - int32 ecode = 28; - CustomConfig customConfig = 29; - repeated CM cms = 30; - CMConfig cmConfig = 31; - Tab tab = 32; - Rank rank = 33; - TFPanelCustomized tfPanelCustomized = 34; - UpAct upAct = 35; - UserGarb userGarb = 36; - ActivitySeason activitySeason = 37; -} - -//获取视频特殊数据 -//https://app.bilibili.com/bilibili.app.view.v1.View/ViewProgress -//请求 -message ViewProgressReq{ - int64 aid = 1; - int64 cid = 2; - int64 upMid = 3; -} -message ViewProgressReply{ - VideoGuide videoGuide = 1; //特殊数据 - Chronos chronos = 2; //资源包 -} - -//? -//https://app.bilibili.com/bilibili.app.view.v1.View/ShortFormVideoDownload -//请求 +//-请求 message ShortFormVideoDownloadReq{ int64 aid = 1; int64 cid = 2; @@ -656,7 +129,8 @@ message ShortFormVideoDownloadReq{ string platform = 8; string spmid = 9; } -//回复 + +//-回复 message ShortFormVideoDownloadReply{ bool hasDownloadUrl = 1; string downloadUrl = 2; @@ -664,6 +138,1525 @@ message ShortFormVideoDownloadReply{ int64 size = 4; } +//视频页信息-请求 +message ViewReq { + //稿件avid + int64 aid = 1; + + //稿件bvid + string bvid = 2; + + // + string from = 3; + + // + string trackid = 4; + + // + string adExtra = 5; + + //清晰度 + int32 qn = 6; + + // + int32 fnver = 7; + + //流类型 + int32 fnval = 8; + + //是否强制使用域名 + int32 forceHost = 9; + + //是否允许4K + int32 fourk = 10; + + // + string spmid = 11; + + // + string fromSpmid = 12; + + // + int32 autoplay = 13; + + // + bilibili.app.playurl.v1.PlayerArgs playerArgs = 14; +} + +//视频页信息-回复 +message ViewReply { + //稿件信息 + bilibili.app.archive.v1.Arc arc = 1; + + //分P信息 + repeated ViewPage pages = 2; + + //UP主扩展信息 ("OnwerExt"为源码中拼写错误) + OnwerExt ownerExt = 3; + + //用户操作状态 + ReqUser reqUser = 4; + + //稿件TAG + repeated Tag tag = 5; + + //TAG对应的图标 + map tIcon = 6; + + //稿件映射的剧集信息 + Season season = 7; + + //充电排行信息 + ElecRank elecRank = 8; + + //历史观看进度 + History history = 9; + + //视频相关推荐列表 + repeated Relate relates = 10; + + //不感兴趣原因 + Dislike dislike = 11; + + //播放图标动画配置档 + PlayerIcon playerIcon = 12; + + // + string vipActive = 13; + + //稿件bvid + string bvid = 14; + + //获得荣誉信息 + Honor honor = 15; + + // + repeated RelateTab relateTab = 16; + + //参与的活动页面url + string activityUrl = 17; + + //稿件引用bgm列表 + repeated Bgm bgm = 18; + + //联合投稿成员列表 + repeated Staff staff = 19; + + //争议信息 + string argueMsg = 20; + + //短链接 + string shortLink = 21; + + // + int32 playParam = 22; + + // + Label label = 23; + + //ugc视频合集信息 + UgcSeason ugcSeason = 24; + + // + Config config = 25; + + // + string shareSubtitle = 26; + + // + Interaction interaction = 27; + + // + int32 ecode = 28; + + // + CustomConfig customConfig = 29; + + //广告 + repeated CM cms = 30; + + // + CMConfig cmConfig = 31; + + // + Tab tab = 32; + + // + Rank rank = 33; + + // + TFPanelCustomized tfPanelCustomized = 34; + + // + UpAct upAct = 35; + + // + UserGarb userGarb = 36; + + // + ActivitySeason activitySeason = 37; +} + +//视频播放时数据-请求 +message ViewProgressReq{ + //稿件avid + int64 aid = 1; + + //视频cid + int64 cid = 2; + + //UP主uid + int64 upMid = 3; +} + +//视频播放时数据-回复 +message ViewProgressReply{ + //特殊数据 + VideoGuide videoGuide = 1; + + //资源包 + Chronos chronos = 2; +} + +//空回复 message NoReply{ +} + +// +message ActivityResource{ + // + string modPoolName = 1; + + // + string modResourceName = 2; + + // + string bgColor = 3; + + // + string selectedBgColor = 4; + + // + string textColor = 5; + + // + string lightTextColor = 6; + + // + string darkTextColor = 7; + + // + string dividerColor = 8; +} + +message ActivitySeason { + // + bilibili.app.archive.v1.Arc arc = 1; + + // + repeated ViewPage pages = 2; + + //("OnwerExt"为源码中拼写错误) + OnwerExt ownerExt = 3; + + // + ReqUser reqUser = 4; + + // + ElecRank elecRank = 5; + + // + History history = 6; + + // + string bvid = 7; + + // + Honor honor = 8; + + // + repeated Staff staff = 9; + + // + UgcSeason ugcSeason = 10; + + // + Tab tab = 11; + + // + Rank rank = 12; + + // + Order order = 13; + + // + bool supportDislike = 14; + + // + OperationRelate operationRelate = 15; + + // + ActivityResource activityResource = 16; + + // + string shortLink = 17; + + // + Label label = 18; + + // + Dislike dislike = 19; + + // + PlayerIcon playerIcon = 20; + + // + string shareSubtitle = 21; + + // + CMConfig cmConfig = 22; + + // + TFPanelCustomized tfPanelCustomized = 23; + + // + string argueMsg = 24; + + // + ECode ecode = 25; + + // + CustomConfig customConfig = 26; +} + +// +message Attention{ + // + int32 startTime = 1; + + // + int32 endTime = 2; + + // + double posX = 3; + + // + double posY = 4; +} + +//音频稿件信息 +message Audio{ + //音频标题 + string title = 1; + + //音频封面url + string coverUrl = 2; + + //音频auid + int64 songId = 3; + + //音频播放量 + int64 playCount = 4; + + //音频评论数 + int64 replyCount = 5; + + //音频作者UID + int64 upperId = 6; + + //进入按钮文案 + string entrance = 7; + + // + int64 songAttr = 8; +} + +//视频引用的bgm音频 +message Bgm { + //音频auid + int64 sid = 1; + + //音频作者UID + int64 mid = 2; + + //音频标题 + string title = 3; + + //音频作者昵称 + string author = 4; + + //bgm页面url + string jumpUrl = 5; + + //音频封面url + string cover = 6; +} + +// +message BizFavSeasonParam{ + // + int64 seasonId = 1; +} + +// +message BizFollowVideoParam{ + // + int64 seasonId = 1; +} + +// +message BizJumpLinkParam{ + // + string url = 1; +} + +// +message BizReserveActivityParam{ + // + int64 activityId = 1; + + // + string from = 2; + + // + string type = 3; + + // + int64 oid = 4; +} + +// +enum BizType{ + // + BizTypeNone = 0; + + // + BizTypeFollowVideo = 1; + + // + BizTypeReserveActivity = 2; + + // + BizTypeJumpLink = 3; + + // + BizTypeFavSeason = 4; +} + +// +message Button{ + //按钮文案 + string title = 1; + + //跳转uri + string uri = 2; +} + +// +message CM{ + // + google.protobuf.Any sourceContent = 1; +} + +// +message CMConfig { + // + google.protobuf.Any adsControl = 1; +} + +// +message Chronos{ + // + string md5 = 1; + + // + string file = 2; +} + +//互动弹幕条目信息 +message CommandDm{ + //弹幕id + int64 id = 1; + + //对象视频cid + int64 oid = 2; + + //??? + string mid = 3; + + //互动弹幕指令 + string command = 4; + + //互动弹幕正文 + string content = 5; + + //出现时间 + int32 progress = 6; + + //创建时间 + string ctime = 7; + + //发布时间 + string mtime = 8; + + //扩展json数据 + string extra = 9; + + //弹幕id-str + string idStr = 10; +} + +// +message Config { + // + string relatesTitle = 1; + + // + int32 relatesStyle = 2; + + // + int32 relateGifExp = 3; + + // + int32 endPageHalf = 4; + + // + int32 endPageFull = 5; + + // + bool autoSwindow = 6; +} + +// +message ContractCard { + // + float displayProgress = 1; + + // + int64 displayAccuracy = 2; + + // + int64 displayDuration = 3; +} + +// +message CustomConfig { + // + string redirectUrl = 1; +} + +// +message DM{ + // + bool closed = 1; + + // + bool realName = 2; + + // + int64 count = 3; +} + +//不喜欢原因 +message Dislike { + //标题 + string title = 1; + + //??? + string subtitle = 2; + + //原因项列表 + repeated DislikeReasons reasons = 3; +} + +//不喜欢原因项 +message DislikeReasons{ + //类型 + //1:全部类型 3:TAG 4:UP主 + int64 id = 1; + + //相关UP主UID + int64 mid = 2; + + //相关分区tid + int32 rid = 3; + + //相关TAG id + int64 tagId = 4; + + //相关名称 + string name = 5; +} + +// +enum ECode{ + // + DEFAULT = 0; + + // + CODE404 = 1; +} + +//充电排行信息 +message ElecRank { + //充电排行列表 + repeated ElecRankItem list = 1; + + //充电用户数 + int64 count = 2; +} + +//充电用户信息 +message ElecRankItem{ + //用户头像 + string avatar = 1; + + //用户昵称 + string nickname = 2; + + //充电留言 + string message = 3; + + //用户UID + int64 mid = 4; +} + +//视频合集单话信息 +message Episode{ + //合集单话id + int64 id = 1; + + //稿件avid + int64 aid = 2; + + //视频1P cid + int64 cid = 3; + + //稿件标题 + string title = 4; + + //稿件封面url + string cover = 5; + + //投稿时间显示文案 + string coverRightText = 6; + + //视频分P信息 + bilibili.app.archive.v1.Page page = 7; + + //视频状态数 + bilibili.app.archive.v1.Stat stat = 8; + + //稿件bvid + string bvid = 9; + + // + bilibili.app.archive.v1.Author author = 10; +} + +//稿件观看进度 +message History { + //播放进度分P cid + int64 cid = 1; + + //播放进度时间 + //0:未观看 -1:已看完 正整数:播放时间进度 + int64 progress = 2; +} + +//稿件获得荣誉信息 +message Honor { + //荣誉栏图标url + string icon = 1; + + //荣誉栏图标url 夜间模式 + string iconNight = 2; + + //荣誉文案 + string text = 3; + + //荣誉副文案 + string textExtra = 4; + + //标题颜色 + string textColor = 5; + + //标题颜色 夜间模式 + string textColorNight = 6; + + //背景颜色 + string bgColor = 7; + + //背景颜色 夜间模式 + string bgColorNight = 8; + + //跳转uri + string url = 9; + + //跳转角标文案 + string urlText = 10; +} + +// +message Interaction { + // + Node historyNode = 1; + + // + int64 graphVersion = 2; + + // + string msg = 3; + + // + string evaluation = 4; + + // + int64 mark = 5; +} + +// +message Label { + // + int32 type = 1; + + // + string uri = 2; +} + +//直播信息 +message Live{ + //主播UID + int64 mid = 1; + + //直播间id + int64 roomid = 2; + + //直播间url + string uri = 3; + + // + string endpageUri = 4; +} + +// +message Node{ + // + int64 nodeId = 1; + + // + string title = 2; + + // + int64 cid = 3; +} + +// +message Notice{ + // + string title = 1; + + // + string desc = 2; +} + +//认证信息 +message OfficialVerify{ + //认证类型 + //0:个人认证 1:官方认证 + int32 type = 1; + + //认证名称 + string desc = 2; +} + +//up主扩展信息 ("OnwerExt"为源码中拼写错误) +message OnwerExt { + //认证信息 + OfficialVerify officialVerify = 1; + + //直播信息 + Live live = 2; + + //会员信息 + Vip vip = 3; + + //??? + repeated int64 assists = 4; + + //粉丝数 + int64 fans = 5; + + //总投稿数 + string arcCount = 6; +} + +// +message OperationCard{ + // + int32 startTime = 1; + + // + int32 endTime = 2; + + // + string icon = 3; + + // + string title = 4; + + // + string buttonText = 5; + + // + string url = 6; + + // + string content = 7; +} + +// +message OperationCardNew{ + // + int64 id = 1; + + // + int32 from = 2; + + // + int32 to = 3; + + // + bool status = 4; + + // + OperationCardType cardType = 5; + + oneof renderCase { + // + StandardCard standardCard= 6; + + // + OperationCard operationCard = 7; + } + + // + BizType bizType = 8; + + oneof paramCase { + // + BizFollowVideoParam FollowVideoParam = 9; + + // + BizReserveActivityParam ReserveActivityParam = 10; + + // + BizJumpLinkParam LinkParam = 11; + } +} + +// +enum OperationCardType{ + // + CardTypeNone = 0; + + // + CardTypeStandard = 1; + + // + CardTypeSkip = 2; +} + +// +message OperationRelate{ + // + string title = 1; + + // + repeated RelateItem relateItem = 2; +} + +// +message Order{ + // + bool status = 1; + + // + string title = 2; + + // + string buttonTitle = 3; + + // + string buttonSelectedTitle = 4; + + // + int64 seasonStatView = 5; + + // + int64 seasonStatDanmaku = 6; + + // + BizType orderType = 7; + + oneof orderParamCase{ + // + BizReserveActivityParam bizReserveActivityParam = 8; + + // + BizFavSeasonParam bizFavSeasonParam = 9; + } + + // + string intro = 10; +} + +//游戏礼包信息 +message PackInfo{ + //礼包标题 + string title = 1; + + //礼包页uri + string uri = 2; +} + +// +enum PlayerCardType { + // + PlayerCardTypeNone_VALUE = 0; + + // + PlayerCardTypeAttention_VALUE = 1; + + // + PlayerCardTypeOperation_VALUE = 2; + + // + PlayerCardTypeContract_VALUE = 3; +} + +//进度条动画配置 +message PlayerIcon { + //拖动动画配置档url + string url1 = 1; + + //拖动动画配置档hash + string hash1 = 2; + + //松手动画配置档url + string url2 = 3; + + //松手动画配置档hash + string hash2 = 4; +} + +// +message Rank{ + // + string icon = 1; + + // + string iconNight = 2; + + // + string text = 3; +} + +// +message ReasonStyle{ + // + string text = 1; + + // + string textColor = 2; + + // + string bgColor = 3; + + // + string borderColor = 4; + + // + string textColorNight = 5; + + // + string bgColorNight = 6; + + // + string borderColorNight = 7; + + // + int32 bgStyle = 8; + + // + int32 selected = 9; +} + +//相关推荐项 +message Relate { + // + int64 aid = 1; + + //封面url + string pic = 2; + + //标题 + string title = 3; + + //UP主信息 + bilibili.app.archive.v1.Author author = 4; + + //稿件状态数 + bilibili.app.archive.v1.Stat stat = 5; + + //时长 + int64 duration = 6; + + //跳转类型 + //special:pgc视频 av:稿件视频 cm:广告 game:游戏 + string goto = 7; + + // + string param = 8; + + //跳转uri + string uri = 9; + + // + string jumpUrl = 10; + + //评分 + double rating = 11; + + // + string reserve = 12; + + // + string from = 13; + + //备注 + string desc = 14; + + // + string rcmdReason = 15; + + //标志文字 + string badge = 16; + + //1P cid + int64 cid = 17; + + // + int32 seasonType = 18; + + // + int32 ratingCount = 19; + + //标签文案 + string tagName = 20; + + //游戏礼包信息 + PackInfo packInfo = 21; + + // + Notice notice = 22; + + //按钮信息 + Button button = 23; + + // + string trackid = 24; + + // + int32 newCard = 25; + + // + ReasonStyle rcmdReasonStyle = 26; + + // + string coverGif = 27; + + //推广信息 + CM cm = 28; + + // + int64 reserveStatus = 29; +} + +// +message RelateItem{ + // + string url = 1; + + // + string cover = 2; +} + +// +message RelateTab { + // + string id = 1; + + // + string title = 2; +} + +//用户操作状态 +message ReqUser { + //是否关注UP主 + int32 attention = 1; + + // + int32 guestAttention = 2; + + //是否收藏 + int32 favorite = 3; + + //是否点赞 + int32 like = 4; + + //是否点踩 + int32 dislike = 5; + + //是否投币 + int32 coin = 6; + + // + int32 attentionLevel = 7; + + // + int32 favSeason = 8; +} + +//剧集信息 +message Season { + // + string allowDownload = 1; + + //剧集ssid + int64 seasonId = 2; + + //是否重定向跳转 + int32 isJump = 3; + + //剧集标题 + string title = 4; + + //剧集封面url + string cover = 5; + + //剧集是否完结 + int32 isFinish = 6; + + //最新一话epid + int64 newestEpId = 7; + + //最新一话标题 + string newestEpIndex = 8; + + //总集数 + int64 totalCount = 9; + + //更新星期日 + int32 weekday = 10; + + //用户追番标志 + UserSeason userSeason = 11; + + // + SeasonPlayer player = 12; + + //单集页面url + string ogvPlayurl = 13; +} + +// +message SeasonPlayer{ + // + int64 aid = 1; + + // + string vid = 2; + + // + int64 cid = 3; + + // + string from = 4; +} + +//视频合集分段信息 +message Section{ + //合集分段id + int64 id = 1; + + //合集分段标题 + string title = 2; + + //类型? + //0:完结? 1:连载中? + int64 type = 3; + + //合集单话列表 + repeated Episode episodes = 4; +} + +//合作成员信息 +message Staff { + //成员UID + int64 mid = 1; + + //成员角色 + string title = 2; + + //成员头像url + string face = 3; + + //成员昵称 + string name = 4; + + //成员官方信息 + OfficialVerify officialVerify = 5; + + //成员会员信息 + Vip vip = 6; + + //是否关注该成员 + int32 attention = 7; + + // + int32 labelStyle = 8; +} + +// +message StandardCard{ + // + string title = 1; + + // + string buttonTitle = 2; + + // + string buttonSelectedTitle = 3; + + // + bool showSelected = 4; +} + +// +message TFPanelCustomized{ + // + string rightBtnImg = 1; + + // + string rightBtnText = 2; + + // + string rightBtnTextColor = 3; + + // + string rightBtnLink = 4; + + // + string mainLabel = 5; + + // + string operator = 6; + + // + map entry = 7; +} + +//TAG图标信息 +message TIcon { + //TAG图标url + string icon = 1; +} + +// +message Tab{ + // + string background = 1; + + // + TabOtype otype = 2; + + // + int64 oid = 3; + + // + string uri = 4; + + // + TabStyle style = 5; + + // + string text = 6; + + // + string textColor = 7; + + // + string textColorSelected = 8; + + // + string pic = 9; + + // + int64 id = 10; +} + +// +enum TabOtype{ + // + UnknownOtype = 0; + + // + URL = 1; + + // + TopicNA = 2; +} + +// +enum TabStyle{ + // + UnknownStyle = 0; + + // + Text = 1; + + // + Pic = 2; +} + +//TAG信息 +message Tag { + //TAD id + int64 id = 1; + + //TAG名 + string name = 2; + + // + int64 likes = 3; + + // + int64 hates = 4; + + // + int32 liked = 5; + + // + int32 hated = 6; + + //TAG页面uri + string uri = 7; + + //TAG类型 + //common:普通 new:话题 + string tagType = 8; +} + +//ugc视频合集信息 +message UgcSeason { + //合集id + int64 id = 1; + + //合集标题 + string title = 2; + + //合集封面url + string cover = 3; + + //合集简介 + string intro = 4; + + //分段列表 + repeated Section sections = 5; + + //合集状态数 + UgcSeasonStat stat = 6; + + // + string labelText = 7; + + // + string labelTextColor = 8; + + // + string labelBgColor = 9; + + // + string labelBgNightColor = 11; + + // + string labelTextNightColor = 10; + + //按钮文案 + string descRight = 12; + + //分集总数 + int64 epCount = 13; +} + +//ugc视频合集状态数 +message UgcSeasonStat{ + //合集id + int64 seasonId = 1; + + //总计观看 + int32 view = 2; + + //总计弹幕 + int32 danmaku = 3; + + //总计评论 + int32 reply = 4; + + //总计收藏 + int32 fav = 5; + + //总计投币 + int32 coin = 6; + + //总计分享 + int32 share = 7; + + // + int32 nowRank = 8; + + // + int32 hisRank = 9; + + //总计点赞 + int32 like = 10; +} + +// +message UpAct{ + // + int64 sid = 1; + + // + int64 mid = 2; + + // + string title = 3; + + // + string statement = 4; + + // + string image = 5; + + // + string url = 6; + + // + string button = 7; +} + +// +message UserGarb{ + // + string urlImageAniCut = 1; +} + +//用户追番标志 +message UserSeason{ + //关注状态 + //0:未关注 1:已关注 + string attention = 1; +} + +// +message VideoGuide{ + //关注按钮卡片 + repeated Attention attention = 1; + + //互动弹幕 + repeated CommandDm commandDms = 2; + + // + repeated OperationCard operationCard = 3; + + // + repeated OperationCardNew operationCardNew = 4; + + // + ContractCard contractCard = 5; +} + +//分P明细 +message ViewPage{ + //分P视频基本信息 + bilibili.app.archive.v1.Page page = 1; + + //分P对应的音频稿件 + Audio audio = 2; + + // + DM dm =3; + + //下载文案 + string downloadTitle = 4; + + //分P完整标题(视频标题+分P标题) + string downloadSubtitle = 5; +} + +//会员信息 +message Vip{ + //会员类型 + int32 type = 1; + + //到期时间 + int64 dueDate = 2; + + // + string dueRemark = 3; + + // + int32 accessStatus = 4; + + //会员状态 + int32 vipStatus = 5; + + // + string vipStatusWarn = 6; + + // + int32 themeType = 7; + + // + VipLabel label = 8; +} + +//会员类型标签 +message VipLabel{ + // + string path = 1; +} + +// +message subTFPanel{ + // + string rightBtnImg = 1; + + // + string rightBtnText = 2; + + // + string rightBtnTextColor = 3; + + // + string rightBtnLink = 4; + + // + string mainLabel = 5; + + // + string operator = 6; } \ No newline at end of file diff --git a/grpc_api/bilibili/app/wall/v1.proto b/grpc_api/bilibili/app/wall/v1.proto new file mode 100644 index 0000000..c82e699 --- /dev/null +++ b/grpc_api/bilibili/app/wall/v1.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package bilibili.app.wall.v1; + +// +service Wall { + // + // + rpc ruleInfo (RuleRequest) returns (RulesReply); +} + +//-请求 +message RuleRequest { + +} + +//-回复 +message RulesReply { + // + map rulesInfo = 1; +} + +// +message RuleInfo { + // + bool tf = 1; + + // + string m = 2; + + // + string a = 3; + + // + string p = 4; +} + +// +message RulesInfo { + // + repeated RuleInfo rulesInfo = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/broadcast/message/main.proto b/grpc_api/bilibili/broadcast/message/main.proto new file mode 100644 index 0000000..588a34a --- /dev/null +++ b/grpc_api/bilibili/broadcast/message/main.proto @@ -0,0 +1,189 @@ +syntax = "proto3"; + +package bilibili.broadcast.message.main; + +import "google/protobuf/empty.proto"; + +// +service NativePage { + // + // + rpc watchNotify (google.protobuf.Empty) returns (NativePageEvent); +} + +// +service Resource { + // + // + rpc topActivity (google.protobuf.Empty) returns (TopActivityReply); +} +// +message NativePageEvent { + // + int64 pageID = 1; + + // + repeated EventItem items = 2; +} + +// +message TopActivityReply { + // + TopOnline online = 1; + + // + string hash = 2; +} + +// +message Animate { + // + string icon = 1; + + // + string json = 2; + + // + string svg = 3; + + // + int32 loop = 4; +} + +// +message CommandDm { + // + int64 id = 1; + + // + int64 oid = 2; + + // + int64 mid = 3; + + // + int32 type = 4; + + // + string command = 5; + + // + string content = 6; + + // + int32 state = 7; + + // + int32 progress = 8; + + // + string ctime = 9; + + // + string mtime = 10; + + // + string extra = 11; + + // + string idStr = 12; +} + +// +message DanmakuElem { + // + int64 id = 1; + + // + int32 progress = 2; + + // + int32 mode = 3; + + // + int32 fontsize = 4; + + // + uint32 color = 5; + + // + string midHash = 6; + + // + string content = 7; + + // + int64 ctime = 8; + + // + string action = 9; + + // + int32 pool = 10; + + // + string idStr = 11; +} + +// +message DanmukuEvent { + // + DanmakuElem elems = 1; +} + +// +message EventItem { + // + int64 itemID = 1; + + // + string type = 2; + + // + int64 num = 3; + + // + string displayNum = 4; + + // + string webKey = 5; + + // + int64 dimension = 6; +} + +// +message RedDot { + // + int32 type = 1; + + // + int32 number = 2; +} + +// +message TopOnline { + // + int32 type = 1; + + // + string icon = 2; + + // + string uri = 3; + + // + string uniqueId = 4; + + // + Animate animate = 5; + + // + RedDot redDot = 6; + + // + string name = 7; + + // + int64 interval = 8; +} \ No newline at end of file diff --git a/grpc_api/bilibili/cheese_gateway_player_v1.proto b/grpc_api/bilibili/cheese/gateway/player/v1.proto similarity index 54% rename from grpc_api/bilibili/cheese_gateway_player_v1.proto rename to grpc_api/bilibili/cheese/gateway/player/v1.proto index 6637235..2877775 100644 --- a/grpc_api/bilibili/cheese_gateway_player_v1.proto +++ b/grpc_api/bilibili/cheese/gateway/player/v1.proto @@ -1,8 +1,20 @@ -//APP端课程播放v1接口 syntax = "proto3"; + package bilibili.cheese.gateway.player.v1; -import public "bilibili/app/playurl_v1.proto"; +import "bilibili/app/playurl/v1.proto"; + +service PlayURL { + //课程播放url接口 + //https://app.bilibili.com/bilibili.cheese.gateway.player.v1.PlayURL/PlayView + rpc PlayView (playViewReq) returns (PlayViewReply); +} + +enum CodeType{ + NOCODE = 0; + CODE264 = 1; + CODE265 = 2; +} message PlayAbilityConf{ bool backgroundPlayDisable=1; @@ -36,30 +48,54 @@ message PlayAbilityConf{ } //获取播放url -//https://app.bilibili.com/bilibili.cheese.gateway.player.v1.PlayURL/PlayView //请求 message playViewReq{ - enum CodeType{ - NOCODE = 0; - CODE264 = 1; - CODE265 = 2; - } - int64 epid = 1; //目标剧集epid - int64 cid = 2; //目标视频cid - int64 qn = 3; //清晰度 + //目标课程epid + int64 epid = 1; + + //目标视频cid + int64 cid = 2; + + //清晰度 + int64 qn = 3; + + // int32 fnver = 4; - int32 fnval = 5; //流类型 - uint32 download = 6; //下载配置 0:播放 1:flv下载 2:dash下载 + + //流类型 + int32 fnval = 5; + + //下载模式 + //0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + + //流url强制是用域名 + //0:允许使用ip 1:使用http 2:使用https int32 forceHost = 7; - bool fourk = 8; //是否4K + + //允许4K + bool fourk = 8; + + // string spmid = 9; + + // string fromSpmid = 10; + + // int32 teenagersMode = 11; - CodeType codetype = 12; //编码类型 + + //编码类型 + CodeType codetype = 12; + + //是否强制请求预览视频 bool isPreview = 13; } //回复 message PlayViewReply{ - bilibili.app.playurl.v1.VideoInfo info = 1; //视频信息 - PlayAbilityConf PlayConf = 2; //播放界面配置 + //视频信息 + bilibili.app.playurl.v1.VideoInfo info = 1; + + //播放界面配置 + PlayAbilityConf PlayConf = 2; } \ No newline at end of file diff --git a/grpc_api/bilibili/community/service/dm/v1.proto b/grpc_api/bilibili/community/service/dm/v1.proto new file mode 100644 index 0000000..75e6ff7 --- /dev/null +++ b/grpc_api/bilibili/community/service/dm/v1.proto @@ -0,0 +1,387 @@ +syntax = "proto3"; + +package bilibili.community.service.dm.v1; + +// +message DanmakuAIFlag{ + // + repeated DanmakuFlag dmFlags = 1; +} + +//弹幕条目 +message DanmakuElem{ + //弹幕dmid + int64 id = 1; + + //弹幕出现位置 + int32 progress = 2; + + //弹幕类型 + int32 mode = 3; + + //弹幕字号 + int32 fontsize = 4; + + //弹幕颜色 + uint32 color = 5; + + //发送着UID hash + string midHash = 6; + + //弹幕正文 + string content = 7; + + //发送时间 + int64 ctime = 8; + + //权重 + int32 weight = 9; + + //动作 + string action = 10; + + //弹幕池 + int32 pool = 11; + + //弹幕dmid-str + string idStr = 12; + + //弹幕属性 + //0:正常 4:高赞 16:? + int32 attr = 13; +} + +// +message DanmakuFlag{ + // + int64 dmid = 1; + + // + uint32 flag = 2; +} + +//云屏蔽配置信息 +message DanmakuFlagConfig{ + //云屏蔽等级 + int32 recFlag = 1; + + //云屏蔽文案 + string recText = 2; + + //云屏蔽开关 + int32 recSwitch = 3; +} + +message DanmuDefaultPlayerConfig{ + bool playerDanmakuUseDefaultConfig = 1; + bool playerDanmakuAiRecommendedSwitch = 4; + int32 playerDanmakuAiRecommendedLevel = 5; + bool playerDanmakuBlocktop = 6; + bool playerDanmakuBlockscroll = 7; + bool playerDanmakuBlockbottom = 8; + bool playerDanmakuBlockcolorful = 9; + bool playerDanmakuBlockrepeat = 10; + bool playerDanmakuBlockspecial = 11; + float playerDanmakuOpacity = 12; + float playerDanmakuScalingfactor = 13; + float playerDanmakuDomain = 14; + int32 playerDanmakuSpeed = 15; + bool inlinePlayerDanmakuSwitch = 16; +} + +message DanmuPlayerConfig{ + bool playerDanmakuSwitch = 1; + bool playerDanmakuSwitchSave = 2; + bool playerDanmakuUseDefaultConfig = 3; + bool playerDanmakuAiRecommendedSwitch = 4; + int32 playerDanmakuAiRecommendedLevel = 5; + bool playerDanmakuBlocktop = 6; + bool playerDanmakuBlockscroll = 7; + bool playerDanmakuBlockbottom = 8; + bool playerDanmakuBlockcolorful = 9; + bool playerDanmakuBlockrepeat = 10; + bool playerDanmakuBlockspecial = 11; + float playerDanmakuOpacity = 12; + float playerDanmakuScalingfactor = 13; + float playerDanmakuDomain = 14; + int32 playerDanmakuSpeed = 15; + bool playerDanmakuEnableblocklist = 16; + bool inlinePlayerDanmakuSwitch = 17; + int32 inlinePlayerDanmakuConfig = 18; +} + +message DanmuPlayerDynamicConfig{ + int32 progress = 1; + float playerDanmakuDomain = 2; +} + +message DanmuPlayerViewConfig{ + DanmuDefaultPlayerConfig danmukuDefaultPlayerConfig = 1; + DanmuPlayerConfig danmukuPlayerConfig = 2; + repeated DanmuPlayerDynamicConfig danmukuPlayerDynamicConfig = 3; +} + +message InlinePlayerDanmakuSwitch{ + bool value = 1; +} + +message PlayerDanmakuAiRecommendedLevel{ + bool value = 1; +} + +message PlayerDanmakuAiRecommendedSwitch{ + bool value = 1; +} + +message PlayerDanmakuBlockbottom{ + bool value = 1; +} + +message PlayerDanmakuBlockcolorful{ + bool value = 1; +} + +message PlayerDanmakuBlockrepeat{ + bool value = 1; +} + +message PlayerDanmakuBlockscroll{ + bool value = 1; +} + +message PlayerDanmakuBlockspecial{ + bool value = 1; +} + +message PlayerDanmakuBlocktop{ + bool value = 1; +} + +message PlayerDanmakuDomain{ + float value = 1; +} + +message PlayerDanmakuEnableblocklist{ + bool value = 1; +} + +message PlayerDanmakuOpacity{ + float value = 1; +} + +message PlayerDanmakuScalingfactor{ + float value = 1; +} + +message PlayerDanmakuSpeed{ + int32 value = 1; +} + +message PlayerDanmakuSwitch{ + bool value = 1; +} + +message PlayerDanmakuSwitchSave{ + bool value = 1; +} + +message PlayerDanmakuUseDefaultConfig{ + bool value = 1; +} + +message Response{ + int32 code = 1; + string message = 2; +} + +//单个字幕信息 +message SubtitleItem{ + //字幕id + int64 id = 1; + + //字幕id-str + string idStr = 2; + + //字幕语言代码 + string lan = 3; + + //字幕语言 + string lanDoc = 4; + + //字幕文件url + string subtitleUrl = 5; + + //字幕作者信息 + UserInfo author = 6; +} + +//字幕作者信息 +message UserInfo{ + //作者uid + int64 mid = 1; + + //作者昵称 + string name = 2; + + //作者性别 + string sex = 3; + + //作者头像url + string face = 4; + + //作者个人签名 + string sign = 5; + + // + int32 rank = 6; +} + +//智能防挡弹幕蒙版信息 +message VideoMask{ + //视频cid + int64 cid = 1; + + //平台 + //0:web端 1:app端 + int32 plat = 2; + + //帧率 + int32 fps = 3; + + //间隔时间 + int64 time = 4; + + //蒙版url + string maskUrl = 5; +} + +//视频字幕信息 +message VideoSubtitle{ + //视频原语言代码 + string lan = 1; + + //视频原语言 + string lanDoc = 2; + + //视频字幕列表 + repeated SubtitleItem subtitles = 3; +} + +//修改弹幕配置 +//https://app.bilibili.com/bilibili.community.service.dm.v1.DM/DmPlayerConfig +//请求 +message DmPlayerConfigReq{ + int64 ts = 1; + PlayerDanmakuSwitch switch = 2; + PlayerDanmakuSwitchSave switchSave = 3; + PlayerDanmakuUseDefaultConfig useDefaultConfig = 4; + PlayerDanmakuAiRecommendedSwitch aiRecommendedSwitch = 5; + PlayerDanmakuAiRecommendedLevel aiRecommendedLevel = 6; + PlayerDanmakuBlocktop blocktop = 7; + PlayerDanmakuBlockscroll blockscroll = 8; + PlayerDanmakuBlockbottom blockbottom = 9; + PlayerDanmakuBlockcolorful blockcolorful = 10; + PlayerDanmakuBlockrepeat blockrepeat = 11; + PlayerDanmakuBlockspecial blockspecial = 12; + PlayerDanmakuOpacity opacity = 13; + PlayerDanmakuScalingfactor scalingfactor = 14; + PlayerDanmakuDomain domain = 15; + PlayerDanmakuSpeed speed = 16; + PlayerDanmakuEnableblocklist enableblocklist = 17; + InlinePlayerDanmakuSwitch inlinePlayerDanmakuSwitch = 18; +} + +//获取分段弹幕 +//请求 +message DmSegMobileReq{ + //稿件avid/漫画epid + int64 pid = 1; + + //视频cid/漫画cid + int64 oid = 2; + + //弹幕类型 + //1:视频 2:漫画 + int32 type = 3; + + //分段序号 + int64 segmentIndex = 4; + + //是否青少年模式 + int32 teenagersMode = 5; +} +//回复 +message DmSegMobileReply{ + //弹幕条目 + repeated DanmakuElem elems = 1; + + //是否已关闭弹幕 + //0:未关闭 1:已关闭 + int32 state = 2; + + // + DanmakuAIFlag aiFlag = 3; +} + +//获取弹幕元数据 +//https://app.bilibili.com/bilibili.community.service.dm.v1.DM/DmView +//请求 +message DmViewReq{ + //稿件avid/漫画epid + int64 pid = 1; + + //视频cid/漫画cid + int64 oid = 2; + + //弹幕类型 + //1:视频 2:漫画 + int32 type = 3; + + //页面spm + string spmid = 4; + + //是否冷启 + int32 isHardBoot = 5; +} +//回复 +message DmViewReply{ + //是否已关闭弹幕 + //0:未关闭 1:已关闭 + bool closed = 1; + + //智能防挡弹幕蒙版信息 + VideoMask mask = 2; + + //视频字幕信息 + VideoSubtitle subtitle = 3; + + //高级弹幕专包url + repeated string specialDms = 4; + + //云屏蔽配置信息 + DanmakuFlagConfig aiFlag = 5; + + // + DanmuPlayerViewConfig playerConfig = 6; + + // + int32 sendBoxStyle = 7; + + //是否允许 + bool allow = 8; + + // + string checkBox = 9; + + // + string checkBoxShowMsg = 10; + + // + string textPlaceholder = 11; + + //弹幕输入框文案 + string inputPlaceholder = 12; + + // + repeated string reportFilterContent = 13; +} \ No newline at end of file diff --git a/grpc_api/bilibili/main/community/reply/v1.proto b/grpc_api/bilibili/main/community/reply/v1.proto new file mode 100644 index 0000000..b449143 --- /dev/null +++ b/grpc_api/bilibili/main/community/reply/v1.proto @@ -0,0 +1,774 @@ +//评论区v1接口 +syntax = "proto3"; + +package bilibili.main.community.reply.v1; + +import "google/protobuf/any.proto"; + +service Reply { + //主评论列表接口 + //https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/MainList + rpc MainList(MainListReq) returns (MainListReply); + + //二级评论明细接口 + //https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DetailList + rpc DetailList(DetailListReq) returns (DetailListReply); + + //对话评论树接口 + //https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DialogList + rpc DialogList(DialogListReq) returns (DialogListReply); + + //??? + //https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItemPreHook + rpc SearchItemPreHook(SearchItemPreHookReq) returns (SearchItemPreHookReply); + + //搜索评论区插入项目接口 + //https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItem + rpc SearchItem(SearchItemReq) returns (SearchItemReply); +} + +//排序方式 +enum Mode{ + // + DEFAULT = 0; + + // + UNSPECIFIED = 1; + + //按时间 + MAIN_LIST_TIME = 2; + + //按热度 + MAIN_LIST_HOT = 3; +} + +//页面游标请求 +message CursorReq{ + //下页数据 + int64 next = 1; + + //上页数据 + int64 prev = 2; + + //排序方式 + Mode mode = 4; +} + +//页面游标回复 +message CursorReply{ + //下页数据 + int64 next = 1; + + //上页数据 + int64 prev = 2; + + //是否到顶 + bool isBegin = 3; + + //是否到底 + bool isEnd = 4; + + //排序方式 + Mode mode = 5; +} + +// +enum SearchItemType{ + // + DEFAULT_ITEM_TYPE = 0; + + // + GOODS_VALUE = 1; + + // + VIDEO_VALUE = 2; + + // + ARTICLE_VALUE = 3; +} + +// +enum DetailListScene{ + //评论区展开 + REPLY = 0; + + //回复消息推送 + MSG_FEED = 1; +} + +// +message SearchItemCursorReq{ + // + int64 next = 1; + + // + SearchItemType itemType = 2; +} + +// +message SearchItemCursorReply{ + // + bool hasNext = 1; + + // + int64 next = 2; +} + +//用户信息 +message Member{ + //UID + int64 mid = 1; + + //昵称 + string name = 2; + + //性别 + string sex = 3; + + //头像url + string face = 4; + + //等级 + int64 level = 5; + + //认证类型 + int64 officialVerifyType = 6; + + /****VIP相关****/ + //会员类型 + int64 vipType = 7; + + //会员状态 + int64 vipStatus = 8; + + //会员样式 + int64 vipThemeType = 9; + + //会员铭牌样式url + string vipLabelPath = 10; + + /****装扮相关****/ + //头像框url + string garbPendantImage = 11; + + //装扮卡url + string garbCardImage = 12; + + //有关注按钮时的装扮卡url + string garbCardImageWithFocus = 13; + + //专属装扮页面url + string garbCardJumpUrl = 14; + + //专属装扮id + string garbCardNumber = 15; + + //专属装扮id显示颜色 + string garbCardFanColor = 16; + + //是否为专属装扮卡 + bool garbCardIsFan = 17; + + /****粉丝勋章相关****/ + //粉丝勋章名 + string fansMedalName = 18; + + //粉丝勋章等级 + int64 fansMedalLevel = 19; + + //粉丝勋章显示颜色 + int64 fansMedalColor = 20; +} + +//表情项 +message Emote{ + //表情大小 + //1:小 2:大 + int64 size = 1; + + //表情url + string url = 2; +} + +//话题项 +message Topic{ + //跳转url + string link = 1; + + //话题id + int64 id = 2; +} + +//超链项 +message Url{ + //标题 + string title = 1; + + // + int64 state = 2; + + //图标url + string prefixIcon = 3; + + // + string appUrlSchema = 4; + + // + string appName = 5; + + // + string appPackageName = 6; + + // + string clickReport = 7; +} + +//投票信息 +message Vote{ + //投票id + int64 id = 1; + + //投票标题 + string title = 2; + + //参与人数 + int64 count = 3; +} + +//评论主体信息 +message Content{ + //评论文本 + string message = 1; + + //at到的用户信息 + map menber = 2; + + //需要渲染的表情转义 + map emote = 3; + + //需要高亮的话题转义 + map topic = 4; + + //需要高亮的超链转义 + map url = 5; + + //投票信息 + Vote vote = 6; +} + +//评论条目控制字段 +message ReplyControl{ + //操作行为标志 + //0:无 1:已点赞 2:已点踩 + int64 action = 1; + + //是否UP觉得很赞 + bool upLike = 2; + + //是否存在UP回复 + bool upReply = 3; + + //是否显示关注按钮 + bool showFollowBtn = 4; + + //是否协管 + bool isAssist = 5; + + //评论标签? + string labelText = 6; + + //是否关注 + bool following = 7; + + //是否粉丝 + bool followed = 8; + + //是否被自己拉黑 + bool blocked = 9; + + //是否存在折叠的二级评论 + bool hasFoldedReply = 10; + + //是否折叠 + bool isFoldedReply = 11; + + //是否UP置顶 + bool isUpTop = 12; + + //是否管理置顶 + bool isAdminTop = 13; + + //是否置顶投票评论 + bool isVoteTop = 14; + + //最大收起显示行数 + int64 maxLine = 15; + + // + bool invisible = 16; +} + +//评论条目信息 +message ReplyInfo{ + //二级评论列表 + repeated ReplyInfo replies = 1; + + //评论rpid + int64 id = 2; + + //评论区对象id + int64 oid = 3; + + //评论区类型 + int64 type = 4; + + //发布者UID + int64 mid = 5; + + //根评论rpid + int64 root = 6; + + //父评论rpid + int64 parent = 7; + + //对话评论rpid + int64 dialog = 8; + + //点赞数 + int64 like = 9; + + //发布时间 + int64 ctime = 10; + + //回复数 + int64 count = 11; + + //评论主体信息 + Content content = 12; + + //发布者信息 + Member member = 13; + + //评论控制字段 + ReplyControl replyControl = 14; +} + +//评论区控制字段 +message SubjectControl{ + //UP主UID + int64 upMid = 1; + + //自己是否为协管 + bool isAssist = 2; + + //是否只读 + bool readOnly = 3; + + //是否有发起投票权限 + bool hasVoteAccess = 4; + + //是否有发起抽奖权限 + bool hasLotteryAccess = 5; + + //是否有被折叠评论 + bool hasFoldedReply = 6; + + //空评论区背景文案 + string bgText = 7; + + //是否被UP拉黑 + bool upBlocked = 8; + + //是否有发起活动权限 + bool hasActivityAccess = 9; + + //标题展示控制 + bool showTitle = 10; + + //是否显示UP主操作标志 + bool showUpAction = 11; + + //是否显示评论区排序切换按钮 + int64 switcherType = 12; + + //是否禁止输入框 + bool inputDisable = 13; + + //根评论输入框背景文案 + string rootText = 14; + + //子评论输入框背景文案 + string childText = 15; + + //评论总数 + int64 count = 16; + + //评论区标题 + string title = 17; +} + +// +message Notice{ + // + int64 id = 1; + + // + string content = 2; + + // + string link = 3; +} + +// +message Lottery{ + // + int64 lotteryId = 1; + + // + int64 lotteryStatus = 2; + + // + int64 lotteryMid = 3; + + // + int64 lotteryTime = 4; + + // + int64 oid = 5; + + // + int64 type = 6; + + // + int64 ctime = 7; + + // + Content content = 8; + + // + Member member = 9; + + // + ReplyControl replyControl = 10; +} + +// +message Activity{ + // + int64 activityId = 1; + + // + int64 activityState = 2; + + // + string activityPlaceholder = 3; +} + +// +message UpSelection{ + // + int64 pendingCount = 1; + + // + int64 ignoreCount = 2; +} + +// +message CM{ + // + google.protobuf.Any sourceContent = 1; +} + +// +message ArticleSearchItem{ + // + string title = 1; + + // + string upNickname = 2; + + // + repeated string covers = 3; +} + +// +message GoodsSearchItem{ + // + int64 id = 1; + + // + string name = 2; + + // + string price = 3; + + // + string income = 4; + + // + string img = 5; + + // + string label = 6; +} + +// +enum VideoItemCase{ + // + VIDEOITEM_NOT_SET = 0; + + // + UGC = 2; + + // + PGC = 3; +} + +// +message UGCVideoSearchItem{ + // + string title = 1; + + // + string upNickname = 2; + + // + int64 duration = 3; + + // + string cover = 4; +} + +// +message PGCVideoSearchItem{ + // + string title = 1; + + // + string category = 2; + + // + string cover = 3; +} + +// +message VideoSearchItem{ + // + VideoItemCase type = 1; + + // + UGCVideoSearchItem UGCVideo = 2; + + // + PGCVideoSearchItem PGCVideo = 3; +} + +// +enum ItemCase{ + // + ITEM_NOT_SET = 0; + + // + GOODS = 2; + + // + VIDEO = 3; + + // + ARTICLE = 4; +} + +// +message SearchItem{ + // + string url = 1; + + // + GoodsSearchItem goods = 2; + + // + VideoSearchItem video = 3; + + // + ArticleSearchItem article = 4; +} + +// +message SearchItemReplyExtraInfo{ + // + string eventId = 1; +} + +//主评论列表 +//请求 +message MainListReq{ + //目标评论区id + int64 oid = 1; + + //评论区类型 + int64 type = 2; + + //页面游标 + CursorReq cursor = 3; + + // + string extra = 4; + + // + string adExtra = 5; + + // + int64 rpid = 6; +} +//回复 +message MainListReply{ + //页面游标 + CursorReply cursor = 1; + + //评论列表 + repeated ReplyInfo replies = 2; + + //评论区显示控制 + SubjectControl subjectControl = 3; + + //UP置顶评论 + ReplyInfo upTop = 4; + + //管理员置顶评论 + ReplyInfo adminTop = 5; + + //投票置顶评论 + ReplyInfo voteTop = 6; + + // + Notice notice = 7; + + //抽奖评论 + Lottery lottery = 8; + + // + Activity activity = 9; + + // + UpSelection upSelection = 10; + + // + CM cm = 11; +} + +//二级评论明细 +//请求 +message DetailListReq{ + //目标评论区id + int64 oid = 1; + + //评论区类型 + int64 type = 2; + + //根评论rpid + int64 root = 3; + + //目标评论rpid + int64 rpid = 4; + + //页面游标 + CursorReq cursor = 5; + + //来源标识 + DetailListScene scene = 6; +} +//回复 +message DetailListReply{ + //页面游标 + CursorReply cursor = 1; + + //评论区显示控制 + SubjectControl subjectControl = 2; + + //根评论信息(带二级评论) + ReplyInfo root = 3; + + // + Activity activity = 4; +} + +//对话评论树 +//请求 +message DialogListReq{ + //目标评论区id + int64 oid = 1; + + //评论区类型 + int64 type = 2; + + //根评论rpid + int64 root = 3; + + //目标评论rpid + int64 rpid = 4; + + //页面游标 + CursorReq cursor = 5; +} +//回复 +message DialogListReply{ + //页面游标 + CursorReply cursor = 1; + + //评论区显示控制 + SubjectControl subjectControl = 2; + + //评论树列表 + repeated ReplyInfo replies = 3; + + // + Activity activity = 4; +} + +//搜索提示信息? +//请求 +message SearchItemPreHookReq{ + //目标评论区id + int64 oid = 1; + + //评论区类型 + int64 type = 2; +} +//回复 +message SearchItemPreHookReply{ + // + string placeholderText = 1; + + // + string backgroundText = 2; + + // + repeated SearchItemType orderedType = 3; +} + +//搜索评论区插入项目 +//请求 +message SearchItemReq{ + //页面游标 + SearchItemCursorReq cursor = 1; + + //目标评论区id + int64 oid = 2; + + //评论区类型 + int64 type = 3; + + //搜索关键词 + string keyword = 4; +} +//回复 +message SearchItemReply{ + // + SearchItemCursorReply cursor = 1; + + // + repeated SearchItem items = 2; + + // + SearchItemReplyExtraInfo extra = 3; +} \ No newline at end of file diff --git a/grpc_api/bilibili/main_community_reply_v1.proto b/grpc_api/bilibili/main_community_reply_v1.proto deleted file mode 100644 index b62ad80..0000000 --- a/grpc_api/bilibili/main_community_reply_v1.proto +++ /dev/null @@ -1,340 +0,0 @@ -//评论区v1接口 -syntax = "proto3"; -package bilibili.main.community.reply.v1; - -import "google/protobuf/any.proto"; - -message CursorReq{ - enum Mode{ - DEFAULT = 0; - UNSPECIFIED = 1; - MAIN_LIST_TIME = 2; - MAIN_LIST_HOT = 3; - } - int64 next = 1; - int64 prev = 2; - Mode mode = 3; //排序模式 -} - -message CursorReply{ - enum Mode{ - DEFAULT = 0; - UNSPECIFIED = 1; - MAIN_LIST_TIME = 2; - MAIN_LIST_HOT = 3; - } - int64 next = 1; - int64 prev = 2; - bool isBegin = 3; - bool isEnd = 4; - Mode mode = 5; -} - -enum SearchItemType{ - DEFAULT_ITEM_TYPE = 0; - GOODS_VALUE = 1; - VIDEO_VALUE = 2; - ARTICLE_VALUE = 3; -} - -message SearchItemCursorReq{ - int64 next = 1; - SearchItemType itemType = 2; -} - -message SearchItemCursorReply{ - bool hasNext = 1; - int64 next = 2; -} - -message Member{ - int64 mid = 1; //UID - string name = 2; //昵称 - string sex = 3; //性别 - string face = 4; //头像url - int64 level = 5; //等级 - int64 officialVerifyType = 6; //认证类型 - int64 vipType = 7; //会员类型 - int64 vipStatus = 8; //会员状态 - int64 vipThemeType = 9; - string vipLabelPath = 10; - string garbPendantImage = 11; //头像框url - string garbCardImage = 12; //装扮卡url - string garbCardImageWithFocus = 13; - string garbCardJumpUrl = 14;//专属装扮页url - string garbCardNumber = 15;//专属装扮id - string garbCardFanColor = 16;//专属装扮id显示颜色 - bool garbCardIsFan = 17;//是否为专属装扮卡 - string fansMedalName = 18; - int64 fansMedalLevel = 19; - int64 fansMedalColor = 20; -} - -message Content{ - message Emote{ - int64 size = 1;//表情大小 1:小 2:大 - string url = 2;//标签url - } - message Topic{ - string link = 1; - int64 id = 2; - } - message Url{ - string title = 1; //标题 - int64 state = 2; - string prefixIcon = 3; //图标url - string appUrlSchema = 4; - string appName = 5; - string appPackageName = 6; - string clickReport = 7; - } - message Vote{ - int64 id = 1; - string title = 2; - int64 count = 3; - } - string message = 1; //评论正文 - map menber = 2; //at到的用户信息 - map emote = 3; //表情转义 - map topic = 4; //话题转义 - map url = 5; //扩展应用转义 - Vote vote = 6; -} - -message ReplyControl{ - int64 action = 1; //操作标志 0:无 1:已点赞 2:已点踩 - bool upLike = 2; //是否UP觉得很赞 - bool upReply = 3; //是否存在UP回复 - bool showFollowBtn = 4; //是否显示关注按钮 - bool isAssist = 5; - string labelText = 6; - bool following = 7; //是否关注 - bool followed = 8; //是否粉丝 - bool blocked = 9; - bool hasFoldedReply = 10; - bool isFoldedReply = 11; - bool isUpTop = 12; //是否UP置顶 - bool isAdminTop = 13; //是否管理置顶 - bool isVoteTop = 14; //是否投票评论 - int64 maxLine = 15; //最大收起行数 - bool invisible = 16; -} - -message ReplyInfo{ - repeated ReplyInfo replies = 1; //二级评论 - int64 id = 2; //rpid - int64 oid = 3; //对象id - int64 type = 4; //评论区类型id - int64 mid = 5; //发布者UID - int64 root = 6; //根评论rpid - int64 parent = 7; //父评论rpid - int64 dialog = 8; //对话评论rpid - int64 like = 9; //点赞数 - int64 ctime = 10; //发布时间 - int64 count = 11; //回复数 - Content content = 12; //评论主体信息 - Member member = 13; //评论发布者信息 - ReplyControl replyControl = 14; //评论显示控制项 -} - -message SubjectControl{ - int64 upMid = 1; //UP主UID - bool isAssist = 2; - bool readOnly = 3; - bool hasVoteAccess = 4; - bool hasLotteryAccess = 5; - bool hasFoldedReply = 6; - string bgText = 7; //空评论背景文字 - bool upBlocked = 8; - bool hasActivityAccess = 9; - bool showTitle = 10; - bool showUpAction = 11; - int64 switcherType = 12; - bool inputDisable = 13; - string rootText = 14; //输入框背景文字 - string childText = 15; - int64 count = 16; //评论总数 - string title = 17; //评论区标题 -} - -message Notice{ - int64 id = 1; - string content = 2; - string link = 3; -} - -message Lottery{ - int64 lotteryId = 1; - int64 lotteryStatus = 2; - int64 lotteryMid = 3; - int64 lotteryTime = 4; - int64 oid = 5; - int64 type = 6; - int64 ctime = 7; - Content content = 8; - Member member = 9; - ReplyControl replyControl = 10; -} - -message Activity{ - int64 activityId = 1; - int64 activityState = 2; - string activityPlaceholder = 3; -} - -message UpSelection{ - int64 pendingCount = 1; - int64 ignoreCount = 2; -} - -message CM{ - google.protobuf.Any sourceContent = 1; -} - -message SearchItem{ - message ArticleSearchItem{ - string title = 1; - string upNickname = 2; - repeated string covers = 3; - } - message GoodsSearchItem{ - int64 id = 1; - string name = 2; - string price = 3; - string income = 4; - string img = 5; - string label = 6; - } - message VideoSearchItem{ - enum VideoItemCase{ - VIDEOITEM_NOT_SET = 0; - UGC = 2; - PGC = 3; - } - message UGCVideoSearchItem{ - string title = 1; - string upNickname = 2; - int64 duration = 3; - string cover = 4; - } - message PGCVideoSearchItem{ - string title = 1; - string category = 2; - string cover = 3; - } - VideoItemCase type = 1; - UGCVideoSearchItem UGCVideo = 2; - PGCVideoSearchItem PGCVideo = 3; - } - enum ItemCase{ - ITEM_NOT_SET = 0; - GOODS = 2; - VIDEO = 3; - ARTICLE = 4; - } - string url = 1; - GoodsSearchItem goods = 2; - VideoSearchItem video = 3; - ArticleSearchItem article = 4; -} - -message SearchItemReplyExtraInfo{ - string eventId = 1; -} - -//评论列表 -//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/MainList -//请求 -message MainListReq{ - int64 oid = 1; //目标评论区id - int64 type = 2; //评论区类型 - CursorReq cursor = 3; //页面选择 - string extra = 4; - string adExtra = 5; - int64 rpid = 6; -} -//回复 -message MainListReply{ - CursorReply cursor = 1; //页面信息 - repeated ReplyInfo replies = 2; //评论条目 - SubjectControl subjectControl = 3; //评论区显示控制 - ReplyInfo upTop = 4; //UP置顶评论 - ReplyInfo adminTop = 5; //管理置顶评论 - ReplyInfo voteTop = 6; //投票评论 - Notice notice = 7; - Lottery lottery = 8; //抽奖评论 - Activity activity = 9; - UpSelection upSelection = 10; - CM cm = 11; -} - -//二级评论明细 -//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DetailList -//请求 -message DetailListReq{ - enum DetailListScene{ - REPLY = 0; //评论区展开 - MSG_FEED = 1; //回复消息推送 - } - int64 oid = 1; //目标评论区id - int64 type = 2; //评论区类型 - int64 root = 3; //根评论rpid - int64 rpid = 4; //目标评论rpid - CursorReq cursor = 5; //页面选择 - DetailListScene scene = 6; //来源标识 -} -//回复 -message DetailListReply{ - CursorReply cursor = 1; //页面信息 - SubjectControl subjectControl = 2; //评论区显示控制 - ReplyInfo root = 3; //根评论信息(带二级评论) - Activity activity = 4; -} - -//对话评论回复树 -//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DialogList -//请求 -message DialogListReq{ - int64 oid = 1; //目标评论区id - int64 type = 2; //评论区类型 - int64 root = 3; //根评论rpid - int64 rpid = 4; //目标评论rpid - CursorReq cursor = 5; //页面选择 -} -//回复 -message DialogListReply{ - CursorReply cursor = 1; //页面信息 - SubjectControl subjectControl = 2; //评论区显示控制 - repeated ReplyInfo replies = 3; //评论树列表 - Activity activity = 4; -} - -//搜索提示信息? -//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItemPreHook -//请求 -message SearchItemPreHookReq{ - int64 oid = 1; //目标评论区id - int64 type = 2; //评论区类型 -} -//回复 -message SearchItemPreHookReply{ - string placeholderText = 1; - string backgroundText = 2; - repeated SearchItemType orderedType = 3; -} - -//搜索评论区插入项目 -//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItem -//请求 -message SearchItemReq{ - SearchItemCursorReq cursor = 1; //页面选择 - int64 oid = 2; //目标评论区id - int64 type = 3; //评论区类型 - string keyword = 4; //搜索关键词 -} -//回复 -message SearchItemReply{ - SearchItemCursorReply cursor = 1; - repeated SearchItem items = 2; - SearchItemReplyExtraInfo extra = 3; -} \ No newline at end of file diff --git a/grpc_api/bilibili/metadata/device.proto b/grpc_api/bilibili/metadata/device.proto index 10a5c37..4dfaef6 100644 --- a/grpc_api/bilibili/metadata/device.proto +++ b/grpc_api/bilibili/metadata/device.proto @@ -1,20 +1,46 @@ syntax = "proto3"; + package bilibili.metadata.device; //环境参数1 //x-bili-device-bin message Device{ + //产品id int32 appId = 1; + + //构建id int32 build = 2; + + //设备buvid string buvid = 3; + + //包类型 string mobiApp = 4; + + //平台类型 string platform = 5; + + //设备类型 string device = 6; + + //渠道 string channel = 7; + + //品牌 string brand = 8; + + //型号 string model = 9; + + //系统版本 string osver = 10; + + // string fpLocal = 11; + + // string fpRemote = 12; + + //APP版本号 string versionName = 13; } \ No newline at end of file diff --git a/grpc_api/bilibili/metadata/locale.proto b/grpc_api/bilibili/metadata/locale.proto index 07f9b60..e8f9bcf 100644 --- a/grpc_api/bilibili/metadata/locale.proto +++ b/grpc_api/bilibili/metadata/locale.proto @@ -1,10 +1,30 @@ syntax = "proto3"; + package bilibili.metadata.locale; +message LocaleIds{ + // + string language = 1; + + // + string script = 2; + + // + string region = 3; +} + //区域标识 //x-bili-locale-bin -message LocaleIds{ - string language = 1; - string script = 2; - string region = 3; -} \ No newline at end of file +message Locale { + //App设置的locale + LocaleIds c_locale = 1; + + //系统默认的locale + LocaleIds s_locale = 2; + + //sim卡的国家码+运营商码 + string sim_code = 3; + + //时区 + string timezone = 4; +} diff --git a/grpc_api/bilibili/metadata/metadata.proto b/grpc_api/bilibili/metadata/metadata.proto index 12a7508..b460ae1 100644 --- a/grpc_api/bilibili/metadata/metadata.proto +++ b/grpc_api/bilibili/metadata/metadata.proto @@ -1,23 +1,28 @@ syntax = "proto3"; + package bilibili.metadata; //环境参数2 //x-bili-metadata-bin message Metadata{ + //登录Token string accessKey = 1; + + //包类型 string mobiApp = 2; + + //设备类型 string device = 3; + + //构建id int32 build = 4; + + //渠道 string channel = 5; + + //设备buvid string buvid = 6; + + //平台类型 string platform = 7; } - -import "google/protobuf/any.proto"; -//接口回复报错信息 -//grpc-status-details-bin -message Status{ - int32 code = 1; //错误码 - string message = 2; //错误信息 - repeated google.protobuf.Any details = 3; //套娃专用 -} \ No newline at end of file diff --git a/grpc_api/bilibili/metadata/network.proto b/grpc_api/bilibili/metadata/network.proto index 5b518e0..095d470 100644 --- a/grpc_api/bilibili/metadata/network.proto +++ b/grpc_api/bilibili/metadata/network.proto @@ -1,25 +1,61 @@ syntax = "proto3"; + package bilibili.metadata.network; +//网络类型 enum Type{ + //未知 NT_UNKNOWN = 0; - WIFI = 1; //wifi - CELLULAR = 2; //蜂窝网络 - OFFLINE = 3; //离线 - ETHERNET = 5; //以太网 - OTHERNET = 4; //其他 + + //wifi + WIFI = 1; + + //蜂窝网络 + CELLULAR = 2; + + //未连接 + OFFLINE = 3; + + //以太网 + ETHERNET = 5; + + //其他 + OTHERNET = 4; } -/* -enum Tf{ +//免流类型 +enum TFType { + //正常计费 + TF_UNKNOWN = 0; -}*/ + //联通卡 + U_CARD = 1; + + //联通包 + U_PKG = 2; + + //移动卡 + C_CARD = 3; + + //移动包 + C_PKG = 4; + + //电信卡 + T_CARD = 5; + + //电信包 + T_PKG = 6; +} //网络类型标识 //x-bili-network-bin message Network{ - Type type = 1; //网络类型 - //Tf tf = 2; - int32 tf = 2; + //网络类型 + Type type = 1; + + //免流类型 + TFType tf = 2; + + //运营商 string oid = 3; } \ No newline at end of file diff --git a/grpc_api/bilibili/metadata/restriction.proto b/grpc_api/bilibili/metadata/restriction.proto index 640bf26..37f3e54 100644 --- a/grpc_api/bilibili/metadata/restriction.proto +++ b/grpc_api/bilibili/metadata/restriction.proto @@ -1,8 +1,30 @@ syntax = "proto3"; + package bilibili.metadata.restriction; +//模式类型 enum ModeType{ - NORMAL = 0; - TEENAGERS = 1; - LESSONS = 2; -} \ No newline at end of file + //正常 + NORMAL = 0; + + //青少年模式 + TEENAGERS = 1; + + //课堂模式 + LESSONS = 2; +} + +//限制条件 +message Restriction { + //青少年模式开关状态 + bool teenagers_mode = 1; + + //课堂模式开关状态 + bool lessons_mode = 2; + + //模式类型 + ModeType mode = 3; + + //app审核review状态 + bool review = 4; +} diff --git a/grpc_api/bilibili/pgc/gateway/player/v2.proto b/grpc_api/bilibili/pgc/gateway/player/v2.proto new file mode 100644 index 0000000..5a4c2a3 --- /dev/null +++ b/grpc_api/bilibili/pgc/gateway/player/v2.proto @@ -0,0 +1,409 @@ +//https://app.bilibili.com/bilibili.pgc.gateway.player.v2.PlayURL/PlayView +syntax = "proto3"; + +package bilibili.pgc.gateway.player.v2; + +import "google/protobuf/timestamp.proto"; + +enum CodeType{ + NOCODE = 0; + CODE264 = 1; + CODE265 = 2; +} + +//不满足条件信息 +message Limit{ + // + string title=1; + + // + string uri=2; + + // + string msg=3; +} + +//流媒体元数据 +message streamInfo{ + //清晰度 qn + uint32 quality=1; + + //格式 + string format=2; + + //格式描述 + string description=3; + + //错误码 + uint32 errCode=4; + + //不满足条件信息 + Limit limit=5; + + //是否需要vip + bool needVip=6; + + //是否需要登录 + bool needLogin=7; + + //是否完整 + bool intact=8; + + //是否非全二压 + bool noRexcode=9; + + // + int64 attribute=10; + + //新版格式描述 + string newDescription=11; + + //格式文字 + string displayDesc=12; + + //新版格式描述备注 + string superscript=13; +} + +//dash视频流 +message DashVideo{ + //主线流 + string baseUrl=1; + + //备用流 + repeated string backupUrl=2; + + //带宽 + uint32 bandwidth=3; + + // + uint32 codecid=4; + + //md5 + string md5=5; + + //大小 + uint64 size=6; + + // + uint32 audioId=7; + + //是否非全二压 + bool noRexcode=8; +} + +//分段流条目 +message ResponseUrl{ + //分段序号 + uint32 order = 1; + + //分段时长 + uint64 length = 2; + + //分段大小 + uint64 size = 3; + + //主线流 + string url = 4; + + //备用流 + repeated string backupUrl = 5; + + //md5 + string md5 = 6; +} + +//分段视频流 +message SegmentVideo{ + //分段视频流列表 + repeated ResponseUrl segment=1; +} + +//视频流信息 +message stream{ + //元数据 + streamInfo info=1; + + //dash流 + DashVideo dashvideo=2; + + //分段流 + SegmentVideo segmentvideo=3; +} + +//dash音频流 +message DashAudio{ + //音质id + uint32 id=1; + + //主线流 + string baseUrl=2; + + //备用流 + repeated string backupUrl=3; + + //带宽 + uint32 bandwidth=4; + + // + uint32 codecid=5; + + //md5 + string md5=6; + + //大小 + uint64 size=7; +} + +//杜比音频信息 +message DolbyItem{ + // + int32 type=1; + + //音频流 + DashAudio audio=2; +} + +//视频url信息 +message VideoInfo{ + //视频清晰度 + uint32 quality=1; + + //视频格式 + string format=2; + + //视频时长 + uint64 timelength=3; + + // + uint32 videoCodecid=4; + + //视频流 + repeated stream streamList=5; + + //伴音流 + repeated DashAudio audio=6; + + //杜比伴音流 + DolbyItem dolby=7; +} + +message PlayAbilityConf{ + bool backgroundPlayDisable=1; + bool flipDisable=2; + bool castDisable=3; + bool feedbackDisable=4; + bool subtitleDisable=5; + bool playbackRateDisable=6; + bool timeUpDisable=7; + bool playbackModeDisable=8; + bool scaleModeDisable=9; + bool likeDisable=10; + bool dislikeDisable=11; + bool coinDisable=12; + bool elecDisable=13; + bool shareDisable=14; + bool screenShotDisable=15; + bool lockScreenDisable=16; + bool recommendDisable=17; + bool playbackSpeedDisable=18; + bool definitionDisable=19; + bool selectionsDisable=20; + bool nextDisable=21; + bool editDmDisable=22; + bool smallWindowDisable=23; + bool shakeDisable=24; + bool outerDmDisable=25; + bool innerDmDisable=26; + bool freyaEnterDisable=27; + bool dolbyDisable=28; +} + +message PlayViewBusinessInfo{ + bool isPreview=1; + bool bp=2; + string marlinToken=3; +} + +message Shake{ + string file=1; +} + +message Event{ + Shake shake=1; +} + +message Report{ + string showEventId=1; + string clickEventId=2; + string extends=3; +} + +message BadgeInfo{ + string text=1; + string bgColor=2; + string bgColorNight=3; +} + +message ButtonInfo{ + string text=1; + string textColor=2; + string textColorNight=3; + string bgColor=4; + string bgColorNight=5; + string link=6; + string actionType=7; + BadgeInfo badgeInfo=8; + Report report=9; +} + +message DialogConfig{ + bool isShowCover=1; + bool isOrientationEnable=2; + bool isNestedScrollEnable=3; + bool isForceHalfscreenEnable=4; +} + +message TextInfo{ + string text=1; + string textColor=2; + string textColorNight=3; +} + +message ImageInfo{ + string url=1; +} + +message Dialog{ + int64 code=1; + string msg=2; + string type=3; + string styleType=4; + DialogConfig config=5; + TextInfo title=6; + TextInfo subtitle=7; + ImageInfo image=8; + repeated ButtonInfo button=9; + ButtonInfo bottomDesc=10; + Report report=11; + int32 countDownSec=12; +} + +message Toast{ + string text=1; + ButtonInfo button=2; +} + +message CouponTextInfo{ + string positivePreview=1; + string section=2; +} + +message CouponToast{ + CouponTextInfo textInfo=1; + ButtonInfo button=2; +} + +message Coupon{ + string couponToken=1; + int64 type=2; + string value=3; + string useDesc=4; + string title=5; + string desc=6; + string payButtonText=7; + string payButtonTextLineThrough=8; + string realAmount=9; + google.protobuf.Timestamp expireTime=10; +} + +message PopWin{ + string title=1; + repeated Coupon coupon=2; + repeated ButtonInfo button=3; + string bottomText=4; +} + +message CouponInfo{ + CouponToast toast=1; + PopWin popWin=2; +} + +message EndPage{ + Dialog dialog=1; + bool hide=2; +} + +message ViewInfo{ + Dialog dialog=1; + Toast toast=2; + CouponInfo couponInfo=3; + repeated int64 demandNoPayEpids=4; + EndPage endPage=5; +} + +//请求 +message playViewReq{ + //目标剧集epid + int64 epid = 1; + + //目标视频cid + int64 cid = 2; + + //清晰度 + int64 qn = 3; + + // + int32 fnver = 4; + + //流类型 + int32 fnval = 5; + + //下载模式 + //0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + + // + int32 forceHost = 7; + + //是否允许4K + bool fourk = 8; + + // + string spmid = 9; + + // + string fromSpmid = 10; + + // + int32 teenagersMode = 11; + + //编码类型 + CodeType codetype = 12; + + // + bool isPreview = 13; + + // + int64 roomId = 14; + + // + bool isNeedViewInfo = 15; +} +//回复 +message PlayViewReply{ + //视频流信息 + VideoInfo info=1; + + //用户播放界面配置 + PlayAbilityConf PlayConf=2; + + // + PlayViewBusinessInfo Business=3; + + // + Event event=4; + + // + ViewInfo viewInfo=5; +} \ No newline at end of file diff --git a/grpc_api/bilibili/pgc/gateway_player_v2.proto b/grpc_api/bilibili/pgc/gateway_player_v2.proto deleted file mode 100644 index f828a15..0000000 --- a/grpc_api/bilibili/pgc/gateway_player_v2.proto +++ /dev/null @@ -1,245 +0,0 @@ -//APP端PGC播放v2接口 -//https://app.bilibili.com/bilibili.pgc.gateway.player.v2.PlayURL/PlayView -syntax = "proto3"; -package bilibili.pgc.gateway.player.v2; - -import "google/protobuf/timestamp.proto"; - -message playViewReq{ - enum CodeType{ - NOCODE = 0; - CODE264 = 1; - CODE265 = 2; - } - int64 epid = 1; //目标剧集epid - int64 cid = 2; //目标视频cid - int64 qn = 3; //清晰度 - int32 fnver = 4; - int32 fnval = 5; //流类型 - uint32 download = 6; //下载配置 0:播放 1:flv下载 2:dash下载 - int32 forceHost = 7; - bool fourk = 8; //是否4K - string spmid = 9; - string fromSpmid = 10; - int32 teenagersMode = 11; - CodeType codetype = 12; //编码类型 - bool isPreview = 13; - int64 roomId = 14; - bool isNeedViewInfo = 15; -} - -message VideoInfo{ - message stream{ - message streamInfo{ - message Limit{ - string title=1; - string uri=2; - string msg=3; - } - uint32 quality=1;//清晰度 - string format=2;//格式 - string description=3;//格式描述 - uint32 errCode=4; - Limit limit=5; - bool needVip=6;//需要vip - bool needLogin=7;//需要登录 - bool intact=8; - bool noRexcode=9; - int64 attribute=10; - string newDescription=11;//新版格式描述 - string displayDesc=12;//格式文字 - string superscript=13;//新版格式描述备注 - } - message DashVideo{ - string baseUrl=1;//主线流 - repeated string backupUrl=2;//备用流 - uint32 bandwidth=3;//带宽 - uint32 codecid=4; - string md5=5;//md5 - uint64 size=6;//大小 - uint32 audioId=7; - bool noRexcode=8; - } - message SegmentVideo{ - message ResponseUrl{ - uint32 order=1; - uint64 length=2; - uint64 size=3; - string url=4; - repeated string backupUrl=5; - string md5=6; - } - repeated ResponseUrl segment=1; - } - streamInfo info=1;//元数据 - DashVideo dashvideo=2;//dash流 - SegmentVideo segmentvideo=3;//flv流 - } - message DashAudio{ - uint32 id=1; - string baseUrl=2;//主线流 - repeated string backupUrl=3;//备用流 - uint32 bandwidth=4;//带宽 - uint32 codecid=5;// - string md5=6;//md5 - uint64 size=7;//大小 - } - message DolbyItem{ - int32 type=1; - DashAudio audio=2; - } - uint32 quality=1;//视频清晰度 - string format=2;//视频格式 - uint64 timelength=3;//视频时长 - uint32 videoCodecid=4;// - repeated stream streamList=5;//视频流 - repeated DashAudio audio=6;//伴音流 - DolbyItem dolby=7;//杜比伴音流 -} - -message PlayAbilityConf{ - bool backgroundPlayDisable=1; - bool flipDisable=2; - bool castDisable=3; - bool feedbackDisable=4; - bool subtitleDisable=5; - bool playbackRateDisable=6; - bool timeUpDisable=7; - bool playbackModeDisable=8; - bool scaleModeDisable=9; - bool likeDisable=10; - bool dislikeDisable=11; - bool coinDisable=12; - bool elecDisable=13; - bool shareDisable=14; - bool screenShotDisable=15; - bool lockScreenDisable=16; - bool recommendDisable=17; - bool playbackSpeedDisable=18; - bool definitionDisable=19; - bool selectionsDisable=20; - bool nextDisable=21; - bool editDmDisable=22; - bool smallWindowDisable=23; - bool shakeDisable=24; - bool outerDmDisable=25; - bool innerDmDisable=26; - bool freyaEnterDisable=27; - bool dolbyDisable=28; -} - -message PlayViewBusinessInfo{ - bool isPreview=1; - bool bp=2; - string marlinToken=3; -} - -message Event{ - message Shake{ - string file=1; - } - Shake shake=1; -} - -message ViewInfo{ - message Report{ - string showEventId=1; - string clickEventId=2; - string extends=3; - } - message ButtonInfo{ - message BadgeInfo{ - string text=1; - string bgColor=2; - string bgColorNight=3; - } - string text=1; - string textColor=2; - string textColorNight=3; - string bgColor=4; - string bgColorNight=5; - string link=6; - string actionType=7; - BadgeInfo badgeInfo=8; - Report report=9; - } - message Dialog{ - message DialogConfig{ - bool isShowCover=1; - bool isOrientationEnable=2; - bool isNestedScrollEnable=3; - bool isForceHalfscreenEnable=4; - } - message TextInfo{ - string text=1; - string textColor=2; - string textColorNight=3; - } - message ImageInfo{ - string url=1; - } - int64 code=1; - string msg=2; - string type=3; - string styleType=4; - DialogConfig config=5; - TextInfo title=6; - TextInfo subtitle=7; - ImageInfo image=8; - repeated ButtonInfo button=9; - ButtonInfo bottomDesc=10; - Report report=11; - int32 countDownSec=12; - } - message Toast{ - string text=1; - ButtonInfo button=2; - } - message CouponInfo{ - message CouponToast{ - message CouponTextInfo{ - string positivePreview=1; - string section=2; - } - CouponTextInfo textInfo=1; - ButtonInfo button=2; - } - message PopWin{ - message Coupon{ - string couponToken=1; - int64 type=2; - string value=3; - string useDesc=4; - string title=5; - string desc=6; - string payButtonText=7; - string payButtonTextLineThrough=8; - string realAmount=9; - google.protobuf.Timestamp expireTime=10; - } - string title=1; - repeated Coupon coupon=2; - repeated ButtonInfo button=3; - string bottomText=4; - } - CouponToast toast=1; - PopWin popWin=2; - } - message EndPage{ - Dialog dialog=1; - bool hide=2; - } - Dialog dialog=1; - Toast toast=2; - CouponInfo couponInfo=3; - repeated int64 demandNoPayEpids=4; - EndPage endPage=5; -} - -message PlayViewReply{ - VideoInfo info=1;//视频信息 - PlayAbilityConf PlayConf=2;//播放界面配置 - PlayViewBusinessInfo Business=3; - Event event=4; - ViewInfo viewInfo=5; -} \ No newline at end of file diff --git a/grpc_api/bilibili/rpc.proto b/grpc_api/bilibili/rpc.proto index 2fe6371..9a4124b 100644 --- a/grpc_api/bilibili/rpc.proto +++ b/grpc_api/bilibili/rpc.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package bilibili.rpc; import "google/protobuf/any.proto"; @@ -6,7 +7,12 @@ import "google/protobuf/any.proto"; //接口回复报错信息 //grpc-status-details-bin message Status{ - int32 code = 1; //错误码 - string message = 2; //错误信息 - repeated google.protobuf.Any details = 3; //套娃专用 + //业务错误码 + int32 code = 1; + + //业务错误信息 + string message = 2; + + //扩展信息嵌套(套娃专用) + repeated google.protobuf.Any details = 3; } \ No newline at end of file diff --git a/other/API_auth.md b/other/API_auth.md index bf04f68..e9c1cea 100644 --- a/other/API_auth.md +++ b/other/API_auth.md @@ -48,7 +48,7 @@ Token有效期为1月,更改密码或过期失效 | 85eb6835b0a1034e | 2ad42749773c441109bdc0191257a664 | | | | | aae92bc66f3edfab | af125a0d5279fd576c1b4418a3e8276d | PC | 投稿工具 | | | bb3101000e232e27 | 36efcfed79309338ced0380abd824ac1 | | | | -| bca7e84c2d947ac6 | | 安卓 | 客户端 | 登录专用 | +| bca7e84c2d947ac6 | 60698ba2f68e01ce44738920a0ffe768 | 安卓 | 客户端 | 登录专用 | | cc578d267072c94d | | 安卓 | 轻视频 | | | cc8617fd6961e070 | | 安卓 | 漫画 | | | iVGUTjsxvpLeuDCf | aHRmhWMLkdeMuILqORnYZocwMBpMEOdt | 安卓 | 客户端 | 取流专用 |