refactor: Protos

This commit is contained in:
HuanCheng65 2023-02-01 15:13:03 +08:00
parent 9cb0555577
commit d472118e6f
No known key found for this signature in database
GPG Key ID: E9031EF91A805148
53 changed files with 797 additions and 414 deletions

View File

@ -59,6 +59,7 @@ import com.huanchengfly.tieba.post.api.models.protos.hotThreadList.HotThreadList
import com.huanchengfly.tieba.post.api.models.protos.personalized.PersonalizedRequest
import com.huanchengfly.tieba.post.api.models.protos.personalized.PersonalizedRequestData
import com.huanchengfly.tieba.post.api.models.protos.personalized.PersonalizedResponse
import com.huanchengfly.tieba.post.api.models.protos.threadList.AdParam
import com.huanchengfly.tieba.post.api.models.protos.threadList.ThreadListRequest
import com.huanchengfly.tieba.post.api.models.protos.threadList.ThreadListRequestData
import com.huanchengfly.tieba.post.api.models.protos.threadList.ThreadListResponse
@ -920,7 +921,7 @@ object MixedTiebaApiImpl : ITiebaApi {
buildProtobufRequestBody(
ThreadListRequest(
ThreadListRequestData(
ad_param = buildAdParam(3, 0, null),
ad_param = AdParam(3, 0, null),
app_pos = buildAppPosInfo(),
common = buildCommonRequest(),
scr_dip = App.ScreenInfo.DENSITY.toDouble(),

View File

@ -0,0 +1,15 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message Abstract {
int32 type = 1;
string text = 2;
string link = 3;
string src = 4;
string un = 5;
string duringTime = 6;
string voiceMD5 = 7;
}

View File

@ -0,0 +1,13 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message Agree {
int64 agreeNum = 1;
int32 hasAgree = 2;
int32 agreeType = 3;
int64 disagreeNum = 4;
int64 diffAgreeNum = 5;
}

View File

@ -0,0 +1,21 @@
syntax = "proto3";
import "DelThreadText.proto";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message Anti {
string tbs = 1;
int32 ifpost = 2;
int32 ifposta = 3;
int32 forbid_flag = 4;
string forbid_info = 5;
int32 block_stat = 6;
int32 hide_stat = 7;
int32 vcode_stat = 8;
int32 days_tofree = 9;
int32 has_chance = 10;
int32 ifvoice = 11;
repeated DelThreadText del_thread_text = 24;
}

View File

@ -0,0 +1,13 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message AppPosInfo {
optional int64 addr_timestamp = 6;
optional bool ap_connected = 2;
optional string ap_mac = 1;
optional string asp_shown_info = 7;
optional string coordinate_type = 3;
}

View File

@ -1,147 +0,0 @@
syntax = "proto3";
package protos;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message PrivateForumInfo {
int32 private_forum_status = 1;
int32 private_forum_audit_status = 2;
}
message ThemeElement {
string common_color = 1;
string dark_color = 2;
string light_color = 3;
string pattern_image = 4;
string font_color = 5;
}
message ThemeColorInfo {
ThemeElement day = 1;
ThemeElement night = 2;
ThemeElement dark = 3;
}
message Page {
int32 page_size = 1;
int32 offset = 2;
int32 current_page = 3;
int32 total_count = 4;
int32 total_page = 5;
int32 has_more = 6;
int32 has_prev = 7;
int32 cur_good_id = 8;
}
message FrsTabInfo {
int32 tabId = 1;
int32 tabType = 2;
string tabName = 3;
string tabUrl = 4;
string tabGid = 5;
string tabTitle = 6;
int32 isGeneralTab = 7;
string tabCode = 8;
uint32 tabVersion = 9;
int32 isDefault = 10;
}
message DelThreadText {
int32 text_id = 1;
string text_info = 2;
}
message Anti {
string tbs = 1;
int32 ifpost = 2;
int32 ifposta = 3;
int32 forbid_flag = 4;
string forbid_info = 5;
int32 block_stat = 6;
int32 hide_stat = 7;
int32 vcode_stat = 8;
int32 days_tofree = 9;
int32 has_chance = 10;
int32 ifvoice = 11;
repeated DelThreadText del_thread_text = 24;
}
message AppPosInfo {
optional int64 addr_timestamp = 6;
optional bool ap_connected = 2;
optional string ap_mac = 1;
optional string asp_shown_info = 7;
optional string coordinate_type = 3;
}
message Error {
string error_msg = 2;
int32 error_code = 1;
string user_msg = 3;
}
message ProtoCommonResponse {
Error error = 1;
}
message User {
int32 is_login = 1;
int64 id = 2;
string name = 3;
string nameShow = 4;
string portrait = 5;
int32 no_un = 6;
int32 type = 7;
int32 userhide = 9;
int32 is_manager = 11;
int32 is_bawu = 25;
string bawu_type = 26;
int32 has_concerned = 35;
int32 gender = 42;
PrivSets privSets = 45;
string fansNickname = 57;
int32 priv_thread = 92;
int32 isDefaultAvatar = 106;
}
message PrivSets {
int32 like = 2;
int32 group = 3;
int32 post = 4;
int32 live = 6;
}
message DislikeInfo {
string dislikeReason = 1;
uint32 dislikeId = 2;
string extra = 3;
}
message SimpleForum {
int64 id = 1;
string name = 2;
string avatar = 4;
int32 memberNum = 12;
int32 postNum = 13;
}
message MemeInfo {
uint32 pckId = 1;
uint64 picId = 2;
string picUrl = 3;
string thumbnail = 4;
uint32 width = 5;
uint32 height = 6;
string detailLink = 7;
}
message RecommendTopicList {
uint64 topicId = 1;
string topicName = 2;
uint32 type = 3;
uint64 discussNum = 4;
uint32 tag = 5;
string topicDesc = 6;
string topicPic = 7;
}

View File

@ -1,6 +1,6 @@
syntax = "proto3";
package protos;
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";

View File

@ -0,0 +1,10 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message DelThreadText {
int32 text_id = 1;
string text_info = 2;
}

View File

@ -0,0 +1,11 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message DislikeInfo {
string dislikeReason = 1;
uint32 dislikeId = 2;
string extra = 3;
}

View File

@ -0,0 +1,11 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message Error {
string error_msg = 2;
int32 error_code = 1;
string user_msg = 3;
}

View File

@ -0,0 +1,16 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.profile";
message ForumDynamic {
int64 forum_id = 1;
string forum_name = 2;
string avatar = 3;
string slogan = 4;
uint32 is_like = 5;
uint32 member_count = 6;
uint32 thread_count = 7;
uint32 user_thread_count = 9;
}

View File

@ -1,11 +1,12 @@
syntax = "proto3";
package protos;
package tieba.forumRecommend;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.forumRecommend";
import "Common.proto";
import "CommonRequest.proto";
import "Error.proto";
import "ForumRecommend/LikeForum.proto";
message ForumRecommendRequestData {
uint32 like_forum = 1;
@ -20,26 +21,6 @@ message ForumRecommendRequest {
ForumRecommendRequestData data = 1;
}
message LikeForum {
int64 forum_id = 1;
string forum_name = 2;
string avatar = 3;
int32 is_sign = 4;
int32 level_id = 5;
int32 is_liveforum = 6;
uint32 is_brand_forum = 7;
string content = 9;
int32 is_top = 10;
int32 sort_type = 11;
ThemeColorInfo theme_color = 12;
bool need_trans = 14;
int32 is_private_forum = 15;
int32 is_manager = 18;
optional PrivateForumInfo private_forum_info = 19;
int64 hot_thread_id = 20;
repeated FrsTabInfo tab_info = 21;
}
message ForumRecommendResponseData {
repeated LikeForum like_forum = 1;
int32 is_login = 4;

View File

@ -0,0 +1,28 @@
syntax = "proto3";
import "ThemeColorInfo.proto";
import "PrivateForumInfo.proto";
import "FrsTabInfo.proto";
package tieba.forumRecommend;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.forumRecommend";
message LikeForum {
int64 forum_id = 1;
string forum_name = 2;
string avatar = 3;
int32 is_sign = 4;
int32 level_id = 5;
int32 is_liveforum = 6;
uint32 is_brand_forum = 7;
string content = 9;
int32 is_top = 10;
int32 sort_type = 11;
ThemeColorInfo theme_color = 12;
bool need_trans = 14;
int32 is_private_forum = 15;
int32 is_manager = 18;
optional PrivateForumInfo private_forum_info = 19;
int64 hot_thread_id = 20;
repeated FrsTabInfo tab_info = 21;
}

View File

@ -1,180 +0,0 @@
syntax = "proto3";
package protos;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
import "Common.proto";
import "CommonRequest.proto";
import "ThreadInfo.proto";
message NavTabInfo {
repeated FrsTabInfo tab = 1;
repeated FrsTabInfo menu = 2;
repeated FrsTabInfo head = 3;
}
message Group {
int32 hide_recommend_group = 1;
int32 group_count = 2;
}
message Forum {
int64 forum_id = 1;
string level1_dir_name = 2;
}
message RankInfo {
int32 sign_count = 1;
int32 sign_rank = 2;
int32 member_count = 3;
double dir_rate = 4;
}
message SignForum {
int32 is_on = 1;
int32 is_filter = 2;
optional Forum forum_info = 3;
RankInfo current_rank_info = 4;
}
message SignUser {
int64 user_id = 1;
int32 is_sign_in = 2;
int32 user_sign_rank = 3;
int32 sign_time = 4;
int32 cont_sign_num = 5;
int32 cout_total_sign_num = 6;
int32 is_org_disabled = 7;
int32 c_sign_num = 8;
int32 hun_sign_num = 9;
int32 total_resign_num = 10;
int32 miss_sign_num = 11;
}
message SignInfo {
SignUser user_info = 1;
SignForum forum_info = 2;
}
message Classify {
string name = 1;
int64 id = 2;
int32 class_id = 3;
string class_name = 4;
}
message Manager {
int64 id = 1;
string name = 2;
string show_name = 3;
string portrait = 4;
}
message PostPrefix {
int32 mode = 1;
string text = 2;
string type = 3;
string time = 4;
}
message PostTopic {
string title_topic = 1;
string content_topic = 2;
}
message ForumInfo {
int64 id = 1;
string name = 2;
string first_class = 3;
string second_class = 4;
int32 is_exists = 5;
int32 is_like = 6;
int32 user_level = 7;
string level_name = 8;
int32 member_num = 9;
int32 thread_num = 10;
int32 post_num = 11;
int32 has_frs_star = 12;
int32 cur_score = 13;
int32 levelup_score = 14;
SignInfo sign_in_info = 15;
repeated Manager managers = 17;
string tids = 20;
repeated Classify good_classify = 21;
string avatar = 24;
string slogan = 25;
string f_share_img = 78;
string forum_share_link = 79;
}
message AdParam {
optional int32 load_count = 1;
optional int32 refresh_count = 2;
optional string yoga_lib_version = 3;
}
message FrsPageRequestData {
optional string ad_context_list = 60;
optional string ad_ext_params = 62;
AdParam ad_param = 51;
AppPosInfo app_pos = 50;
optional int32 call_from = 56;
optional int32 category_id = 44;
optional int32 cid = 5;
optional int32 class_id = 23;
CommonRequest common = 39;
optional int32 ctime = 17;
optional int32 data_size = 18;
optional int64 hot_thread_id = 58;
optional int32 is_default_navtab = 59;
optional int32 is_good = 4;
optional int32 is_selection = 55;
string kw = 1;
optional uint64 last_click_tid = 48;
optional string lastids = 40;
int32 load_type = 49;
optional int32 net_error = 19;
optional string obj_locate = 52;
optional string obj_source = 53;
int32 pn = 15;
int32 q_type = 14;
int32 rn = 2;
int32 rn_need = 3;
double scr_dip = 13;
int32 scr_h = 12;
int32 scr_w = 11;
optional int32 sort_type = 47;
optional int32 st_param = 27;
optional string st_type = 16;
optional string up_schema = 61;
optional int32 with_group = 8;
optional string yuelaou_locate = 45;
}
message FrsPageRequest {
FrsPageRequestData data = 1;
}
message FrsPageResponseData {
User user = 1;
ForumInfo forum = 2;
Page page = 4;
Anti anti = 5;
Group group = 6;
repeated ThreadInfo thread_list = 7;
repeated int64 thread_id_list = 8;
int32 is_new_url = 9;
int32 time = 11;
int32 ctime = 12;
int64 logid = 13;
int32 server_time = 14;
repeated User user_list = 17;
repeated FrsTabInfo frs_tab_info = 22;
NavTabInfo nav_tab_info = 37;
}
message FrsPageResponse {
Error error = 1;
FrsPageResponseData data = 2;
}

View File

@ -0,0 +1,11 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message AdParam {
optional int32 load_count = 1;
optional int32 refresh_count = 2;
optional string yoga_lib_version = 3;
}

View File

@ -0,0 +1,12 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message Classify {
string name = 1;
int64 id = 2;
int32 class_id = 3;
string class_name = 4;
}

View File

@ -0,0 +1,10 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message Forum {
int64 forum_id = 1;
string level1_dir_name = 2;
}

View File

@ -0,0 +1,33 @@
syntax = "proto3";
import "FrsPage/SignInfo.proto";
import "FrsPage/Manager.proto";
import "FrsPage/Classify.proto";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message ForumInfo {
int64 id = 1;
string name = 2;
string first_class = 3;
string second_class = 4;
int32 is_exists = 5;
int32 is_like = 6;
int32 user_level = 7;
string level_name = 8;
int32 member_num = 9;
int32 thread_num = 10;
int32 post_num = 11;
int32 has_frs_star = 12;
int32 cur_score = 13;
int32 levelup_score = 14;
SignInfo sign_in_info = 15;
repeated Manager managers = 17;
string tids = 20;
repeated Classify good_classify = 21;
string avatar = 24;
string slogan = 25;
string f_share_img = 78;
string forum_share_link = 79;
}

View File

@ -0,0 +1,83 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
import "CommonRequest.proto";
import "ThreadInfo.proto";
import "FrsTabInfo.proto";
import "AppPosInfo.proto";
import "User.proto";
import "Page.proto";
import "Anti.proto";
import "Error.proto";
import "FrsPage/NavTabInfo.proto";
import "FrsPage/Group.proto";
import "FrsPage/AdParam.proto";
import "FrsPage/ForumInfo.proto";
message FrsPageRequestData {
optional string ad_context_list = 60;
optional string ad_ext_params = 62;
AdParam ad_param = 51;
AppPosInfo app_pos = 50;
optional int32 call_from = 56;
optional int32 category_id = 44;
optional int32 cid = 5;
optional int32 class_id = 23;
CommonRequest common = 39;
optional int32 ctime = 17;
optional int32 data_size = 18;
optional int64 hot_thread_id = 58;
optional int32 is_default_navtab = 59;
optional int32 is_good = 4;
optional int32 is_selection = 55;
string kw = 1;
optional uint64 last_click_tid = 48;
optional string lastids = 40;
int32 load_type = 49;
optional int32 net_error = 19;
optional string obj_locate = 52;
optional string obj_source = 53;
int32 pn = 15;
int32 q_type = 14;
int32 rn = 2;
int32 rn_need = 3;
double scr_dip = 13;
int32 scr_h = 12;
int32 scr_w = 11;
optional int32 sort_type = 47;
optional int32 st_param = 27;
optional string st_type = 16;
optional string up_schema = 61;
optional int32 with_group = 8;
optional string yuelaou_locate = 45;
}
message FrsPageRequest {
FrsPageRequestData data = 1;
}
message FrsPageResponseData {
User user = 1;
ForumInfo forum = 2;
Page page = 4;
Anti anti = 5;
Group group = 6;
repeated ThreadInfo thread_list = 7;
repeated int64 thread_id_list = 8;
int32 is_new_url = 9;
int32 time = 11;
int32 ctime = 12;
int64 logid = 13;
int32 server_time = 14;
repeated User user_list = 17;
repeated FrsTabInfo frs_tab_info = 22;
NavTabInfo nav_tab_info = 37;
}
message FrsPageResponse {
Error error = 1;
FrsPageResponseData data = 2;
}

View File

@ -0,0 +1,10 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message Group {
int32 hide_recommend_group = 1;
int32 group_count = 2;
}

View File

@ -0,0 +1,12 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message Manager {
int64 id = 1;
string name = 2;
string show_name = 3;
string portrait = 4;
}

View File

@ -0,0 +1,13 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
import "FrsTabInfo.proto";
message NavTabInfo {
repeated FrsTabInfo tab = 1;
repeated FrsTabInfo menu = 2;
repeated FrsTabInfo head = 3;
}

View File

@ -0,0 +1,12 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message PostPrefix {
int32 mode = 1;
string text = 2;
string type = 3;
string time = 4;
}

View File

@ -0,0 +1,10 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message PostTopic {
string title_topic = 1;
string content_topic = 2;
}

View File

@ -0,0 +1,12 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
message RankInfo {
int32 sign_count = 1;
int32 sign_rank = 2;
int32 member_count = 3;
double dir_rate = 4;
}

View File

@ -0,0 +1,15 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
import "FrsPage/Forum.proto";
import "FrsPage/RankInfo.proto";
message SignForum {
int32 is_on = 1;
int32 is_filter = 2;
optional Forum forum_info = 3;
RankInfo current_rank_info = 4;
}

View File

@ -0,0 +1,13 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
import "FrsPage/SignForum.proto";
import "FrsPage/SignUser.proto";
message SignInfo {
SignUser user_info = 1;
SignForum forum_info = 2;
}

View File

@ -0,0 +1,33 @@
syntax = "proto3";
package tieba.frsPage;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.frsPage";
import "CommonRequest.proto";
import "ThreadInfo.proto";
import "FrsTabInfo.proto";
import "AppPosInfo.proto";
import "User.proto";
import "Page.proto";
import "Anti.proto";
import "Error.proto";
import "FrsPage/NavTabInfo.proto";
import "FrsPage/Group.proto";
import "FrsPage/Forum.proto";
import "FrsPage/RankInfo.proto";
import "FrsPage/SignForum.proto";
message SignUser {
int64 user_id = 1;
int32 is_sign_in = 2;
int32 user_sign_rank = 3;
int32 sign_time = 4;
int32 cont_sign_num = 5;
int32 cout_total_sign_num = 6;
int32 is_org_disabled = 7;
int32 c_sign_num = 8;
int32 hun_sign_num = 9;
int32 total_resign_num = 10;
int32 miss_sign_num = 11;
}

View File

@ -0,0 +1,18 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message FrsTabInfo {
int32 tabId = 1;
int32 tabType = 2;
string tabName = 3;
string tabUrl = 4;
string tabGid = 5;
string tabTitle = 6;
int32 isGeneralTab = 7;
string tabCode = 8;
uint32 tabVersion = 9;
int32 isDefault = 10;
}

View File

@ -1,12 +1,14 @@
syntax = "proto3";
package protos;
package tieba.hotThreadList;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.hotThreadList";
import "Common.proto";
import "CommonRequest.proto";
import "ThreadInfo.proto";
import "RecommendTopicList.proto";
import "FrsTabInfo.proto";
import "Error.proto";
message HotThreadListRequestData {
CommonRequest common = 1;

View File

@ -0,0 +1,19 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message Media {
int32 type = 1;
string bigPic = 3;
string srcPic = 8;
uint32 width = 10;
uint32 height = 11;
string originPic = 15;
uint32 originSize = 16;
int64 postId = 17;
string dynamicPic = 18;
uint32 isLongPic = 19;
uint32 showOriginalBtn = 20;
}

View File

@ -0,0 +1,15 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message MemeInfo {
uint32 pckId = 1;
uint64 picId = 2;
string picUrl = 3;
string thumbnail = 4;
uint32 width = 5;
uint32 height = 6;
string detailLink = 7;
}

View File

@ -0,0 +1,16 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message Page {
int32 page_size = 1;
int32 offset = 2;
int32 current_page = 3;
int32 total_count = 4;
int32 total_page = 5;
int32 has_more = 6;
int32 has_prev = 7;
int32 cur_good_id = 8;
}

View File

@ -1,10 +1,10 @@
syntax = "proto3";
package protos;
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
import "Common.proto";
import "MemeInfo.proto";
message PbContent {
int32 type = 1;

View File

@ -1,12 +1,13 @@
syntax = "proto3";
package protos;
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.personalized";
import "Common.proto";
import "CommonRequest.proto";
import "ThreadInfo.proto";
import "AppPosInfo.proto";
import "Error.proto";
message PersonalizedRequestData {
string ad_context_list = 30;

View File

@ -1,7 +1,5 @@
syntax = "proto3";
package protos;
option java_package = "com.huanchengfly.tieba.post.models.protos";
message PhotoViewData {

View File

@ -0,0 +1,16 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
import "Abstract.proto";
message PostInfoContent {
repeated Abstract post_content = 1;
uint64 create_time = 2;
uint64 post_type = 3;
uint64 post_id = 4;
int32 is_author_view = 5;
string target_scheme = 7;
}

View File

@ -0,0 +1,78 @@
syntax = "proto3";
import "PrivSets.proto";
import "PostInfoContent.proto";
import "PbContent.proto";
import "Abstract.proto";
import "Media.proto";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message PostInfoList {
uint64 forum_id = 1;
uint64 thread_id = 2;
uint64 post_id = 3;
uint32 is_thread = 4;
uint32 create_time = 5;
string forum_name = 6;
string title = 7;
repeated PostInfoContent content = 8;
string content_thread = 9;
string user_name = 10;
string ip = 11;
uint32 is_post_deleted = 12;
string ptype = 13;
string _abstract = 14;
repeated Abstract abstract_thread = 15;
repeated Media media = 16;
uint32 reply_num = 17;
int64 user_id = 18;
string user_portrait = 19;
string post_type = 20;
// LbsInfo lbs_info = 21;
// Quote quote = 22;
// repeated Voice voice_info = 23;
// AnchorInfo anchor_info = 24;
// int32 hide_post = 25;
// uint64 thread_type = 26;
// ZhiBoInfoTW twzhibo_info = 27;
// PollInfo poll_info = 28;
// VideoInfo video_info = 29;
// bool is_deal = 30;
// DealInfo deal_info = 31;
// repeated MultipleForum multiple_forum_list = 32;
// int32 freq_num = 33;
// uint64 v_forum_id = 34;
// string name_show = 35;
// AlaLiveInfo ala_info = 36;
// int32 agree_num = 37;
// int32 view_num = 38;
// int32 share_num = 39;
// Agree agree = 40;
// int32 is_remain = 41;
// OriginThreadInfo origin_thread_info = 42;
// int32 is_view_year = 43;
// int32 is_share_thread = 44;
repeated PbContent rich_title = 45;
repeated PbContent rich_abstract = 46;
int32 is_ntitle = 47;
// string article_cover = 48;
repeated PbContent first_post_content = 49;
// BaijiahaoInfo baijiahao_info = 50;
// string wonderful_post_info = 51;
// Item item = 52;
// repeated HeadItem item_star = 53;
// repeated PbLinkInfo pb_link_info = 54;
// repeated PbGoodsInfo pb_goods_info = 55;
repeated PrivSets priv_sets = 56;
// int32 is_author_view = 57;
// WorksInfo works_info = 58;
int32 is_manager = 59;
int32 is_origin_manager = 60;
// int32 good_types = 61;
// int32 top_types = 62;
// UserPostPerm user_post_perm = 63;
// VoiceRoom voice_room = 64;
// string target_scheme = 66;
}

View File

@ -0,0 +1,12 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message PrivSets {
int32 like = 2;
int32 group = 3;
int32 post = 4;
int32 live = 6;
}

View File

@ -0,0 +1,10 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message PrivateForumInfo {
int32 private_forum_status = 1;
int32 private_forum_audit_status = 2;
}

View File

@ -0,0 +1,43 @@
syntax = "proto3";
package tieba.profile;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.profile";
import "ForumDynamic.proto";
import "CommonRequest.proto";
import "User.proto";
import "Anti.proto";
import "Error.proto";
message ProfileRequestData {
CommonRequest common = 9;
int64 friend_uid = 3;
string friend_uid_portrait = 16;
uint32 has_plist = 8;
int32 is_from_usercenter = 14;
uint32 need_post_count = 2;
int32 page = 15;
uint32 pn = 6;
uint32 q_type = 12;
uint32 rn = 7;
double scr_dip = 13;
int32 scr_h = 11;
int32 scr_w = 10;
int64 uid = 1;
}
message ProfileRequest {
ProfileRequestData data = 1;
}
message ProfileResponseData {
User user = 1;
Anti anti_stat = 2;
repeated ForumDynamic concerned_forum_list = 13;
}
message ProfileResponse {
Error error = 1;
ProfileResponseData data = 2;
}

View File

@ -0,0 +1,9 @@
syntax = "proto3";
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
import "Error.proto";
message ProtoCommonResponse {
tieba.Error error = 1;
}

View File

@ -0,0 +1,15 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message RecommendTopicList {
uint64 topicId = 1;
string topicName = 2;
uint32 type = 3;
uint64 discussNum = 4;
uint32 tag = 5;
string topicDesc = 6;
string topicPic = 7;
}

View File

@ -0,0 +1,13 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message SimpleForum {
int64 id = 1;
string name = 2;
string avatar = 4;
int32 memberNum = 12;
int32 postNum = 13;
}

View File

@ -0,0 +1,12 @@
syntax = "proto3";
import "ThemeElement.proto";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message ThemeColorInfo {
ThemeElement day = 1;
ThemeElement night = 2;
ThemeElement dark = 3;
}

View File

@ -0,0 +1,13 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message ThemeElement {
string common_color = 1;
string dark_color = 2;
string light_color = 3;
string pattern_image = 4;
string font_color = 5;
}

View File

@ -1,11 +1,17 @@
syntax = "proto3";
package protos;
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
import "Common.proto";
import "Pb.proto";
import "PbContent.proto";
import "SimpleForum.proto";
import "DislikeInfo.proto";
import "User.proto";
import "Abstract.proto";
import "Media.proto";
import "Agree.proto";
import "VideoInfo.proto";
message ThreadInfo {
int64 id = 1;
@ -50,48 +56,4 @@ message ThreadInfo {
string tabName = 176;
int32 isDeleted = 181;
int32 hotNum = 182;
}
message Abstract {
int32 type = 1;
string text = 2;
string link = 3;
string src = 4;
string un = 5;
string duringTime = 6;
string voiceMD5 = 7;
}
message Media {
int32 type = 1;
string bigPic = 3;
string srcPic = 8;
uint32 width = 10;
uint32 height = 11;
string originPic = 15;
uint32 originSize = 16;
int64 postId = 17;
string dynamicPic = 18;
uint32 isLongPic = 19;
uint32 showOriginalBtn = 20;
}
message VideoInfo {
string videoMD5 = 1;
string videoUrl = 2;
uint32 videoDuration = 3;
uint32 videoWidth = 4;
uint32 videoHeight = 5;
string thumbnailUrl = 6;
uint32 thumbnailWidth = 7;
uint32 thumbnailHeight = 8;
string mediaSubtitle = 11;
}
message Agree {
int64 agreeNum = 1;
int32 hasAgree = 2;
int32 agreeType = 3;
int64 disagreeNum = 4;
int64 diffAgreeNum = 5;
}

View File

@ -0,0 +1,11 @@
syntax = "proto3";
package tieba.threadList;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.threadList";
message AdParam {
int32 load_count = 1;
int32 refresh_count = 2;
optional string yoga_lib_version = 3;
}

View File

@ -1,13 +1,15 @@
syntax = "proto3";
package protos;
package tieba.threadList;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.threadList";
import "Common.proto";
import "CommonRequest.proto";
import "ThreadInfo.proto";
import "FrsPage.proto";
import "AppPosInfo.proto";
import "User.proto";
import "Error.proto";
import "ThreadList/AdParam.proto";
message ThreadListRequestData {
optional string ad_context_list = 19;

View File

@ -1,12 +1,14 @@
syntax = "proto3";
package protos;
package tieba.topicList;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.topicList";
import "Common.proto";
import "CommonRequest.proto";
import "ThreadInfo.proto";
import "Error.proto";
import "Media.proto";
import "VideoInfo.proto";
message TopicListRequestData {
CommonRequest common = 1;

View File

@ -0,0 +1,26 @@
syntax = "proto3";
import "PrivSets.proto";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message User {
int32 is_login = 1;
int64 id = 2;
string name = 3;
string nameShow = 4;
string portrait = 5;
int32 no_un = 6;
int32 type = 7;
int32 userhide = 9;
int32 is_manager = 11;
int32 is_bawu = 25;
string bawu_type = 26;
int32 has_concerned = 35;
int32 gender = 42;
PrivSets privSets = 45;
string fansNickname = 57;
int32 priv_thread = 92;
int32 isDefaultAvatar = 106;
}

View File

@ -1,13 +1,14 @@
syntax = "proto3";
package protos;
package tieba.userLike;
option java_package = "com.huanchengfly.tieba.post.api.models.protos.userLike";
import "Common.proto";
import "CommonRequest.proto";
import "ThreadInfo.proto";
import "Pb.proto";
import "PbContent.proto";
import "Error.proto";
import "User.proto";
message UserLikeRequestData {
CommonRequest common = 1;

View File

@ -0,0 +1,17 @@
syntax = "proto3";
package tieba;
option java_package = "com.huanchengfly.tieba.post.api.models.protos";
message VideoInfo {
string videoMD5 = 1;
string videoUrl = 2;
uint32 videoDuration = 3;
uint32 videoWidth = 4;
uint32 videoHeight = 5;
string thumbnailUrl = 6;
uint32 thumbnailWidth = 7;
uint32 thumbnailHeight = 8;
string mediaSubtitle = 11;
}