feat: 新版回贴 API
This commit is contained in:
parent
91893bb3b7
commit
494923ad33
|
|
@ -2,7 +2,8 @@ package com.huanchengfly.tieba.post.api
|
||||||
|
|
||||||
enum class ClientVersion(val version: String) {
|
enum class ClientVersion(val version: String) {
|
||||||
TIEBA_V11("11.10.8.6"),
|
TIEBA_V11("11.10.8.6"),
|
||||||
TIEBA_V12("12.25.1.0");
|
TIEBA_V12("12.25.1.0"),
|
||||||
|
TIEBA_V12_POST("12.35.1.0");
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return version
|
return version
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ object Param {
|
||||||
const val CUID_GALAXY3 = "c3_aid"
|
const val CUID_GALAXY3 = "c3_aid"
|
||||||
const val OAID = "oaid"
|
const val OAID = "oaid"
|
||||||
const val CUID_GID = "cuid_gid"
|
const val CUID_GID = "cuid_gid"
|
||||||
|
const val DEVICE_SCORE = "device_score"
|
||||||
const val EVENT_DAY = "event_day"
|
const val EVENT_DAY = "event_day"
|
||||||
const val EXTRA = "extra"
|
const val EXTRA = "extra"
|
||||||
const val FIRST_INSTALL_TIME = "first_install_time"
|
const val FIRST_INSTALL_TIME = "first_install_time"
|
||||||
|
|
@ -89,4 +90,5 @@ object Param {
|
||||||
const val STOKEN = "stoken"
|
const val STOKEN = "stoken"
|
||||||
const val SWAN_GAME_VER = "swan_game_ver"
|
const val SWAN_GAME_VER = "swan_game_ver"
|
||||||
const val TIMESTAMP = "timestamp"
|
const val TIMESTAMP = "timestamp"
|
||||||
|
const val Z_ID = "z_id"
|
||||||
}
|
}
|
||||||
|
|
@ -14,6 +14,7 @@ import com.huanchengfly.tieba.post.utils.AccountUtil
|
||||||
import com.huanchengfly.tieba.post.utils.CacheUtil.base64Encode
|
import com.huanchengfly.tieba.post.utils.CacheUtil.base64Encode
|
||||||
import com.huanchengfly.tieba.post.utils.ClientUtils
|
import com.huanchengfly.tieba.post.utils.ClientUtils
|
||||||
import com.huanchengfly.tieba.post.utils.CuidUtils
|
import com.huanchengfly.tieba.post.utils.CuidUtils
|
||||||
|
import com.huanchengfly.tieba.post.utils.DeviceUtils
|
||||||
import com.huanchengfly.tieba.post.utils.MobileInfoUtil
|
import com.huanchengfly.tieba.post.utils.MobileInfoUtil
|
||||||
import com.huanchengfly.tieba.post.utils.UIDUtil
|
import com.huanchengfly.tieba.post.utils.UIDUtil
|
||||||
import com.squareup.wire.Message
|
import com.squareup.wire.Message
|
||||||
|
|
@ -32,7 +33,7 @@ fun buildProtobufRequestBody(
|
||||||
return MyMultipartBody.Builder(BOUNDARY)
|
return MyMultipartBody.Builder(BOUNDARY)
|
||||||
.apply {
|
.apply {
|
||||||
setType(MyMultipartBody.FORM)
|
setType(MyMultipartBody.FORM)
|
||||||
if (clientVersion != ClientVersion.TIEBA_V12) {
|
if (clientVersion != ClientVersion.TIEBA_V12 && clientVersion != ClientVersion.TIEBA_V12_POST) {
|
||||||
addFormDataPart(Param.CLIENT_VERSION, clientVersion.version)
|
addFormDataPart(Param.CLIENT_VERSION, clientVersion.version)
|
||||||
}
|
}
|
||||||
if (needSToken) {
|
if (needSToken) {
|
||||||
|
|
@ -68,9 +69,10 @@ fun buildAppPosInfo(): AppPosInfo {
|
||||||
|
|
||||||
fun buildCommonRequest(
|
fun buildCommonRequest(
|
||||||
context: Context = App.INSTANCE,
|
context: Context = App.INSTANCE,
|
||||||
clientVersion: ClientVersion = ClientVersion.TIEBA_V11
|
clientVersion: ClientVersion = ClientVersion.TIEBA_V11,
|
||||||
|
tbs: String? = null,
|
||||||
): CommonRequest = when (clientVersion) {
|
): CommonRequest = when (clientVersion) {
|
||||||
ClientVersion.TIEBA_V11 ->
|
ClientVersion.TIEBA_V11 -> {
|
||||||
CommonRequest(
|
CommonRequest(
|
||||||
BDUSS = AccountUtil.getBduss(),
|
BDUSS = AccountUtil.getBduss(),
|
||||||
_client_id = ClientUtils.clientId ?: RetrofitTiebaApi.randomClientId,
|
_client_id = ClientUtils.clientId ?: RetrofitTiebaApi.randomClientId,
|
||||||
|
|
@ -94,8 +96,9 @@ fun buildCommonRequest(
|
||||||
sample_id = ClientUtils.sampleId,
|
sample_id = ClientUtils.sampleId,
|
||||||
stoken = AccountUtil.getSToken(),
|
stoken = AccountUtil.getSToken(),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
ClientVersion.TIEBA_V12 ->
|
ClientVersion.TIEBA_V12 -> {
|
||||||
CommonRequest(
|
CommonRequest(
|
||||||
BDUSS = AccountUtil.getBduss(),
|
BDUSS = AccountUtil.getBduss(),
|
||||||
_client_id = ClientUtils.clientId ?: RetrofitTiebaApi.randomClientId,
|
_client_id = ClientUtils.clientId ?: RetrofitTiebaApi.randomClientId,
|
||||||
|
|
@ -139,6 +142,59 @@ fun buildCommonRequest(
|
||||||
start_type = 1,
|
start_type = 1,
|
||||||
stoken = AccountUtil.getSToken(),
|
stoken = AccountUtil.getSToken(),
|
||||||
swan_game_ver = "1038000",
|
swan_game_ver = "1038000",
|
||||||
user_agent = getUserAgent("tieba/${ClientVersion.TIEBA_V12}")
|
user_agent = getUserAgent("tieba/${clientVersion.version}")
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
ClientVersion.TIEBA_V12_POST -> {
|
||||||
|
CommonRequest(
|
||||||
|
BDUSS = AccountUtil.getBduss(),
|
||||||
|
_client_id = ClientUtils.clientId ?: RetrofitTiebaApi.randomClientId,
|
||||||
|
_client_type = 2,
|
||||||
|
_client_version = clientVersion.version,
|
||||||
|
_os_version = "${Build.VERSION.SDK_INT}", // TODO
|
||||||
|
_phone_imei = MobileInfoUtil.getIMEI(context),
|
||||||
|
_timestamp = System.currentTimeMillis(),
|
||||||
|
active_timestamp = ClientUtils.activeTimestamp,
|
||||||
|
android_id = UIDUtil.getAndroidId("000"),
|
||||||
|
applist = "",
|
||||||
|
brand = Build.BRAND,
|
||||||
|
c3_aid = UIDUtil.getAid(),
|
||||||
|
cmode = 1,
|
||||||
|
cuid = CuidUtils.getNewCuid(),
|
||||||
|
cuid_galaxy2 = CuidUtils.getNewCuid(),
|
||||||
|
cuid_gid = "",
|
||||||
|
device_score = "${DeviceUtils.getDeviceScore()}",
|
||||||
|
event_day = SimpleDateFormat("yyyyMdd", Locale.getDefault()).format(
|
||||||
|
Date(
|
||||||
|
System.currentTimeMillis()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
extra = "",
|
||||||
|
first_install_time = App.Config.appFirstInstallTime,
|
||||||
|
framework_ver = "3340042",
|
||||||
|
from = "1020031h",
|
||||||
|
is_teenager = 0,
|
||||||
|
last_update_time = App.Config.appLastUpdateTime,
|
||||||
|
lego_lib_version = "3.0.0",
|
||||||
|
model = Build.MODEL,
|
||||||
|
net_type = 1,
|
||||||
|
oaid = App.Config.encodedOAID,
|
||||||
|
personalized_rec_switch = 1,
|
||||||
|
pversion = "1.0.3",
|
||||||
|
q_type = 0,
|
||||||
|
sample_id = ClientUtils.sampleId,
|
||||||
|
scr_dip = App.ScreenInfo.DENSITY.toDouble(),
|
||||||
|
scr_h = getScreenHeight(),
|
||||||
|
scr_w = getScreenWidth(),
|
||||||
|
sdk_ver = "2.34.0",
|
||||||
|
start_scheme = "",
|
||||||
|
start_type = 1,
|
||||||
|
stoken = AccountUtil.getSToken(),
|
||||||
|
swan_game_ver = "1038000",
|
||||||
|
tbs = tbs,
|
||||||
|
user_agent = getUserAgent("tieba/${clientVersion.version}"),
|
||||||
|
z_id = AccountUtil.getAccountInfo { zid }
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ import com.huanchengfly.tieba.post.api.ForumSortType
|
||||||
import com.huanchengfly.tieba.post.api.SearchThreadFilter
|
import com.huanchengfly.tieba.post.api.SearchThreadFilter
|
||||||
import com.huanchengfly.tieba.post.api.SearchThreadOrder
|
import com.huanchengfly.tieba.post.api.SearchThreadOrder
|
||||||
import com.huanchengfly.tieba.post.api.models.*
|
import com.huanchengfly.tieba.post.api.models.*
|
||||||
|
import com.huanchengfly.tieba.post.api.models.protos.addPost.AddPostResponse
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendResponse
|
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendResponse
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.frsPage.FrsPageResponse
|
import com.huanchengfly.tieba.post.api.models.protos.frsPage.FrsPageResponse
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.hotThreadList.HotThreadListResponse
|
import com.huanchengfly.tieba.post.api.models.protos.hotThreadList.HotThreadListResponse
|
||||||
|
|
@ -1243,10 +1244,12 @@ interface ITiebaApi {
|
||||||
forumId: String,
|
forumId: String,
|
||||||
forumName: String,
|
forumName: String,
|
||||||
threadId: String,
|
threadId: String,
|
||||||
tbs: String,
|
tbs: String? = null,
|
||||||
|
nameShow: String? = null,
|
||||||
postId: String? = null,
|
postId: String? = null,
|
||||||
|
subPostId: String? = null,
|
||||||
replyUserId: String? = null
|
replyUserId: String? = null
|
||||||
): Flow<AddPostBean>
|
): Flow<AddPostResponse>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息(Flow)
|
* 用户信息(Flow)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import com.huanchengfly.tieba.post.api.buildProtobufRequestBody
|
||||||
import com.huanchengfly.tieba.post.api.getScreenHeight
|
import com.huanchengfly.tieba.post.api.getScreenHeight
|
||||||
import com.huanchengfly.tieba.post.api.getScreenWidth
|
import com.huanchengfly.tieba.post.api.getScreenWidth
|
||||||
import com.huanchengfly.tieba.post.api.interfaces.ITiebaApi
|
import com.huanchengfly.tieba.post.api.interfaces.ITiebaApi
|
||||||
import com.huanchengfly.tieba.post.api.models.AddPostBean
|
|
||||||
import com.huanchengfly.tieba.post.api.models.AgreeBean
|
import com.huanchengfly.tieba.post.api.models.AgreeBean
|
||||||
import com.huanchengfly.tieba.post.api.models.CheckReportBean
|
import com.huanchengfly.tieba.post.api.models.CheckReportBean
|
||||||
import com.huanchengfly.tieba.post.api.models.CollectDataBean
|
import com.huanchengfly.tieba.post.api.models.CollectDataBean
|
||||||
|
|
@ -49,6 +48,9 @@ import com.huanchengfly.tieba.post.api.models.UserLikeForumBean
|
||||||
import com.huanchengfly.tieba.post.api.models.UserPostBean
|
import com.huanchengfly.tieba.post.api.models.UserPostBean
|
||||||
import com.huanchengfly.tieba.post.api.models.WebReplyResultBean
|
import com.huanchengfly.tieba.post.api.models.WebReplyResultBean
|
||||||
import com.huanchengfly.tieba.post.api.models.WebUploadPicBean
|
import com.huanchengfly.tieba.post.api.models.WebUploadPicBean
|
||||||
|
import com.huanchengfly.tieba.post.api.models.protos.addPost.AddPostRequest
|
||||||
|
import com.huanchengfly.tieba.post.api.models.protos.addPost.AddPostRequestData
|
||||||
|
import com.huanchengfly.tieba.post.api.models.protos.addPost.AddPostResponse
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendRequest
|
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendRequest
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendRequestData
|
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendRequestData
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendResponse
|
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendResponse
|
||||||
|
|
@ -996,25 +998,55 @@ object MixedTiebaApiImpl : ITiebaApi {
|
||||||
forumId: String,
|
forumId: String,
|
||||||
forumName: String,
|
forumName: String,
|
||||||
threadId: String,
|
threadId: String,
|
||||||
tbs: String,
|
tbs: String?,
|
||||||
|
nameShow: String?,
|
||||||
postId: String?,
|
postId: String?,
|
||||||
|
subPostId: String?,
|
||||||
replyUserId: String?
|
replyUserId: String?
|
||||||
): Flow<AddPostBean> {
|
): Flow<AddPostResponse> {
|
||||||
return RetrofitTiebaApi.OFFICIAL_TIEBA_API.addPostFlow(
|
return RetrofitTiebaApi.OFFICIAL_PROTOBUF_TIEBA_POST_API
|
||||||
content,
|
.addPostFlow(
|
||||||
forumId,
|
buildProtobufRequestBody(
|
||||||
forumName,
|
AddPostRequest(
|
||||||
tbs,
|
AddPostRequestData(
|
||||||
threadId,
|
anonymous = "1",
|
||||||
quoteId = postId,
|
barrage_time = "0".takeIf { postId.isNullOrEmpty() },
|
||||||
replyUserId = replyUserId ?: if (postId == null) "null" else "",
|
can_no_forum = "0",
|
||||||
repostId = postId,
|
common = buildCommonRequest(
|
||||||
is_addition = if (postId == null) null else "0",
|
clientVersion = ClientVersion.TIEBA_V12_POST,
|
||||||
is_barrage = if (postId == null) "0" else null,
|
tbs = tbs ?: AccountUtil.getAccountInfo { this.tbs }
|
||||||
is_giftpost = if (postId == null) null else "0",
|
),
|
||||||
is_twzhibo_thread = if (postId == null) null else "0",
|
content = content,
|
||||||
post_from = if (postId == null) "3" else "11"
|
entrance_type = "0",
|
||||||
)
|
fid = forumId,
|
||||||
|
floor_num = "0".takeIf { postId.isNullOrEmpty() },
|
||||||
|
is_ad = "0",
|
||||||
|
is_addition = "0".takeIf { postId.isNullOrEmpty() },
|
||||||
|
is_barrage = "0".takeIf { postId.isNullOrEmpty() },
|
||||||
|
is_feedback = "0",
|
||||||
|
is_giftpost = "0".takeIf { postId.isNullOrEmpty() },
|
||||||
|
is_pictxt = "0",
|
||||||
|
is_show_bless = 0,
|
||||||
|
is_twzhibo_thread = "0".takeIf { postId.isNullOrEmpty() },
|
||||||
|
name_show = nameShow ?: AccountUtil.getAccountInfo { this.nameShow }
|
||||||
|
.orEmpty(),
|
||||||
|
new_vcode = "1",
|
||||||
|
post_from = if (postId.isNullOrEmpty() && subPostId.isNullOrEmpty()) "13" else if (subPostId.isNullOrEmpty()) "0" else null,
|
||||||
|
quote_id = postId,
|
||||||
|
reply_uid = replyUserId.takeIf { !postId.isNullOrEmpty() },
|
||||||
|
repostid = postId,
|
||||||
|
sub_post_id = subPostId,
|
||||||
|
show_custom_figure = 0,
|
||||||
|
takephoto_num = "0",
|
||||||
|
tid = threadId,
|
||||||
|
v_fid = "".takeIf { postId.isNullOrEmpty() },
|
||||||
|
v_fname = "".takeIf { postId.isNullOrEmpty() },
|
||||||
|
vcode_tag = "12",
|
||||||
|
)
|
||||||
|
),
|
||||||
|
clientVersion = ClientVersion.TIEBA_V12_POST
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun userProfileFlow(uid: Long): Flow<ProfileResponse> {
|
override fun userProfileFlow(uid: Long): Flow<ProfileResponse> {
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ import com.huanchengfly.tieba.post.utils.AccountUtil
|
||||||
import com.huanchengfly.tieba.post.utils.CacheUtil.base64Encode
|
import com.huanchengfly.tieba.post.utils.CacheUtil.base64Encode
|
||||||
import com.huanchengfly.tieba.post.utils.ClientUtils
|
import com.huanchengfly.tieba.post.utils.ClientUtils
|
||||||
import com.huanchengfly.tieba.post.utils.CuidUtils
|
import com.huanchengfly.tieba.post.utils.CuidUtils
|
||||||
|
import com.huanchengfly.tieba.post.utils.DeviceUtils
|
||||||
import com.huanchengfly.tieba.post.utils.MobileInfoUtil
|
import com.huanchengfly.tieba.post.utils.MobileInfoUtil
|
||||||
import com.huanchengfly.tieba.post.utils.UIDUtil
|
import com.huanchengfly.tieba.post.utils.UIDUtil
|
||||||
import okhttp3.ConnectionPool
|
import okhttp3.ConnectionPool
|
||||||
|
|
@ -225,6 +226,65 @@ object RetrofitTiebaApi {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val OFFICIAL_PROTOBUF_TIEBA_POST_API: OfficialProtobufTiebaApi by lazy {
|
||||||
|
createProtobufApi<OfficialProtobufTiebaApi>(
|
||||||
|
"https://tiebac.baidu.com/",
|
||||||
|
CommonHeaderInterceptor(
|
||||||
|
Header.CHARSET to { "UTF-8" },
|
||||||
|
// Header.CLIENT_TYPE to { "2" },
|
||||||
|
Header.CLIENT_USER_TOKEN to { AccountUtil.getUid() },
|
||||||
|
Header.COOKIE to {
|
||||||
|
"BAIDUZID=${
|
||||||
|
AccountUtil.getAccountInfo { zid }.orEmpty()
|
||||||
|
};CUID=${CuidUtils.getNewCuid()};ka=open;TBBRAND=${Build.MODEL};"
|
||||||
|
},
|
||||||
|
Header.CUID to { CuidUtils.getNewCuid() },
|
||||||
|
Header.CUID_GALAXY2 to { CuidUtils.getNewCuid() },
|
||||||
|
Header.CUID_GID to { "" },
|
||||||
|
Header.CUID_GALAXY3 to { UIDUtil.getAid() },
|
||||||
|
Header.USER_AGENT to { getUserAgent("tieba/${ClientVersion.TIEBA_V12_POST.version}") },
|
||||||
|
Header.X_BD_DATA_TYPE to { "protobuf" },
|
||||||
|
),
|
||||||
|
defaultCommonParamInterceptor - Param.OS_VERSION + CommonParamInterceptor(
|
||||||
|
Param.CLIENT_VERSION to { ClientVersion.TIEBA_V12_POST.version },
|
||||||
|
Param.ACTIVE_TIMESTAMP to { ClientUtils.activeTimestamp.toString() },
|
||||||
|
Param.ANDROID_ID to { base64Encode(UIDUtil.getAndroidId("000")) },
|
||||||
|
Param.BAIDU_ID to { ClientUtils.baiduId },
|
||||||
|
Param.BRAND to { Build.BRAND },
|
||||||
|
Param.CUID_GALAXY3 to { UIDUtil.getAid() },
|
||||||
|
Param.CMODE to { "1" },
|
||||||
|
Param.CUID to { CuidUtils.getNewCuid() },
|
||||||
|
Param.CUID_GALAXY2 to { CuidUtils.getNewCuid() },
|
||||||
|
Param.CUID_GID to { "" },
|
||||||
|
Param.DEVICE_SCORE to { "${DeviceUtils.getDeviceScore()}" },
|
||||||
|
Param.EVENT_DAY to {
|
||||||
|
SimpleDateFormat("yyyyMdd", Locale.getDefault()).format(
|
||||||
|
Date(
|
||||||
|
System.currentTimeMillis()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
Param.EXTRA to { "" },
|
||||||
|
Param.FIRST_INSTALL_TIME to { App.Config.appFirstInstallTime.toString() },
|
||||||
|
Param.FRAMEWORK_VER to { "3340042" },
|
||||||
|
Param.FROM to { "tieba" },
|
||||||
|
Param.IS_TEENAGER to { "0" },
|
||||||
|
Param.LAST_UPDATE_TIME to { App.Config.appLastUpdateTime.toString() },
|
||||||
|
Param.MAC to { "02:00:00:00:00:00" },
|
||||||
|
"naws_game_ver" to { "1038000" },
|
||||||
|
Param.OAID to { OAID().toJson() },
|
||||||
|
"personalized_rec_switch" to { "1" },
|
||||||
|
Param.SAMPLE_ID to { ClientUtils.sampleId },
|
||||||
|
Param.SDK_VER to { "2.34.0" },
|
||||||
|
Param.START_SCHEME to { "" },
|
||||||
|
Param.START_TYPE to { "1" },
|
||||||
|
Param.STOKEN to { AccountUtil.getSToken() },
|
||||||
|
Param.Z_ID to { AccountUtil.getAccountInfo { zid }.orEmpty() },
|
||||||
|
),
|
||||||
|
stParamInterceptor,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
val SOFIRE_API: SofireApi by lazy {
|
val SOFIRE_API: SofireApi by lazy {
|
||||||
Retrofit.Builder()
|
Retrofit.Builder()
|
||||||
.baseUrl("https://sofire.baidu.com/")
|
.baseUrl("https://sofire.baidu.com/")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.huanchengfly.tieba.post.api.retrofit.interfaces
|
package com.huanchengfly.tieba.post.api.retrofit.interfaces
|
||||||
|
|
||||||
|
import com.huanchengfly.tieba.post.api.models.protos.addPost.AddPostResponse
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendResponse
|
import com.huanchengfly.tieba.post.api.models.protos.forumRecommend.ForumRecommendResponse
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.frsPage.FrsPageResponse
|
import com.huanchengfly.tieba.post.api.models.protos.frsPage.FrsPageResponse
|
||||||
import com.huanchengfly.tieba.post.api.models.protos.hotThreadList.HotThreadListResponse
|
import com.huanchengfly.tieba.post.api.models.protos.hotThreadList.HotThreadListResponse
|
||||||
|
|
@ -67,4 +68,9 @@ interface OfficialProtobufTiebaApi {
|
||||||
fun pbFloorFlow(
|
fun pbFloorFlow(
|
||||||
@Body body: MyMultipartBody,
|
@Body body: MyMultipartBody,
|
||||||
): Flow<PbFloorResponse>
|
): Flow<PbFloorResponse>
|
||||||
|
|
||||||
|
@POST("/c/c/post/add?cmd=309731&format=protobuf")
|
||||||
|
fun addPostFlow(
|
||||||
|
@Body body: MyMultipartBody,
|
||||||
|
): Flow<AddPostResponse>
|
||||||
}
|
}
|
||||||
|
|
@ -7,23 +7,23 @@ option java_package = "com.huanchengfly.tieba.post.api.models.protos.addPost";
|
||||||
import "CommonRequest.proto";
|
import "CommonRequest.proto";
|
||||||
|
|
||||||
message AddPostRequestData {
|
message AddPostRequestData {
|
||||||
CommonRequest common = 1;
|
CommonRequest common = 1;
|
||||||
string authsid = 2;
|
string authsid = 2;
|
||||||
string sig = 3;
|
string sig = 3;
|
||||||
string tbs = 4;
|
string tbs = 4;
|
||||||
string video_other = 5;
|
string video_other = 5;
|
||||||
string anonymous = 6;
|
string anonymous = 6;
|
||||||
string can_no_forum = 7;
|
string can_no_forum = 7;
|
||||||
string is_feedback = 8;
|
string is_feedback = 8;
|
||||||
string takephoto_num = 9;
|
string takephoto_num = 9;
|
||||||
string entrance_type = 10;
|
string entrance_type = 10;
|
||||||
string voice_md5 = 11;
|
string voice_md5 = 11;
|
||||||
string during_time = 12;
|
string during_time = 12;
|
||||||
string vcode = 13;
|
string vcode = 13;
|
||||||
string vcode_md5 = 14;
|
string vcode_md5 = 14;
|
||||||
string vcode_type = 15;
|
string vcode_type = 15;
|
||||||
string vcode_tag = 16;
|
string vcode_tag = 16;
|
||||||
string topic_id = 17;
|
string topic_id = 17;
|
||||||
string new_vcode = 18;
|
string new_vcode = 18;
|
||||||
string content = 19;
|
string content = 19;
|
||||||
optional string reply_uid = 20;
|
optional string reply_uid = 20;
|
||||||
|
|
@ -37,8 +37,8 @@ message AddPostRequestData {
|
||||||
optional string v_fid = 28;
|
optional string v_fid = 28;
|
||||||
optional string v_fname = 29;
|
optional string v_fname = 29;
|
||||||
string kw = 30;
|
string kw = 30;
|
||||||
string is_barrage = 31;
|
optional string is_barrage = 31;
|
||||||
string barrage_time = 32;
|
optional string barrage_time = 32;
|
||||||
string st_param = 33;
|
string st_param = 33;
|
||||||
string ptype = 34;
|
string ptype = 34;
|
||||||
string ori_ugc_nid = 35;
|
string ori_ugc_nid = 35;
|
||||||
|
|
@ -46,29 +46,29 @@ message AddPostRequestData {
|
||||||
string ori_ugc_tid = 37;
|
string ori_ugc_tid = 37;
|
||||||
string ori_ugc_type = 38;
|
string ori_ugc_type = 38;
|
||||||
string is_location = 39;
|
string is_location = 39;
|
||||||
string lat = 40;
|
string lat = 40;
|
||||||
string lng = 41;
|
string lng = 41;
|
||||||
string name = 42;
|
string name = 42;
|
||||||
string sn = 43;
|
string sn = 43;
|
||||||
string from_fourm_id = 44;
|
string from_fourm_id = 44;
|
||||||
string tid = 45;
|
string tid = 45;
|
||||||
optional string quote_id = 46;
|
optional string quote_id = 46;
|
||||||
string is_twzhibo_thread = 47;
|
optional string is_twzhibo_thread = 47;
|
||||||
string floor_num = 48;
|
optional string floor_num = 48;
|
||||||
optional string repostid = 49;
|
optional string repostid = 49;
|
||||||
string sub_post_id = 50;
|
optional string sub_post_id = 50;
|
||||||
string is_ad = 51;
|
string is_ad = 51;
|
||||||
string is_addition = 52;
|
optional string is_addition = 52;
|
||||||
string is_giftpost = 53;
|
optional string is_giftpost = 53;
|
||||||
string st_type = 54;
|
string st_type = 54;
|
||||||
string post_from = 55;
|
optional string post_from = 55;
|
||||||
string real_lat = 56;
|
string real_lat = 56;
|
||||||
string real_lng = 57;
|
string real_lng = 57;
|
||||||
string name_show = 58;
|
string name_show = 58;
|
||||||
string is_works = 59;
|
string is_works = 59;
|
||||||
string is_pictxt = 60;
|
string is_pictxt = 60;
|
||||||
string is_story = 61;
|
string is_story = 61;
|
||||||
string jid = 62;
|
string jid = 62;
|
||||||
string jfrom = 63;
|
string jfrom = 63;
|
||||||
optional int32 show_custom_figure = 64;
|
optional int32 show_custom_figure = 64;
|
||||||
string from_category_id = 65;
|
string from_category_id = 65;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue