update 【gRPC API】 proto files

This commit is contained in:
社会易姐QwQ
2022-09-15 18:00:56 +08:00
parent 9322217103
commit b4bb815ae6
11 changed files with 1397 additions and 322 deletions

View File

@@ -0,0 +1,75 @@
syntax = "proto3";
package bilibili.api.player.v1;
// 心跳上报
service Heartbeat {
// 客户端心跳上报
rpc Mobile(HeartbeatReq) returns (HeartbeatReply);
}
// 客户端心跳上报-响应
message HeartbeatReply {
// 时间戳
int64 ts = 1;
}
// 客户端心跳上报-请求
message HeartbeatReq {
//
int64 server_time = 1;
//
string session = 2;
// 用户 mid
int64 mid = 3;
// 稿件 avid
int64 aid = 4;
// 视频 cid
int64 cid = 5;
//
string sid = 6;
//
int64 epid = 7;
//
string type = 8;
//
int32 sub_type = 9;
//
int32 quality = 10;
//
int64 total_time = 11;
//
int64 paused_time = 12;
//
int64 played_time = 13;
//
int64 video_duration = 14;
//
string play_type = 15;
//
int32 network_type = 16;
//
int64 last_play_progress_time = 17;
//
int64 max_play_progress_time = 18;
//
int32 from = 19;
//
string from_spmid = 20;
//
string spmid = 21;
//
string epid_status = 22;
//
string play_status = 23;
//
string user_status = 24;
//
int64 actual_played_time = 25;
//
int32 auto_play = 26;
//
int64 list_play_time = 27;
//
int64 detail_play_time = 28;
}

View File

@@ -15,20 +15,66 @@ service Probe {
}
//
message CodeReq {
//
int64 code = 1;
enum Category {
CATEGORY_UNSPECIFIED = 0; //
CATEGORY_ONE = 1; //
CATEGORY_TWO = 2; //
CATEGORY_THREE = 3; //
}
//
message CodeReply {}
//
message ProbeReq {
message CodeReq {
//
int64 mid = 1;
int64 code = 1;
}
//
message DynamicMessageUpdate {
//
string buvid = 2;
SimpleMessage body = 1;
}
//
message Embedded {
//
bool bool_val = 1;
//
int32 int32_val = 2;
//
int64 int64_val = 3;
//
float float_val = 4;
//
double double_val = 5;
//
string string_val = 6;
//
repeated int32 repeated_int32_val = 8;
//
repeated string repeated_string_val = 12;
//
map<string, string> map_string_val = 13;
//
map<string, ErrorMessage> map_error_val = 14;
}
//
message ErrorMessage {
//
int64 code = 1;
//
string reason = 2;
//
string message = 3;
}
//
enum ErrorReason {
PROBE_UNSPECIFIED = 0; //
PROBE_CATEGORY_NOTFOUND = 1; //
}
//
@@ -40,11 +86,11 @@ message ProbeReply {
}
//
message ProbeStreamReq {
message ProbeReq {
//
int64 mid = 1;
//
int64 sequence = 2;
string buvid = 2;
}
//
@@ -58,13 +104,35 @@ message ProbeStreamReply {
}
//
message ProbeSubReq {
message ProbeStreamReq {
//
int64 buvid = 1;
int64 mid = 1;
//
int64 sequence = 2;
}
//
message ProbeSubReply {
//
int64 message_id = 1;
}
}
//
message ProbeSubReq {
//
int64 buvid = 1;
}
//
message SimpleMessage {
//
int32 id = 1;
//
int64 num = 2;
//
string lang = 3;
//
int32 cate = 4;
//
Embedded embedded = 5;
}