更新【proto文件】

This commit is contained in:
SocialSisterYi 2021-02-05 18:32:00 +08:00
parent 84eab33d9e
commit c454b3a409
18 changed files with 1919 additions and 1442 deletions

View File

@ -2,6 +2,294 @@ syntax = "proto3";
package bilibili.app.card.v1; package bilibili.app.card.v1;
//
message Card {
oneof item {
//
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 SmallCoverV5 {
//
Base base = 1;
//
string coverGif = 2;
//
Up up = 3;
//
string coverRightText1 = 4;
//1UP主昵称
string rightDesc1 = 5;
//2
string rightDesc2 = 6;
//
ReasonStyle rcmdReasonStyle = 7;
//
HotwordEntrance hotwordEntrance = 8;
//
ReasonStyle cornerMarkStyle = 9;
//1id
int32 rightIcon1 = 10;
//2id
int32 rightIcon2 = 11;
//
ReasonStyle leftCornerMarkStyle = 12;
}
//
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 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 HotTopic {
//
Base base = 1;
//
string desc = 2;
//
repeated HotTopicItem items = 3;
}
//
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 MiddleCoverV3 {
//
Base base = 1;
//
string desc1 = 2;
//
string desc2 = 3;
//
ReasonStyle coverBadgeStyle = 4;
}
//
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 PopularTopEntrance {
//
Base base = 1;
//
repeated EntranceItem items = 2;
}
//
message RcmdOneItem {
//
Base base = 1;
//
ReasonStyle topRcmdReasonStyle = 2;
//
SmallCoverRcmdItem item = 3;
}
//
message AdInfo { message AdInfo {
// //
int64 creativeId = 1; int64 creativeId = 1;
@ -112,27 +400,28 @@ message Avatar {
int32 defalutCover = 7; int32 defalutCover = 7;
} }
// //
message Base { message Base {
// //
string cardType = 1; string cardType = 1;
// //?
string cardGoto = 2; string cardGoto = 2;
// //
//av:稿 mid:
string goto = 3; string goto = 3;
// //
string param = 4; string param = 4;
// //url
string cover = 5; string cover = 5;
// //
string title = 6; string title = 6;
// //uri
string uri = 7; string uri = 7;
// //
@ -144,7 +433,7 @@ message Base {
// //
PlayerArgs playerArgs = 10; PlayerArgs playerArgs = 10;
// //
int64 idx = 11; int64 idx = 11;
// //
@ -153,7 +442,8 @@ message Base {
// //
Mask mask = 13; Mask mask = 13;
// //
//recommend: operation:?
string fromType = 14; string fromType = 14;
// //
@ -165,84 +455,50 @@ message Base {
// //
Button descButton = 17; Button descButton = 17;
// //v4
ThreePointV4 threePointV4 = 18; ThreePointV4 threePointV4 = 18;
} }
// //
message Bubble { message Bubble {
// //
string bubbleContent = 1; string bubbleContent = 1;
// //
int32 version = 2; int32 version = 2;
// //
int64 stime = 3; int64 stime = 3;
} }
// //
message Button { message Button {
// //
string text = 1; string text = 1;
// //
string param = 2; string param = 2;
// //
string uri = 3; string uri = 3;
// //
string event = 4; string event = 4;
// //
int32 selected = 5; int32 selected = 5;
// //
//2:
int32 type = 6; int32 type = 6;
// //v2
string eventV2 = 7; string eventV2 = 7;
// //
Relation relation = 8; 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 { message CreativeContent {
// //
@ -288,75 +544,33 @@ message DislikeReason {
string name = 2; 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 { message EntranceItem {
// //
string goto = 1; string goto = 1;
// //url
string icon = 2; string icon = 2;
// //
string title = 3; string title = 3;
// //id
string moduleId = 4; string moduleId = 4;
// //uri
string uri = 5; string uri = 5;
// //id
int64 entranceId = 6; int64 entranceId = 6;
// //
Bubble bubble = 7; Bubble bubble = 7;
// //?
int32 entranceType = 8; int32 entranceType = 8;
} }
//
message HotTopic {
//
Base base = 1;
//
string desc = 2;
//
repeated HotTopicItem items = 3;
}
// //
message HotTopicItem { message HotTopicItem {
// //
@ -387,111 +601,6 @@ message HotwordEntrance {
string icon = 4; 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 { message LikeButton {
// //
@ -522,21 +631,6 @@ message Mask {
Button button = 2; Button button = 2;
} }
//
message MiddleCoverV3 {
//
Base base = 1;
//
string desc1 = 2;
//
string desc2 = 3;
//
ReasonStyle coverBadgeStyle = 4;
}
// //
message PlayerArgs { message PlayerArgs {
// //
@ -570,57 +664,37 @@ message PlayerArgs {
int64 seasonId = 11; 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 { message ReasonStyle {
// //
string text = 1; string text = 1;
// //
string textColor = 2; string textColor = 2;
// //
string bgColor = 3; string bgColor = 3;
// //
string borderColor = 4; string borderColor = 4;
// //url
string iconUrl = 5; string iconUrl = 5;
// //-
string textColorNight = 6; string textColorNight = 6;
// //-
string bgColorNight = 7; string bgColorNight = 7;
// //-
string borderColorNight = 8; string borderColorNight = 8;
// //url-
string iconNightUrl = 9; string iconNightUrl = 9;
// //id
//1: 2:
int32 bgStyle = 10; int32 bgStyle = 10;
// //
@ -642,162 +716,94 @@ message ReasonStyle {
string leftIconType = 16; string leftIconType = 16;
} }
// //
message Relation { message Relation {
// //
int32 status = 1; int32 status = 1;
// //
int32 isFollow = 2; int32 isFollow = 2;
// //
int32 isFollowed = 3; int32 isFollowed = 3;
} }
// //
message SharePlane { message SharePlane {
// //
string title = 1; string title = 1;
// //
string shareSubtitle = 2; string shareSubtitle = 2;
// //
string desc = 3; string desc = 3;
// //url
string cover = 4; string cover = 4;
// //稿avid
int64 aid = 5; int64 aid = 5;
// //稿bvid
string bvid = 6; string bvid = 6;
// //
map<string,bool> shareTo = 7; map<string,bool> shareTo = 7;
// //UP主昵称
string author = 8; string author = 8;
// //UP主UID
int64 authorId = 9; int64 authorId = 9;
// //
string shortLink = 10; string shortLink = 10;
// //
string playNumber = 11; string playNumber = 11;
} }
// //
message SmallCoverRcmdItem { message SmallCoverRcmdItem {
// //
string title = 1; string title = 1;
// //url
string cover = 2; string cover = 2;
// //uri
string uri = 3; string uri = 3;
// //
string param = 4; string param = 4;
// //
//av:稿
string goto = 5; string goto = 5;
// //
string coverRightText1 = 6; string coverRightText1 = 6;
// //1UP主昵称
string rightDesc1 = 7; string rightDesc1 = 7;
// //2
string rightDesc2 = 8; string rightDesc2 = 8;
// //
string coverGif = 9; string coverGif = 9;
// //1id
int32 rightIcon1 = 10; int32 rightIcon1 = 10;
// //2id
int32 rightIcon2 = 11; 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 { message ThreeItemV1Item {
// //
Base base = 1; Base base = 1;
// //
@ -824,7 +830,7 @@ message ThreePoint {
// //
repeated DislikeReason feedbacks = 2; repeated DislikeReason feedbacks = 2;
// //
int32 watchLater = 3; int32 watchLater = 3;
} }
@ -882,12 +888,12 @@ message ThreePointV3 {
int32 defaultId = 11; int32 defaultId = 11;
} }
// //v4
message ThreePointV4 { message ThreePointV4 {
// //
SharePlane sharePlane = 1; SharePlane sharePlane = 1;
// //
WatchLater watchLater = 2; WatchLater watchLater = 2;
} }
@ -945,11 +951,11 @@ message Up {
string cooperation = 8; string cooperation = 8;
} }
// //
message WatchLater { message WatchLater {
// //稿avid
int64 aid = 1; int64 aid = 1;
// //稿bvid
string bvid = 2; string bvid = 2;
} }

View File

@ -3,27 +3,27 @@ syntax = "proto3";
package bilibili.app.playurl.v1; package bilibili.app.playurl.v1;
// //url
service PlayURL { service PlayURL {
// //
//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayConf //https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayConf
rpc playConf (PlayConfReq) returns (PlayConfReply); rpc PlayConf (PlayConfReq) returns (PlayConfReply);
// //
// //
rpc playConfEdit (PlayConfEditReq) returns (PlayConfEditReply); rpc PlayConfEdit (PlayConfEditReq) returns (PlayConfEditReply);
//url //url
// //
rpc playURL (PlayURLReq) returns (PlayURLReply); rpc PlayURL (PlayURLReq) returns (PlayURLReply);
// //
//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayView //https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayView
rpc playView (PlayViewReq) returns (PlayViewReply); rpc PlayView (PlayViewReq) returns (PlayViewReply);
// //
// //
rpc project (ProjectReq) returns (ProjectReply); rpc Project (ProjectReq) returns (ProjectReply);
} }
//- //-
@ -59,10 +59,10 @@ message PlayURLReq {
// //
int64 qn = 3; int64 qn = 3;
// //
int32 fnver = 4; int32 fnver = 4;
// //
int32 fnval = 5; int32 fnval = 5;
// //
@ -125,7 +125,7 @@ message PlayURLReply {
VideoType type = 13; VideoType type = 13;
} }
//- //-
message PlayViewReq { message PlayViewReq {
//稿avid //稿avid
int64 aid = 1; int64 aid = 1;
@ -166,7 +166,7 @@ message PlayViewReq {
CodeType preferCodecType = 12; CodeType preferCodecType = 12;
} }
//- //-
message PlayViewReply { message PlayViewReply {
// //
VideoInfo info = 1; VideoInfo info = 1;
@ -261,16 +261,16 @@ message CloudConf {
FieldValue fieldValue = 3; FieldValue fieldValue = 3;
} }
// //
enum CodeType { enum CodeType {
// //
NOCODE_VALUE = 0; NOCODE = 0;
// //H.264
CODE264_VALUE = 1; CODE264 = 1;
// //H.265
CODE265_VALUE = 2; CODE265 = 2;
} }
// //
@ -459,78 +459,78 @@ message FormatDescription {
string superscript = 6; string superscript = 6;
} }
// //
message PlayAbilityConf { message PlayAbilityConf {
// //
bool backgroundPlayDisable=1; bool backgroundPlayDisable=1;
// //
bool flipDisable=2; bool flipDisable=2;
// //
bool castDisable=3; bool castDisable=3;
// //
bool feedbackDisable=4; bool feedbackDisable=4;
// //
bool subtitleDisable=5; bool subtitleDisable=5;
// //
bool playbackRateDisable=6; bool playbackRateDisable=6;
// //
bool timeUpDisable=7; bool timeUpDisable=7;
// //
bool playbackModeDisable=8; bool playbackModeDisable=8;
// //
bool scaleModeDisable=9; bool scaleModeDisable=9;
// //
bool likeDisable=10; bool likeDisable=10;
// //
bool dislikeDisable=11; bool dislikeDisable=11;
// //
bool coinDisable=12; bool coinDisable=12;
// //
bool elecDisable=13; bool elecDisable=13;
// //
bool shareDisable=14; bool shareDisable=14;
// //
bool screenShotDisable=15; bool screenShotDisable=15;
// //
bool lockScreenDisable=16; bool lockScreenDisable=16;
// //
bool recommendDisable=17; bool recommendDisable=17;
// //
bool playbackSpeedDisable=18; bool playbackSpeedDisable=18;
// //
bool definitionDisable=19; bool definitionDisable=19;
// //
bool selectionsDisable=20; bool selectionsDisable=20;
// //
bool nextDisable=21; bool nextDisable=21;
// //
bool editDmDisable=22; bool editDmDisable=22;
// //
bool smallWindowDisable=23; bool smallWindowDisable=23;
// //
bool shakeDisable=24; bool shakeDisable=24;
// //
@ -542,7 +542,7 @@ message PlayAbilityConf{
// //
bool freyaEnterDisable=27; bool freyaEnterDisable=27;
// //
bool dolbyDisable=28; bool dolbyDisable=28;
} }
@ -629,7 +629,7 @@ message PlayArcConf{
// //
ArcConf freyaEnterConf=27; ArcConf freyaEnterConf=27;
// //
ArcConf dolbyConf=28; ArcConf dolbyConf=28;
} }

View File

@ -1,47 +1,48 @@
syntax = "proto3"; syntax = "proto3";
package bilibili.app.show.popular.v1; package bilibili.app.show.v1;
import "bilibili/app/playurl/v1.proto"; import "bilibili/app/playurl/v1.proto";
import "bilibili/app/card/v1.proto"; import "bilibili/app/card/v1.proto";
// //
service Popular { service Popular {
// //
// //https://app.bilibili.com/bilibili.app.show.v1.Popular/Index
rpc index (PopularResultReq) returns (PopularReply); rpc Index (PopularResultReq) returns (PopularReply);
} }
//- //-
message PopularResultReq { message PopularResultReq {
// //ididx
int64 idx = 1; int64 idx = 1;
// //
//1: 2:
int32 loginEvent = 2; int32 loginEvent = 2;
// //
int32 qn = 3; int32 qn = 3;
// //
int32 fnver = 4; int32 fnver = 4;
// //
int32 fnval = 5; int32 fnval = 5;
// //使
int32 forceHost = 6; int32 forceHost = 6;
// //4K
int32 fourk = 7; int32 fourk = 7;
// //
sfixed32 spmid = 8; sfixed32 spmid = 8;
// //param
sfixed32 lastParam = 9; sfixed32 lastParam = 9;
// //ver
sfixed32 ver = 10; sfixed32 ver = 10;
// //
@ -60,80 +61,80 @@ message PopularResultReq {
bilibili.app.playurl.v1.PlayerArgs playerArgs = 15; bilibili.app.playurl.v1.PlayerArgs playerArgs = 15;
} }
//- //-
message PopularReply { message PopularReply {
// //
repeated bilibili.app.card.v1.Card items = 1; repeated bilibili.app.card.v1.Card items = 1;
// //
Config config = 2; Config config = 2;
// //?
string ver = 3; string ver = 3;
} }
// //
message Bubble { message Bubble {
// //
string bubbleContent = 1; string bubbleContent = 1;
// //
int32 version = 2; int32 version = 2;
// //
int64 stime = 3; int64 stime = 3;
} }
// //
message Config { message Config {
// //
string itemTitle = 1; string itemTitle = 1;
// //
string bottomText = 2; string bottomText = 2;
// //url
string bottomTextCover = 3; string bottomTextCover = 3;
// //url
string bottomTextUrl = 4; string bottomTextUrl = 4;
// //
repeated EntranceShow topItems = 5; repeated EntranceShow topItems = 5;
// //url
string headImage = 6; string headImage = 6;
// //
repeated EntranceShow pageItems = 7; repeated EntranceShow pageItems = 7;
// //?
int32 hit = 8; int32 hit = 8;
} }
// //
message EntranceShow { message EntranceShow {
// //url
string icon = 1; string icon = 1;
// //
string title = 2; string title = 2;
// //id
string moduleId = 3; string moduleId = 3;
// //uri
string uri = 4; string uri = 4;
// //
Bubble bubble = 5; Bubble bubble = 5;
// //id
int64 entranceId = 6; int64 entranceId = 6;
// //url
string topPhoto = 7; string topPhoto = 7;
// //?
int32 entranceType = 8; int32 entranceType = 8;
} }

View File

@ -1,146 +1,153 @@
syntax = "proto3"; syntax = "proto3";
package bilibili.app.show.rank.v1; package bilibili.app.show.v1;
// //
service Rank { service Rank {
// //
// //https://app.bilibili.com/bilibili.app.show.v1.Rank/RankAll
rpc rankAll (RankAllResultReq) returns (RankListReply); rpc RankAll (RankAllResultReq) returns (RankListReply);
// //
// //https://app.bilibili.com/bilibili.app.show.v1.Rank/RankRegion
rpc rankRegion (RankRegionResultReq) returns (RankListReply); rpc RankRegion (RankRegionResultReq) returns (RankListReply);
} }
//- //-
message RankAllResultReq { message RankAllResultReq {
// //"all"
string order = 1; string order = 1;
// //
//1
int32 pn = 2; int32 pn = 2;
// //
//100100
int32 ps = 3; int32 ps = 3;
} }
//- //-
message RankRegionResultReq { message RankRegionResultReq {
// //tid
//0:
int32 rid = 1; int32 rid = 1;
// //
//1
int32 pn = 2; int32 pn = 2;
// //
//100100
int32 ps = 3; int32 ps = 3;
} }
//- //-
message RankListReply { message RankListReply {
// //
repeated Item items = 1; repeated Item items = 1;
} }
// //
message Item { message Item {
// //
string title = 1; string title = 1;
// //url
string cover = 2; string cover = 2;
// //稿avid
string param = 3; string param = 3;
// //uri
string uri = 4; string uri = 4;
// //url?
string redirectUrl = 5; string redirectUrl = 5;
// //
//av:稿
string goto = 6; string goto = 6;
// //
int32 play = 7; int32 play = 7;
// //
int32 danmaku = 8; int32 danmaku = 8;
// //UP主UID
int64 mid = 9; int64 mid = 9;
// //UP主昵称
string name = 10; string name = 10;
// //UP主头像url
string face = 11; string face = 11;
// //
int32 reply = 12; int32 reply = 12;
// //
int32 favourite = 13; int32 favourite = 13;
// //
int64 pubDate = 14; int64 pubDate = 14;
// //tid
int32 rid = 15; int32 rid = 15;
// //
string rname = 16; string rname = 16;
// //
int64 duration = 17; int64 duration = 17;
// //
int32 like = 18; int32 like = 18;
// //1P cid
int64 cid = 19; int64 cid = 19;
// //
int64 pts = 20; int64 pts = 20;
// //
string cooperation = 21; string cooperation = 21;
// //
int32 attribute = 22; int32 attribute = 22;
// //UP主粉丝数
int64 follower = 23; int64 follower = 23;
// //UP主认证信息
OfficialVerify officialVerify = 24; OfficialVerify officialVerify = 24;
// //UP收起子项列表
repeated Item children = 25; repeated Item children = 25;
// //
Relation relation = 26; Relation relation = 26;
} }
// //
message OfficialVerify { message OfficialVerify {
// //
//-1: 0: 1:
int32 type = 1; int32 type = 1;
// //
string desc = 2; string desc = 2;
} }
// //
message Relation { message Relation {
// //id
int32 status = 1; int32 status = 1;
// //
int32 isFollow = 2; int32 isFollow = 2;
// //
int32 isFollowed = 3; int32 isFollowed = 3;
} }

View File

@ -10,45 +10,7 @@ service PlayURL {
rpc PlayView (playViewReq) returns (PlayViewReply); rpc PlayView (playViewReq) returns (PlayViewReply);
} }
enum CodeType{ //url-
NOCODE = 0;
CODE264 = 1;
CODE265 = 2;
}
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;
}
//url
//
message playViewReq { message playViewReq {
//epid //epid
int64 epid = 1; int64 epid = 1;
@ -59,10 +21,10 @@ message playViewReq{
// //
int64 qn = 3; int64 qn = 3;
// //
int32 fnver = 4; int32 fnver = 4;
// //
int32 fnval = 5; int32 fnval = 5;
// //
@ -82,7 +44,7 @@ message playViewReq{
// //
string fromSpmid = 10; string fromSpmid = 10;
// //
int32 teenagersMode = 11; int32 teenagersMode = 11;
// //
@ -91,7 +53,8 @@ message playViewReq{
// //
bool isPreview = 13; bool isPreview = 13;
} }
//
//url-
message PlayViewReply { message PlayViewReply {
// //
bilibili.app.playurl.v1.VideoInfo info = 1; bilibili.app.playurl.v1.VideoInfo info = 1;
@ -99,3 +62,102 @@ message PlayViewReply{
// //
PlayAbilityConf PlayConf = 2; PlayAbilityConf PlayConf = 2;
} }
//
enum CodeType {
//
NOCODE = 0;
//H.264
CODE264 = 1;
//H.265
CODE265 = 2;
}
//
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;
}

View File

@ -2,6 +2,181 @@ syntax = "proto3";
package bilibili.community.service.dm.v1; package bilibili.community.service.dm.v1;
//
service DM {
//
//https://app.bilibili.com/bilibili.community.service.dm.v1.DM/DmPlayerConfig
rpc DmPlayerConfig (DmPlayerConfigReq) returns (Response);
//
//
rpc DmSegMobile (DmSegMobileReq) returns (DmSegMobileReply);
//
//https://app.bilibili.com/bilibili.community.service.dm.v1.DM/DmView
rpc DmView (DmViewReq) returns (DmViewReply);
}
//-
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 Response{
//
int32 code = 1;
//
string message = 2;
}
//-
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;
}
//-
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;
}
// //
message DanmakuAIFlag{ message DanmakuAIFlag{
// //
@ -72,128 +247,231 @@ message DanmakuFlagConfig{
int32 recSwitch = 3; int32 recSwitch = 3;
} }
//
message DanmuDefaultPlayerConfig{ message DanmuDefaultPlayerConfig{
//
bool playerDanmakuUseDefaultConfig = 1; bool playerDanmakuUseDefaultConfig = 1;
//
bool playerDanmakuAiRecommendedSwitch = 4; bool playerDanmakuAiRecommendedSwitch = 4;
//
int32 playerDanmakuAiRecommendedLevel = 5; int32 playerDanmakuAiRecommendedLevel = 5;
//
bool playerDanmakuBlocktop = 6; bool playerDanmakuBlocktop = 6;
//
bool playerDanmakuBlockscroll = 7; bool playerDanmakuBlockscroll = 7;
//
bool playerDanmakuBlockbottom = 8; bool playerDanmakuBlockbottom = 8;
//
bool playerDanmakuBlockcolorful = 9; bool playerDanmakuBlockcolorful = 9;
//
bool playerDanmakuBlockrepeat = 10; bool playerDanmakuBlockrepeat = 10;
//
bool playerDanmakuBlockspecial = 11; bool playerDanmakuBlockspecial = 11;
//
float playerDanmakuOpacity = 12; float playerDanmakuOpacity = 12;
//
float playerDanmakuScalingfactor = 13; float playerDanmakuScalingfactor = 13;
//
float playerDanmakuDomain = 14; float playerDanmakuDomain = 14;
//
int32 playerDanmakuSpeed = 15; int32 playerDanmakuSpeed = 15;
//
bool inlinePlayerDanmakuSwitch = 16; bool inlinePlayerDanmakuSwitch = 16;
} }
//
message DanmuPlayerConfig{ message DanmuPlayerConfig{
//
bool playerDanmakuSwitch = 1; bool playerDanmakuSwitch = 1;
//
bool playerDanmakuSwitchSave = 2; bool playerDanmakuSwitchSave = 2;
//
bool playerDanmakuUseDefaultConfig = 3; bool playerDanmakuUseDefaultConfig = 3;
//
bool playerDanmakuAiRecommendedSwitch = 4; bool playerDanmakuAiRecommendedSwitch = 4;
//
int32 playerDanmakuAiRecommendedLevel = 5; int32 playerDanmakuAiRecommendedLevel = 5;
//
bool playerDanmakuBlocktop = 6; bool playerDanmakuBlocktop = 6;
//
bool playerDanmakuBlockscroll = 7; bool playerDanmakuBlockscroll = 7;
//
bool playerDanmakuBlockbottom = 8; bool playerDanmakuBlockbottom = 8;
//
bool playerDanmakuBlockcolorful = 9; bool playerDanmakuBlockcolorful = 9;
//
bool playerDanmakuBlockrepeat = 10; bool playerDanmakuBlockrepeat = 10;
//
bool playerDanmakuBlockspecial = 11; bool playerDanmakuBlockspecial = 11;
//
float playerDanmakuOpacity = 12; float playerDanmakuOpacity = 12;
//
float playerDanmakuScalingfactor = 13; float playerDanmakuScalingfactor = 13;
//
float playerDanmakuDomain = 14; float playerDanmakuDomain = 14;
//
int32 playerDanmakuSpeed = 15; int32 playerDanmakuSpeed = 15;
//
bool playerDanmakuEnableblocklist = 16; bool playerDanmakuEnableblocklist = 16;
//
bool inlinePlayerDanmakuSwitch = 17; bool inlinePlayerDanmakuSwitch = 17;
//
int32 inlinePlayerDanmakuConfig = 18; int32 inlinePlayerDanmakuConfig = 18;
} }
//
message DanmuPlayerDynamicConfig{ message DanmuPlayerDynamicConfig{
//
int32 progress = 1; int32 progress = 1;
//
float playerDanmakuDomain = 2; float playerDanmakuDomain = 2;
} }
//
message DanmuPlayerViewConfig{ message DanmuPlayerViewConfig{
//
DanmuDefaultPlayerConfig danmukuDefaultPlayerConfig = 1; DanmuDefaultPlayerConfig danmukuDefaultPlayerConfig = 1;
//
DanmuPlayerConfig danmukuPlayerConfig = 2; DanmuPlayerConfig danmukuPlayerConfig = 2;
//
repeated DanmuPlayerDynamicConfig danmukuPlayerDynamicConfig = 3; repeated DanmuPlayerDynamicConfig danmukuPlayerDynamicConfig = 3;
} }
//
message InlinePlayerDanmakuSwitch{ message InlinePlayerDanmakuSwitch{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuAiRecommendedLevel{ message PlayerDanmakuAiRecommendedLevel{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuAiRecommendedSwitch{ message PlayerDanmakuAiRecommendedSwitch{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuBlockbottom{ message PlayerDanmakuBlockbottom{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuBlockcolorful{ message PlayerDanmakuBlockcolorful{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuBlockrepeat{ message PlayerDanmakuBlockrepeat{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuBlockscroll{ message PlayerDanmakuBlockscroll{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuBlockspecial{ message PlayerDanmakuBlockspecial{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuBlocktop{ message PlayerDanmakuBlocktop{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuDomain{ message PlayerDanmakuDomain{
//
float value = 1; float value = 1;
} }
//
message PlayerDanmakuEnableblocklist{ message PlayerDanmakuEnableblocklist{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuOpacity{ message PlayerDanmakuOpacity{
//
float value = 1; float value = 1;
} }
//
message PlayerDanmakuScalingfactor{ message PlayerDanmakuScalingfactor{
//
float value = 1; float value = 1;
} }
//
message PlayerDanmakuSpeed{ message PlayerDanmakuSpeed{
//
int32 value = 1; int32 value = 1;
} }
//
message PlayerDanmakuSwitch{ message PlayerDanmakuSwitch{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuSwitchSave{ message PlayerDanmakuSwitchSave{
//
bool value = 1; bool value = 1;
} }
//
message PlayerDanmakuUseDefaultConfig{ message PlayerDanmakuUseDefaultConfig{
//
bool value = 1; bool value = 1;
} }
message Response{
int32 code = 1;
string message = 2;
}
// //
message SubtitleItem{ message SubtitleItem{
//id //id
@ -266,122 +544,3 @@ message VideoSubtitle{
// //
repeated SubtitleItem subtitles = 3; 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;
}

View File

@ -18,6 +18,10 @@ service Reply {
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DialogList //https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DialogList
rpc DialogList(DialogListReq) returns (DialogListReply); rpc DialogList(DialogListReq) returns (DialogListReply);
//
//
rpc previewList (PreviewListReq) returns (PreviewListReply);
// //
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItemPreHook //https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItemPreHook
rpc SearchItemPreHook(SearchItemPreHookReq) returns (SearchItemPreHookReply); rpc SearchItemPreHook(SearchItemPreHookReq) returns (SearchItemPreHookReply);
@ -27,6 +31,213 @@ service Reply {
rpc SearchItem(SearchItemReq) returns (SearchItemReply); rpc SearchItem(SearchItemReq) returns (SearchItemReply);
} }
//-
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 PreviewListReq {
//
int64 oid = 1;
//
int64 type = 2;
//
CursorReq cursor = 3;
}
//?-
message PreviewListReply {
//
CursorReply cursor = 1;
//
repeated ReplyInfo replies = 2;
//
SubjectControl subjectControl = 3;
//
ReplyInfo upTop = 4;
//
ReplyInfo adminTop = 5;
//
ReplyInfo voteTop = 6;
}
//?-
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;
}
// //
enum Mode{ enum Mode{
// //
@ -598,177 +809,3 @@ message SearchItemReplyExtraInfo{
// //
string eventId = 1; 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;
}

View File

@ -0,0 +1,184 @@
syntax = "proto3";
package bilibili.metadata;
/**********环境参数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;
}
/**********环境参数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;
}
/**********区域标识**********/
//x-bili-locale-bin
message Locale {
//App设置的locale
LocaleIds c_locale = 1;
//locale
LocaleIds s_locale = 2;
//sim卡的国家码+
string sim_code = 3;
//
string timezone = 4;
}
//
message LocaleIds{
//
string language = 1;
//
string script = 2;
//
string region = 3;
}
/**********网络类型标识**********/
//x-bili-network-bin
message Network{
//
Type type = 1;
//
TFType tf = 2;
//
string oid = 3;
}
//
enum Type{
//
NT_UNKNOWN = 0;
//wifi
WIFI = 1;
//
CELLULAR = 2;
//
OFFLINE = 3;
//
ETHERNET = 5;
//
OTHERNET = 4;
}
//
enum TFType {
//
TF_UNKNOWN = 0;
//
U_CARD = 1;
//
U_PKG = 2;
//
C_CARD = 3;
//
C_PKG = 4;
//
T_CARD = 5;
//
T_PKG = 6;
}
/**********限制条件**********/
message Restriction {
//
bool teenagers_mode = 1;
//
bool lessons_mode = 2;
//
ModeType mode = 3;
//app审核review状态
bool review = 4;
}
//
enum ModeType{
//
NORMAL = 0;
//
TEENAGERS = 1;
//
LESSONS = 2;
}

View File

@ -1,46 +0,0 @@
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;
}

View File

@ -1,30 +0,0 @@
syntax = "proto3";
package bilibili.metadata.locale;
message LocaleIds{
//
string language = 1;
//
string script = 2;
//
string region = 3;
}
//
//x-bili-locale-bin
message Locale {
//App设置的locale
LocaleIds c_locale = 1;
//locale
LocaleIds s_locale = 2;
//sim卡的国家码+
string sim_code = 3;
//
string timezone = 4;
}

View File

@ -1,28 +0,0 @@
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;
}

View File

@ -1,61 +0,0 @@
syntax = "proto3";
package bilibili.metadata.network;
//
enum Type{
//
NT_UNKNOWN = 0;
//wifi
WIFI = 1;
//
CELLULAR = 2;
//
OFFLINE = 3;
//
ETHERNET = 5;
//
OTHERNET = 4;
}
//
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;
//
TFType tf = 2;
//
string oid = 3;
}

View File

@ -1,30 +0,0 @@
syntax = "proto3";
package bilibili.metadata.restriction;
//
enum ModeType{
//
NORMAL = 0;
//
TEENAGERS = 1;
//
LESSONS = 2;
}
//
message Restriction {
//
bool teenagers_mode = 1;
//
bool lessons_mode = 2;
//
ModeType mode = 3;
//app审核review状态
bool review = 4;
}

View File

@ -1,13 +1,92 @@
//https://app.bilibili.com/bilibili.pgc.gateway.player.v2.PlayURL/PlayView
syntax = "proto3"; syntax = "proto3";
package bilibili.pgc.gateway.player.v2; package bilibili.pgc.gateway.player.v2;
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
//url
service PlayURL {
//url
//https://app.bilibili.com/bilibili.pgc.gateway.player.v2.PlayURL/PlayView
rpc PlayView (PlayViewReq) returns (PlayViewReply);
}
//url-
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;
}
//url-
message PlayViewReply{
//
VideoInfo info = 1;
//
PlayAbilityConf PlayConf = 2;
//
PlayViewBusinessInfo Business = 3;
//
Event event = 4;
//
ViewInfo viewInfo = 5;
}
//
enum CodeType { enum CodeType {
//
NOCODE = 0; NOCODE = 0;
//H.264
CODE264 = 1; CODE264 = 1;
//H.265
CODE265 = 2; CODE265 = 2;
} }
@ -188,222 +267,350 @@ message VideoInfo{
DolbyItem dolby = 7; DolbyItem dolby = 7;
} }
//
message PlayAbilityConf{ message PlayAbilityConf{
//
bool backgroundPlayDisable = 1; bool backgroundPlayDisable = 1;
//
bool flipDisable = 2; bool flipDisable = 2;
//
bool castDisable = 3; bool castDisable = 3;
//
bool feedbackDisable = 4; bool feedbackDisable = 4;
//
bool subtitleDisable = 5; bool subtitleDisable = 5;
//
bool playbackRateDisable = 6; bool playbackRateDisable = 6;
//
bool timeUpDisable = 7; bool timeUpDisable = 7;
//
bool playbackModeDisable = 8; bool playbackModeDisable = 8;
//
bool scaleModeDisable = 9; bool scaleModeDisable = 9;
//
bool likeDisable = 10; bool likeDisable = 10;
//
bool dislikeDisable = 11; bool dislikeDisable = 11;
//
bool coinDisable = 12; bool coinDisable = 12;
//
bool elecDisable = 13; bool elecDisable = 13;
//
bool shareDisable = 14; bool shareDisable = 14;
//
bool screenShotDisable = 15; bool screenShotDisable = 15;
//
bool lockScreenDisable = 16; bool lockScreenDisable = 16;
//
bool recommendDisable = 17; bool recommendDisable = 17;
//
bool playbackSpeedDisable = 18; bool playbackSpeedDisable = 18;
//
bool definitionDisable = 19; bool definitionDisable = 19;
//
bool selectionsDisable = 20; bool selectionsDisable = 20;
//
bool nextDisable = 21; bool nextDisable = 21;
//
bool editDmDisable = 22; bool editDmDisable = 22;
//
bool smallWindowDisable = 23; bool smallWindowDisable = 23;
//
bool shakeDisable = 24; bool shakeDisable = 24;
//
bool outerDmDisable = 25; bool outerDmDisable = 25;
//
bool innerDmDisable = 26; bool innerDmDisable = 26;
//
bool freyaEnterDisable = 27; bool freyaEnterDisable = 27;
//
bool dolbyDisable = 28; bool dolbyDisable = 28;
} }
//
message PlayViewBusinessInfo { message PlayViewBusinessInfo {
//
bool isPreview = 1; bool isPreview = 1;
//
bool bp = 2; bool bp = 2;
//
string marlinToken = 3; string marlinToken = 3;
} }
//
message Shake { message Shake {
//
string file = 1; string file = 1;
} }
//
message Event { message Event {
//
Shake shake = 1; Shake shake = 1;
} }
//
message Report { message Report {
//
string showEventId = 1; string showEventId = 1;
//
string clickEventId = 2; string clickEventId = 2;
//
string extends = 3; string extends = 3;
} }
//
message BadgeInfo { message BadgeInfo {
//
string text = 1; string text = 1;
//
string bgColor = 2; string bgColor = 2;
//
string bgColorNight = 3; string bgColorNight = 3;
} }
//
message ButtonInfo { message ButtonInfo {
//
string text = 1; string text = 1;
//
string textColor = 2; string textColor = 2;
//
string textColorNight = 3; string textColorNight = 3;
//
string bgColor = 4; string bgColor = 4;
//
string bgColorNight = 5; string bgColorNight = 5;
//
string link = 6; string link = 6;
//
string actionType = 7; string actionType = 7;
//
BadgeInfo badgeInfo = 8; BadgeInfo badgeInfo = 8;
//
Report report = 9; Report report = 9;
} }
//
message DialogConfig { message DialogConfig {
//
bool isShowCover = 1; bool isShowCover = 1;
//
bool isOrientationEnable = 2; bool isOrientationEnable = 2;
//
bool isNestedScrollEnable = 3; bool isNestedScrollEnable = 3;
//
bool isForceHalfscreenEnable = 4; bool isForceHalfscreenEnable = 4;
} }
//
message TextInfo { message TextInfo {
//
string text = 1; string text = 1;
//
string textColor = 2; string textColor = 2;
//
string textColorNight = 3; string textColorNight = 3;
} }
//
message ImageInfo { message ImageInfo {
//
string url = 1; string url = 1;
} }
//
message Dialog { message Dialog {
//
int64 code = 1; int64 code = 1;
//
string msg = 2; string msg = 2;
//
string type = 3; string type = 3;
//
string styleType = 4; string styleType = 4;
//
DialogConfig config = 5; DialogConfig config = 5;
//
TextInfo title = 6; TextInfo title = 6;
//
TextInfo subtitle = 7; TextInfo subtitle = 7;
//
ImageInfo image = 8; ImageInfo image = 8;
//
repeated ButtonInfo button = 9; repeated ButtonInfo button = 9;
//
ButtonInfo bottomDesc = 10; ButtonInfo bottomDesc = 10;
//
Report report = 11; Report report = 11;
//
int32 countDownSec = 12; int32 countDownSec = 12;
} }
//
message Toast { message Toast {
//
string text = 1; string text = 1;
//
ButtonInfo button = 2; ButtonInfo button = 2;
} }
//
message CouponTextInfo { message CouponTextInfo {
//
string positivePreview = 1; string positivePreview = 1;
//
string section = 2; string section = 2;
} }
//
message CouponToast { message CouponToast {
//
CouponTextInfo textInfo = 1; CouponTextInfo textInfo = 1;
//
ButtonInfo button = 2; ButtonInfo button = 2;
} }
//
message Coupon { message Coupon {
//
string couponToken = 1; string couponToken = 1;
//
int64 type = 2; int64 type = 2;
//
string value = 3; string value = 3;
//
string useDesc = 4; string useDesc = 4;
//
string title = 5; string title = 5;
//
string desc = 6; string desc = 6;
//
string payButtonText = 7; string payButtonText = 7;
//
string payButtonTextLineThrough = 8; string payButtonTextLineThrough = 8;
//
string realAmount = 9; string realAmount = 9;
//
google.protobuf.Timestamp expireTime = 10; google.protobuf.Timestamp expireTime = 10;
} }
//
message PopWin { message PopWin {
//
string title = 1; string title = 1;
//
repeated Coupon coupon = 2; repeated Coupon coupon = 2;
//
repeated ButtonInfo button = 3; repeated ButtonInfo button = 3;
//
string bottomText = 4; string bottomText = 4;
} }
//
message CouponInfo { message CouponInfo {
//
CouponToast toast = 1; CouponToast toast = 1;
//
PopWin popWin = 2; PopWin popWin = 2;
} }
//
message EndPage { message EndPage {
//
Dialog dialog = 1; Dialog dialog = 1;
//
bool hide = 2; bool hide = 2;
} }
//
message ViewInfo { message ViewInfo {
//
Dialog dialog = 1; Dialog dialog = 1;
//
Toast toast = 2; Toast toast = 2;
//
CouponInfo couponInfo = 3; CouponInfo couponInfo = 3;
//
repeated int64 demandNoPayEpids = 4; repeated int64 demandNoPayEpids = 4;
//
EndPage endPage = 5; 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;
}

View File

@ -3,6 +3,8 @@ rem 递归编译proto
set lang="python" set lang="python"
set patch=%CD% set patch=%CD%
for /r %patch% %%a in (*.proto) do ( for /r %patch% %%a in (*.proto) do (
protoc.exe -I %patch% --%lang%_out=. %%~fa protoc -I %patch% --%lang%_out=. %%~fa
echo comp %%~fa ok! echo comp %%~fa
) )
echo all done
pause >nul

6
grpc_api/comp_proto.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# 递归编译proto
lang='python'
patch=$(cd $(dirname $0); pwd)
find $patch -name '*.proto' -exec protoc -I $patch --${lang}_out=. {} \; -exec echo comp {} \;
echo 'all Done'

View File

@ -1,6 +1,7 @@
# grpc接口定义protobuf结构体 # grpc接口定义protobuf结构体
- `comp_proto.bat`---win递归批量编译脚本 - `comp_proto.bat`---win递归批量编译脚本
- `conp_proto.sh`---linux递归编译脚本
注: 注:
@ -10,18 +11,18 @@
## grpc头部 ## grpc头部
- [bilibili.metadata.locale](bilibili/metadata/locale.proto):区域信息 - [bilibili.metadata](bilibili/metadata.proto):环境参数
- [bilibili.metadata.network](bilibili/metadata/network.proto):网络信息
- [bilibili.metadata](bilibili/metadata/metadata.proto):环境参数
- [bilibili.metadata.restriction](bilibili/metadata/restriction.proto):限制值
- [bilibili.metadata.device](bilibili/metadata/device.proto):设备信息
- [bilibili.rpc](bilibili/rpc.proto):响应错误信息 - [bilibili.rpc](bilibili/rpc.proto):响应错误信息
## 接口请求定义 ## 接口请求定义
- [blibili.app.archive.v1](bilibili/app/archive_v1.proto)稿件信息v1模块 - [blibili.app.archive.v1](bilibili/app/archive/v1.proto):稿件信息
- [blibili.app.playurl.v1](bilibili/app/playurl_v1.proto)APP端视频播放v1接口 - [bilibili.app.card.v1](bilibili/app/card/v1.proro):卡片
- [blibili.app.view.v1](bilibili/app/view_v1.proto)视频页v1接口 - [blibili.app.playurl.v1](bilibili/app/playurl/v1.proto)APP端视频播放业务
- [bilibili.pgc.gateway.player.v2](bilibili/pgc/gateway_player_v2.proto)APP端PGC播放v2接口 - [blibili.app.show.v1.Popular](bilibili/app/show/popular/v1.proto):热门内容
- [bilibili.cheese.gateway.player.v1](bilibili/cheese_gateway_player_v1.proto)APP端课程播放v1接口 - [blibili.app.show.v1.Rank](bilibili/app/show/rank/v1.proto):榜单
- [bilibili.main.community.reply.v1](bilibili/main_community_reply_v1.proto)评论区v1接口 - [blibili.app.view.v1](bilibili/app/view/v1.proto):稿件详情页
- [bilibili.cheese.gateway.player.v1](bilibili/cheese/gateway/player/v1.proto)APP端课程播放
- [bilibili.pgc.gateway.player.v2](bilibili/pgc/gateway/player/v2.proto)APP端PGC播放
- [bilibili.community.service.dm.v1](bilibili/community/service/dm/v1.proto):弹幕
- [bilibili.main.community.reply.v1](bilibili/main/community/reply/v1.proto):评论区