Files
bilibili-API-collect/proto/bilibili/app/interfaces/v1.proto
2025-05-03 23:29:04 +08:00

1335 lines
19 KiB
Protocol Buffer

syntax = "proto3";
package bilibili.app.interfaces.v1;
import "bilibili/app/archive/middleware/v1.proto";
import "bilibili/app/archive/v1.proto";
import "bilibili/app/card/v1.proto";
import "bilibili/app/dynamic/v2.proto";
//
service History {
//
rpc Clear (ClearReq) returns (NoReply);
//
rpc Cursor (CursorReq) returns (CursorReply);
//
rpc CursorV2 (CursorV2Req) returns (CursorV2Reply);
//
rpc Delete (DeleteReq) returns (NoReply);
//
rpc HistoryTab (HistoryTabReq) returns (HistoryTabReply);
//
rpc HistoryTabV2 (HistoryTabReq) returns (HistoryTabReply);
//
rpc LatestHistory (LatestHistoryReq) returns (LatestHistoryReply);
//
rpc Search (SearchReq) returns (SearchReply);
}
//
service Media {
//
rpc MediaComment (MediaCommentReq) returns (MediaCommentReply);
//
rpc MediaDetail (MediaDetailReq) returns (MediaDetailReply);
//
rpc MediaFollow (MediaFollowReq) returns (MediaFollowReply);
//
rpc MediaRelation (MediaRelationReq) returns (MediaRelationReply);
//
rpc MediaTab (MediaTabReq) returns (MediaTabReply);
//
rpc MediaVideo (MediaVideoReq) returns (MediaVideoReply);
}
//
service Search {
//
rpc DefaultWords (DefaultWordsReq) returns (DefaultWordsReply);
//
rpc Suggest3 (SuggestionResult3Req) returns (SuggestionResult3Reply);
}
//
service SearchTest {
//
rpc NotExist (SuggestionResult3Req) returns (SuggestionResult3Reply);
}
//
service Space {
//
rpc SearchArchive (SearchArchiveReq) returns (SearchArchiveReply);
//
rpc SearchDynamic (SearchDynamicReq) returns (SearchDynamicReply);
//
rpc SearchTab (SearchTabReq) returns (SearchTabReply);
//
rpc UpdateReserveStartTime (UpdateReserveStartTimeReq) returns (UpdateReserveStartTimeReply);
}
//
service Teenagers {
//
rpc FacialRecognitionVerify (FacialRecognitionVerifyReq) returns (FacialRecognitionVerifyReply);
//
rpc ModeStatus (ModeStatusReq) returns (ModeStatusReply);
//
rpc ModifyPwd (ModifyPwdReq) returns (ModifyPwdReply);
//
rpc SetTeenagersModelAge (SetTeenagersModelAgeReq) returns (SetTeenagersModelAgeReply);
//
rpc UpdateStatus (UpdateStatusReq) returns (UpdateStatusReply);
//
rpc VerifyPwd (VerifyPwdReq) returns (VerifyPwdReply);
}
//
message Arc {
//
bilibili.app.archive.v1.Arc archive = 1;
//
string uri = 2;
//
string view_content = 3;
//
int64 icon_type = 4;
//
string cover_icon = 5;
//
bool is_fold = 6;
//
bool is_pugv = 7;
//
string publish_time_text = 8;
//
repeated string badges = 9;
//
bool is_oneself = 10;
}
//
message Badge {
//
string text = 1;
//
string icon = 2;
}
//
message BigItem {
//
string title = 1;
//
string cover_image_uri = 2;
//
string uri = 3;
//
string cover_right_text = 4;
//
string cover_left_text1 = 5;
//
int64 cover_left_icon1 = 6;
//
string cover_left_text2 = 7;
//
int64 cover_left_icon2 = 8;
//
UserCard user_card = 9;
//
LikeButton like_button = 10;
//
int64 param = 11;
//
bilibili.app.card.v1.SharePlane share_plane = 12;
//
bilibili.app.card.v1.PanelMeta three_point_meta = 13;
//
bilibili.app.card.v1.InlineProgressBar inline_progress_bar = 14;
//
int32 can_play = 15;
//
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 16;
//
bool is_fav = 17;
}
//
enum ButType {
//
BUT_INVALID = 0;
//
BUT_REDIRECT = 1;
//
BUT_LIKE = 2;
}
//
message Button {
//
string title = 1;
//
string link = 2;
//
string id = 3;
//
int64 icon = 4;
//
ButType but_type = 5;
//
int32 follow_state = 6;
//
string has_title = 7;
}
//
message CardArticle {
//
repeated string covers = 1;
//
string name = 2;
//
int64 mid = 3;
//
bool display_attention = 4;
//
string badge = 5;
//
Relation relation = 6;
}
//
message CardCheese {
//
string cover = 1;
//
int64 progress = 2;
//
int64 duration = 3;
//
string subtitle = 4;
//
int64 state = 5;
}
//
message CardLive {
//
string cover = 1;
//
string name = 2;
//
int64 mid = 3;
//
string tag = 4;
//
int32 status = 5;
//
bool display_attention = 6;
//
Relation relation = 7;
}
//
message CardOGV {
//
string cover = 1;
//
int64 progress = 2;
//
int64 duration = 3;
//
string subtitle = 4;
//
string badge = 5;
//
int64 state = 6;
}
//
message CardUGC {
//
string cover = 1;
//
int64 progress = 2;
//
int64 duration = 3;
//
string name = 4;
//
int64 mid = 5;
//
bool display_attention = 6;
//
int64 cid = 7;
//
int32 page = 8;
//
string subtitle = 9;
//
Relation relation = 10;
//
string bvid = 11;
//
int64 videos = 12;
//
string short_link = 13;
//
string share_subtitle = 14;
//
int64 view = 15;
//
int64 state = 16;
//
string badge = 17;
//
Badge badge_v2 = 18;
}
//
message Cast {
//
repeated MediaPerson person = 1;
//
string title = 2;
}
//
message ChannelInfo {
//
int64 channel_id = 1;
//
bool subscribed = 2;
}
//
message ClearReq {
//
string business = 1;
}
//
message CommentItem {
//
string icon = 1;
//
string url = 2;
//
string title = 3;
//
CommentType type = 4;
//
string action_type = 5;
//
string id = 6;
}
//
enum CommentType {
//
comment_type_none = 0;
//
comment_type_redirect = 1;
//
comment_type_judge = 2;
}
//
message Cursor {
//
int64 max = 1;
//
int32 max_tp = 2;
}
//
message CursorItem {
//
oneof card_item {
//
CardUGC card_ugc = 1;
//
CardOGV card_ogv = 2;
//
CardArticle card_article = 3;
//
CardLive card_live = 4;
//
CardCheese card_cheese = 5;
}
//
string title = 6;
//
string uri = 7;
//
int64 view_at = 8;
//
int64 kid = 9;
//
int64 oid = 10;
//
string business = 11;
//
int32 tp = 12;
//
DeviceType dt = 13;
//
bool has_share = 14;
//
string report = 15;
}
//
message CursorReply {
//
repeated CursorItem items = 1;
//
repeated CursorTab tab = 2;
//
Cursor cursor = 3;
//
bool has_more = 4;
}
//
message CursorReq {
//
Cursor cursor = 1;
//
string business = 2;
//
PlayerPreloadParams player_preload = 3;
//
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4;
}
//
message CursorTab {
//
string business = 1;
//
string name = 2;
//
string router = 3;
//
bool focus = 4;
}
//
message CursorV2Reply {
//
repeated CursorItem items = 1;
//
Cursor cursor = 2;
//
bool has_more = 3;
//
string empty_link = 4;
}
//
message CursorV2Req {
//
Cursor cursor = 1;
//
string business = 2;
//
PlayerPreloadParams player_preload = 3;
//
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4;
//
bool is_local = 5;
}
//
enum DT {
//
Unknown = 0;
//
Phone = 1;
//
Pad = 2;
//
PC = 3;
//
TV = 4;
//
Car = 5;
//
Iot = 6;
//
AndPad = 7;
}
//
message DefaultWordsReply {
//
string trackid = 1;
//
string param = 2;
//
string show = 3;
//
string word = 4;
//
int64 show_front = 5;
//
string exp_str = 6;
//
string goto = 7;
//
string value = 8;
//
string uri = 9;
//
int64 enable_refresh = 10;
//
int64 refresh_interval_milli = 11;
//
int64 enable_animation = 12;
//
int64 animation_time_milli = 13;
}
//
message DefaultWordsReq {
//
int64 from = 1;
//
int64 login_event = 2;
//
int32 teenagers_mode = 3;
//
int32 lessons_mode = 4;
//
string tab = 5;
//
string event_id = 6;
//
string avid = 7;
//
string query = 8;
//
int64 an = 9;
//
int64 is_fresh = 10;
//
string splash_guide = 11;
//
int64 splash_id = 12;
//
int64 refresh_type = 13;
//
string user_act = 14;
//
int32 search_page_return = 15;
}
//
message DeleteReq {
//
repeated HisInfo his_info = 1;
//
string tab = 2;
}
//
message DeviceType {
//
DT type = 1;
//
string icon = 2;
}
//
message Dynamic {
//
bilibili.app.dynamic.v2.DynamicItem dynamic = 1;
}
//
enum FacialRecognitionVerifyFrom {
//
VerifyUnknownFrom = 0;
//
VerifyFromGuardian = 1;
//
VerifyFromAppeal = 2;
}
//
message FacialRecognitionVerifyReply {
}
//
message FacialRecognitionVerifyReq {
//
FacialRecognitionVerifyFrom from = 1;
//
string device_token = 2;
}
//
enum From {
//
ArchiveTab = 0;
//
DynamicTab = 1;
}
//
message HisInfo {
//
string business = 1;
//
int64 kid = 2;
}
//
enum HistorySource {
//
history = 0;
//
shopping = 1;
}
//
message HistoryTabReply {
//
repeated CursorTab tab = 1;
}
//
message HistoryTabReq {
//
string business = 1;
//
HistorySource source = 2;
//
string keyword = 3;
}
//
message LatestHistoryReply {
//
CursorItem items = 1;
//
string scene = 2;
//
int64 rtime = 3;
//
string flag = 4;
}
//
message LatestHistoryReq {
//
string business = 1;
//
PlayerPreloadParams player_preload = 2;
}
//
message LikeButton {
//
int64 aid = 1;
//
int32 count = 2;
//
bool show_count = 3;
//
string event = 4;
//
int32 selected = 5;
//
string event_v2 = 6;
//
LikeButtonResource like_resource = 7;
//
LikeButtonResource dis_like_resource = 8;
//
LikeButtonResource like_night_resource = 9;
//
LikeButtonResource dis_like_night_resource = 10;
}
//
message LikeButtonResource {
//
string url = 1;
//
string hash = 2;
}
//
message LikeCard {
//
int64 like = 1;
//
bool is_follow = 2;
}
//
message MediaCard {
//
string cover = 1;
//
string cur_title = 2;
//
string style = 3;
//
string label = 4;
//
Button but_first = 5;
//
Supernatant but_second = 6;
//
Scores scores = 7;
}
//
message MediaCommentReply {
//
string err_msg = 1;
}
//
message MediaCommentReq {
//
string id = 1;
}
//
message MediaDetailReply {
//
Cast cast = 1;
//
Staff staff = 2;
//
Overview overview = 3;
}
//
message MediaDetailReq {
//
int64 biz_id = 1;
//
int64 biz_type = 2;
}
//
message MediaFollowReply {
}
//
message MediaFollowReq {
//
string id = 1;
//
ButType type = 2;
}
//
message MediaPerson {
//
string real_name = 1;
//
string square_url = 2;
//
string character = 3;
//
int64 person_id = 4;
//
string type = 5;
}
//
message MediaRelationReply {
//
string offset = 1;
//
bool has_more = 2;
//
repeated SmallItem list = 3;
}
//
message MediaRelationReq {
//
int64 biz_id = 1;
//
int64 biz_type = 2;
//
int64 feed_id = 3;
//
string offset = 5;
//
int32 ps = 6;
}
//
message MediaTabReply {
//
MediaCard media_card = 1;
//
repeated ShowTab tab = 2;
//
int64 default_tab_index = 3;
//
ChannelInfo channel_info = 4;
}
//
message MediaTabReq {
//
int64 biz_id = 1;
//
int64 biz_type = 2;
//
string source = 3;
//
string spmid = 4;
//
map<string, string> args = 5;
}
//
message MediaVideoReply {
//
string offset = 1;
//
bool has_more = 2;
//
repeated BigItem list = 3;
}
//
message MediaVideoReq {
//
int64 biz_id = 1;
//
int64 biz_type = 2;
//
int64 feed_id = 3;
//
string offset = 5;
//
int32 ps = 6;
//
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 7;
}
//
message ModeStatusReply {
//
repeated UserModel user_models = 1;
}
//
message ModeStatusReq {
//
string device_token = 1;
}
//
enum ModelStatus {
//
CloseStatus = 0;
//
OpenStatus = 1;
//
NotSetStatus = 2;
}
//
message ModifyPwdReply {
}
//
message ModifyPwdReq {
//
string old_pwd = 1;
//
string new_pwd = 2;
//
string device_token = 3;
}
//
message NftFaceIcon {
//
int32 region_type = 1;
//
string icon = 2;
//
int32 show_status = 3;
}
//
message NoReply {
}
//
message OfficialVerify {
//
int32 type = 1;
//
string desc = 2;
}
//
message Overview {
//
string title = 1;
//
string text = 2;
}
//
message Page {
//
int64 pn = 1;
//
int64 total = 2;
}
//
message PlayerPreloadParams {
//
int64 qn = 1;
//
int64 fnver = 2;
//
int64 fnval = 3;
//
int64 force_host = 4;
//
int64 fourk = 5;
}
//
message Policy {
//
int64 interval = 1;
//
bool use_local_time = 2;
}
//
enum PwdFrom {
//
UnknownFrom = 0;
//
TeenagersAntiAddictionFrom = 1;
//
TeenagersCurfewFrom = 2;
//
TeenagersLoginFrom = 3;
//
TeenagersLogOutFrom = 4;
//
FamilyAntiAddictionFrom = 5;
//
FamilyCurfewFrom = 6;
//
FamilyLogOutFrom = 7;
//
FamilyTimeLockFrom = 8;
//
TeenagersQuitPwdFrom = 9;
//
TeenagersModifyPwdFrom = 10;
//
FamilyQuitFrom = 11;
//
OSTeenagersLogin = 12;
//
OSTeenagersLogout = 13;
//
TeenagersSetAge = 14;
//
OSTeenagersSetAge = 15;
}
//
message ReasonStyle {
//
string text = 1;
//
string text_color = 2;
//
string text_color_night = 3;
//
string bg_color = 4;
//
string bg_color_night = 5;
//
string border_color = 6;
//
string border_color_night = 7;
//
int32 bg_style = 8;
}
//
message Relation {
//
int32 status = 1;
//
int32 is_follow = 2;
//
int32 is_followed = 3;
}
//
message ResultItem {
//
string from = 1;
//
string title = 2;
//
string keyword = 3;
//
int32 position = 4;
//
string cover = 5;
//
double cover_size = 6;
//
string sug_type = 7;
//
int32 term_type = 8;
//
string goto = 9;
//
string uri = 10;
//
OfficialVerify official_verify = 11;
//
string param = 12;
//
int64 mid = 13;
//
int32 fans = 14;
//
int32 level = 15;
//
int32 archives = 16;
//
int64 ptime = 17;
//
string season_type_name = 18;
//
string area = 19;
//
string style = 20;
//
string label = 21;
//
double rating = 22;
//
int32 vote = 23;
//
repeated ReasonStyle badges = 24;
//
string styles = 25;
//
int64 module_id = 26;
//
string live_link = 27;
//
int32 face_nft_new = 28;
//
NftFaceIcon nft_face_icon = 29;
//
int32 is_senior_member = 30;
//
int32 is_sug_style_exp = 31;
}
//
message Scores {
//
float score = 1;
}
//
message SearchArchiveReply {
//
repeated Arc archives = 1;
//
int64 total = 2;
}
//
message SearchArchiveReq {
//
string keyword = 1;
//
int64 mid = 2;
//
int64 pn = 3;
//
int64 ps = 4;
//
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 5;
}
//
message SearchDynamicReply {
//
repeated Dynamic dynamics = 1;
//
int64 total = 2;
}
//
message SearchDynamicReq {
//
string keyword = 1;
//
int64 mid = 2;
//
int64 pn = 3;
//
int64 ps = 4;
//
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 5;
}
//
message SearchReply {
//
repeated CursorItem items = 1;
//
bool has_more = 2;
//
Page page = 3;
}
//
message SearchReq {
//
string keyword = 1;
//
int64 pn = 2;
//
string business = 3;
}
//
message SearchTabReply {
//
int64 focus = 1;
//
repeated Tab tabs = 2;
}
//
message SearchTabReq {
//
string keyword = 1;
//
int64 mid = 2;
//
From from = 3;
}
//
message SetTeenagersModelAgeReply {
}
//
message SetTeenagersModelAgeReq {
//
string pwd = 1;
//
PwdFrom pwd_from = 2;
//
string device_token = 3;
//
int32 age = 4;
//
bool is_dynamic = 5;
}
//
message ShowTab {
//
TabType tab_type = 1;
//
string title = 2;
//
string url = 3;
}
//
message SmallItem {
//
string title = 1;
//
string cover_image_uri = 2;
//
string uri = 3;
//
string cover_right_text = 4;
//
string cover_left_text1 = 5;
//
int64 cover_left_icon1 = 6;
//
string cover_left_text2 = 7;
//
int64 cover_left_icon2 = 8;
//
int64 param = 9;
//
int64 mid = 10;
}
//
message Staff {
//
string title = 1;
//
string text = 2;
}
//
message SuggestionResult3Reply {
//
string trackid = 1;
//
repeated ResultItem list = 2;
//
string exp_str = 3;
}
//
message SuggestionResult3Req {
//
string keyword = 1;
//
int32 highlight = 2;
//
int32 teenagers_mode = 3;
//
string user_act = 4;
}
//
message Supernatant {
//
string title = 1;
//
repeated CommentItem item = 2;
}
//
message Tab {
//
string title = 1;
//
string uri = 2;
}
//
enum TabType {
//
TAB_INVALID = 0;
//
TAB_OGV_DETAIL = 6;
//
TAB_OGV_REPLY = 7;
//
TAB_FEED_BID = 8;
//
TAB_FEED_SMALL = 9;
}
//
message UpdateReserveStartTimeReply {
//
string desc_text = 1;
}
//
message UpdateReserveStartTimeReq {
//
int64 sid = 1;
//
int64 new_live_plan_start_time = 2;
}
//
message UpdateStatusReply {
}
//
message UpdateStatusReq {
//
string pwd = 1;
//
bool switch = 2;
//
PwdFrom pwd_from = 3;
//
string device_token = 4;
}
//
message UserCard {
//
string user_name = 1;
//
string user_face = 2;
//
string user_url = 3;
//
int64 mid = 4;
}
//
message UserModel {
//
int64 mid = 1;
//
string mode = 2;
//
string wsxcde = 3;
//
ModelStatus status = 4;
//
Policy policy = 5;
//
bool is_forced = 6;
//
bool must_teen = 7;
//
bool must_real_name = 8;
//
bool is_parent_control = 9;
//
int32 age = 10;
}
//
message VerifyPwdReply {
}
//
message VerifyPwdReq {
//
string pwd = 1;
//
PwdFrom pwd_from = 2;
//
bool is_dynamic = 3;
//
bool close_device = 4;
//
string device_token = 5;
}