Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:19:18 +08:00
parent b1432b5ff5
commit 148e0872b4
17 changed files with 126 additions and 127 deletions

View File

@@ -158,8 +158,8 @@ class DynamicsHttp {
},
if (privatePub != null || replyOption != null || publishTime != null)
"option": {
if (privatePub != null) 'private_pub': privatePub,
if (publishTime != null) "timer_pub_time": publishTime,
'private_pub': ?privatePub,
"timer_pub_time": ?publishTime,
if (replyOption == ReplyOptionType.close)
"close_comment": 1
else if (replyOption == ReplyOptionType.choose)
@@ -172,7 +172,7 @@ class DynamicsHttp {
: pics != null
? 2
: 1,
if (pics != null) 'pics': pics,
'pics': ?pics,
"attach_card": attachCard,
"upload_id":
"${rid != null ? 0 : mid}_${DateTime.now().millisecondsSinceEpoch ~/ 1000}_${Utils.random.nextInt(9000) + 1000}",
@@ -189,7 +189,7 @@ class DynamicsHttp {
},
if (dynIdStr != null || rid != null)
"web_repost_src": {
if (dynIdStr != null) "dyn_id_str": dynIdStr,
"dyn_id_str": ?dynIdStr,
if (rid != null)
"revs_id": {
"dyn_type": dynType,
@@ -222,9 +222,9 @@ class DynamicsHttp {
Api.dynamicDetail,
queryParameters: {
'timezone_offset': -480,
if (id != null) 'id': id,
if (rid != null) 'rid': rid,
if (type != null) 'type': type,
'id': ?id,
'rid': ?rid,
'type': ?type,
'features': 'itemOpusStyle',
'gaia_source': 'Athena',
'web_location': '333.1330',

View File

@@ -342,7 +342,7 @@ class FavHttp {
queryParameters: {
'vmid': mid,
'type': type,
if (followStatus != null) 'follow_status': followStatus,
'follow_status': ?followStatus,
'pn': pn,
},
);
@@ -475,7 +475,7 @@ class FavHttp {
'privacy': privacy,
'cover': cover.isNotEmpty ? Uri.encodeFull(cover) : cover,
'csrf': Accounts.main.csrf,
if (mediaId != null) 'media_id': mediaId,
'media_id': ?mediaId,
},
options: Options(
contentType: Headers.formUrlEncodedContentType,
@@ -650,9 +650,9 @@ class FavHttp {
? Api.copyToview
: Api.moveToview,
data: {
if (srcMediaId != null) 'src_media_id': srcMediaId,
'src_media_id': ?srcMediaId,
'tar_media_id': tarMediaId,
if (mid != null) 'mid': mid,
'mid': ?mid,
'resources': resources.join(','),
'platform': 'web',
'csrf': Accounts.main.csrf,
@@ -689,7 +689,7 @@ class FavHttp {
queryParameters: {
'up_mid': mid,
'rid': rid,
if (type != null) 'type': type,
'type': ?type,
},
);
if (res.data['code'] == 0) {

View File

@@ -31,7 +31,7 @@ class LiveHttp {
'msg': msg,
'color': 16777215,
'mode': 1,
if (dmType != null) 'dm_type': dmType,
'dm_type': ?dmType,
if (emoticonOptions != null)
'emoticonOptions': emoticonOptions
else ...{
@@ -228,8 +228,8 @@ class LiveHttp {
if (isLogin) 'access_key': Accounts.main.accessKey,
'appkey': Constants.appKey,
'actionKey': 'appkey',
if (areaId != null) 'area_id': areaId,
if (parentAreaId != null) 'parent_area_id': parentAreaId,
'area_id': ?areaId,
'parent_area_id': ?parentAreaId,
'build': '8430300',
'c_locale': 'zh_CN',
'device': 'pad',
@@ -245,7 +245,7 @@ class LiveHttp {
'page_size': '20',
'platform': 'android',
'qn': '0',
if (sortType != null) 'sort_type': sortType,
'sort_type': ?sortType,
'tag_version': '1',
's_locale': 'zh_CN',
'scale': '2',

View File

@@ -102,16 +102,16 @@ class LoginHttp {
'cid': cid,
// if (deviceTouristId != null) 'device_tourist_id': deviceTouristId,
'disable_rcmd': '0',
if (geeChallenge != null) 'gee_challenge': geeChallenge,
if (geeSeccode != null) 'gee_seccode': geeSeccode,
if (geeValidate != null) 'gee_validate': geeValidate,
'gee_challenge': ?geeChallenge,
'gee_seccode': ?geeSeccode,
'gee_validate': ?geeValidate,
'local_id': buvid,
// https://chinggg.github.io/post/appre/
'login_session_id':
md5.convert(utf8.encode(buvid + timestamp.toString())).toString(),
'mobi_app': 'android_hd',
'platform': 'android',
if (recaptchaToken != null) 'recaptcha_token': recaptchaToken,
'recaptcha_token': ?recaptchaToken,
's_locale': 'zh_CN',
'statistics': Constants.statistics,
'tel': tel,
@@ -211,15 +211,15 @@ class LoginHttp {
.base64),
'from_pv': 'main.homepage.avatar-nologin.all.click',
'from_url': Uri.encodeComponent('bilibili://pegasus/promo'),
if (geeChallenge != null) 'gee_challenge': geeChallenge,
if (geeSeccode != null) 'gee_seccode': geeSeccode,
if (geeValidate != null) 'gee_validate': geeValidate,
'gee_challenge': ?geeChallenge,
'gee_seccode': ?geeSeccode,
'gee_validate': ?geeValidate,
'local_id': buvid, //LoginUtils.generateBuvid(),
'mobi_app': 'android_hd',
'password': passwordEncrypted,
'permission': 'ALL',
'platform': 'android',
if (recaptchaToken != null) 'recaptcha_token': recaptchaToken,
'recaptcha_token': ?recaptchaToken,
's_locale': 'zh_CN',
'statistics': Constants.statistics,
'ts': (DateTime.now().millisecondsSinceEpoch ~/ 1000).toString(),
@@ -365,10 +365,10 @@ class LoginHttp {
'disable_rcmd': '0',
'sms_type': smsType ?? 'loginTelCheck',
'tmp_code': tmpCode,
if (geeChallenge != null) 'gee_challenge': geeChallenge,
if (geeSeccode != null) 'gee_seccode': geeSeccode,
if (geeValidate != null) 'gee_validate': geeValidate,
if (recaptchaToken != null) 'recaptcha_token': recaptchaToken,
'gee_challenge': ?geeChallenge,
'gee_seccode': ?geeSeccode,
'gee_validate': ?geeValidate,
'recaptcha_token': ?recaptchaToken,
};
AppSign.appSign(data);
var res = await Request().post(

View File

@@ -40,7 +40,7 @@ class MemberHttp {
{
'mid': mid,
'reason': reason,
if (reasonV2 != null) 'reason_v2': reasonV2,
'reason_v2': ?reasonV2,
'csrf': Accounts.main.csrf,
},
),
@@ -131,8 +131,8 @@ class MemberHttp {
if (seasonId != null) 'season_id': seasonId.toString(),
if (seriesId != null) 'series_id': seriesId.toString(),
'qn': type == ContributeType.video ? '80' : '32',
if (order != null) 'order': order,
if (sort != null) 'sort': sort,
'order': ?order,
'sort': ?sort,
if (includeCursor != null) 'include_cursor': includeCursor.toString(),
'statistics': Constants.statisticsApp,
'vmid': mid.toString(),
@@ -235,7 +235,7 @@ class MemberHttp {
'mobi_app': 'android',
'platform': 'android',
's_locale': 'zh_CN',
if (fromViewAid != null) 'from_view_aid': fromViewAid,
'from_view_aid': ?fromViewAid,
'statistics': Constants.statisticsApp,
'vmid': mid.toString(),
};
@@ -336,7 +336,7 @@ class MemberHttp {
'ps': ps,
'tid': tid,
'pn': pn,
if (keyword != null) 'keyword': keyword,
'keyword': ?keyword,
'order': order,
'platform': 'web',
'web_location': '1550101',
@@ -704,7 +704,7 @@ class MemberHttp {
'up_mid': upMid,
'pn': page,
'ps': 100,
if (privilegeType != null) 'privilege_type': privilegeType,
'privilege_type': ?privilegeType,
'mobi_app': 'web',
'web_location': 333.1196,
if (Accounts.main.isLogin) 'csrf': Accounts.main.csrf,

View File

@@ -26,8 +26,8 @@ class MsgHttp {
var res = await Request().get(
Api.msgFeedReply,
queryParameters: {
if (cursor != null) 'id': cursor,
if (cursorTime != null) 'reply_time': cursorTime,
'id': ?cursor,
'reply_time': ?cursorTime,
'platform': 'web',
'mobi_app': 'web',
'build': 0,
@@ -46,8 +46,8 @@ class MsgHttp {
var res = await Request().get(
Api.msgFeedAt,
queryParameters: {
if (cursor != null) 'id': cursor,
if (cursorTime != null) 'at_time': cursorTime,
'id': ?cursor,
'at_time': ?cursorTime,
'platform': 'web',
'mobi_app': 'web',
'build': 0,
@@ -64,8 +64,8 @@ class MsgHttp {
static Future<LoadingState<MsgLikeData>> msgFeedLikeMe(
{int? cursor, int? cursorTime}) async {
var res = await Request().get(Api.msgFeedLike, queryParameters: {
if (cursor != null) 'id': cursor,
if (cursorTime != null) 'like_time': cursorTime,
'id': ?cursor,
'like_time': ?cursorTime,
'platform': 'web',
'mobi_app': 'web',
'build': 0,
@@ -106,7 +106,7 @@ class MsgHttp {
var res = await Request().get(
Api.msgSysNotify,
queryParameters: {
if (cursor != null) 'cursor': cursor,
'cursor': ?cursor,
'page_size': pageSize,
'mobi_app': 'web',
'build': 0,
@@ -176,8 +176,8 @@ class MsgHttp {
final file = await MultipartFile.fromFile(path);
Map<String, dynamic> data = {
'file_up': file,
if (category != null) 'category': category,
if (biz != null) 'biz': biz,
'category': ?category,
'biz': ?biz,
'csrf': Accounts.main.csrf,
};
var res = await Request().post(
@@ -233,8 +233,8 @@ class MsgHttp {
},
data: {
"dyn_id_str": dynIdStr,
if (dynType != null) "dyn_type": dynType,
if (ridStr != null) "rid_str": ridStr,
"dyn_type": ?dynType,
"rid_str": ?ridStr,
},
);
if (res.data['code'] == 0) {

View File

@@ -23,9 +23,9 @@ class PgcHttp {
Api.pgcIndexResult,
queryParameters: {
...params,
if (seasonType != null) 'season_type': seasonType,
if (type != null) 'type': type,
if (indexType != null) 'index_type': indexType,
'season_type': ?seasonType,
'type': ?type,
'index_type': ?indexType,
'page': page,
'pagesize': 21,
},
@@ -45,9 +45,9 @@ class PgcHttp {
var res = await Request().get(
Api.pgcIndexCondition,
queryParameters: {
if (seasonType != null) 'season_type': seasonType,
if (type != null) 'type': type,
if (indexType != null) 'index_type': indexType,
'season_type': ?seasonType,
'type': ?type,
'index_type': ?indexType,
},
);
if (res.data['code'] == 0) {
@@ -65,7 +65,7 @@ class PgcHttp {
Api.pgcIndex,
queryParameters: {
'page': page,
if (indexType != null) 'index_type': indexType,
'index_type': ?indexType,
},
);
if (res.data['code'] == 0) {
@@ -107,7 +107,7 @@ class PgcHttp {
'media_id': mediaId,
'ps': 20,
'sort': sort,
if (next != null) 'cursor': next,
'cursor': ?next,
'web_location': 666.19,
},
);

View File

@@ -59,13 +59,13 @@ class SearchHttp {
'keyword': keyword,
'page': page,
if (order?.isNotEmpty == true) 'order': order,
if (duration != null) 'duration': duration,
if (tids != null) 'tids': tids,
if (orderSort != null) 'order_sort': orderSort,
if (userType != null) 'user_type': userType,
if (categoryId != null) 'category_id': categoryId,
if (pubBegin != null) 'pubtime_begin_s': pubBegin,
if (pubEnd != null) 'pubtime_end_s': pubEnd,
'duration': ?duration,
'tids': ?tids,
'order_sort': ?orderSort,
'user_type': ?userType,
'category_id': ?categoryId,
'pubtime_begin_s': ?pubBegin,
'pubtime_end_s': ?pubEnd,
};
var res = await Request().get(
Api.searchByType,
@@ -126,13 +126,13 @@ class SearchHttp {
'keyword': keyword,
'page': page,
if (order?.isNotEmpty == true) 'order': order,
if (duration != null) 'duration': duration,
if (tids != null) 'tids': tids,
if (orderSort != null) 'order_sort': orderSort,
if (userType != null) 'user_type': userType,
if (categoryId != null) 'category_id': categoryId,
if (pubBegin != null) 'pubtime_begin_s': pubBegin,
if (pubEnd != null) 'pubtime_end_s': pubEnd,
'duration': ?duration,
'tids': ?tids,
'order_sort': ?orderSort,
'user_type': ?userType,
'category_id': ?categoryId,
'pubtime_begin_s': ?pubBegin,
'pubtime_end_s': ?pubEnd,
};
var res = await Request().get(
Api.searchAll,
@@ -157,8 +157,8 @@ class SearchHttp {
var res = await Request().get(
Api.ab2c,
queryParameters: {
if (aid != null) 'aid': aid,
if (bvid != null) 'bvid': bvid,
'aid': ?aid,
'bvid': ?bvid,
},
);
if (res.data['code'] == 0) {
@@ -180,8 +180,8 @@ class SearchHttp {
var res = await Request().get(
Api.pgcInfo,
queryParameters: {
if (seasonId != null) 'season_id': seasonId,
if (epId != null) 'ep_id': epId,
'season_id': ?seasonId,
'ep_id': ?epId,
},
);
if (res.data['code'] == 0) {
@@ -195,7 +195,7 @@ class SearchHttp {
var res = await Request().get(
Api.episodeInfo,
queryParameters: {
if (epId != null) 'ep_id': epId,
'ep_id': ?epId,
},
);
if (res.data['code'] == 0) {
@@ -212,8 +212,8 @@ class SearchHttp {
var res = await Request().get(
Api.pgcInfo,
queryParameters: {
if (seasonId != null) 'season_id': seasonId,
if (epId != null) 'ep_id': epId,
'season_id': ?seasonId,
'ep_id': ?epId,
},
);
if (res.data['code'] == 0) {

View File

@@ -135,8 +135,8 @@ class UserHttp {
var res = await Request().post(
Api.toViewLater,
queryParameters: {
if (aid != null) 'aid': aid,
if (bvid != null) 'bvid': bvid,
'aid': ?aid,
'bvid': ?bvid,
'csrf': Accounts.main.csrf,
},
);
@@ -189,7 +189,7 @@ class UserHttp {
var res = await Request().post(
Api.toViewClear,
queryParameters: {
if (cleanType != null) 'clean_type': cleanType,
'clean_type': ?cleanType,
'csrf': Accounts.main.csrf,
},
);
@@ -305,8 +305,8 @@ class UserHttp {
'mobi_app': 'web',
'type': type,
'biz_id': bizId,
if (oid != null) 'oid': oid,
if (otype != null) 'otype': otype, // ugc:2 // pgc: 24
'oid': ?oid,
'otype': ?otype, // ugc:2 // pgc: 24
'ps': ps,
'direction': direction,
'desc': desc,

View File

@@ -188,10 +188,10 @@ class VideoHttp {
bool? forcePgcApi,
}) async {
final params = await WbiSign.makSign({
if (avid != null) 'avid': avid,
if (bvid != null) 'bvid': bvid,
if (epid != null) 'ep_id': epid,
if (seasonId != null) 'season_id': seasonId,
'avid': ?avid,
'bvid': ?bvid,
'ep_id': ?epid,
'season_id': ?seasonId,
'cid': cid,
'qn': qn ?? 80,
// 获取所有格式的视频
@@ -444,8 +444,8 @@ class VideoHttp {
var res = await Request().get(Api.feedDislike, queryParameters: {
'goto': goto,
'id': id,
if (reasonId != null) 'reason_id': reasonId,
if (feedbackId != null) 'feedback_id': feedbackId,
'reason_id': ?reasonId,
'feedback_id': ?feedbackId,
'build': '1',
'mobi_app': 'android',
});
@@ -468,8 +468,8 @@ class VideoHttp {
var res = await Request().get(Api.feedDislikeCancel, queryParameters: {
'goto': goto,
'id': id,
if (reasonId != null) 'reason_id': reasonId,
if (feedbackId != null) 'feedback_id': feedbackId,
'reason_id': ?reasonId,
'feedback_id': ?feedbackId,
'build': '1',
'mobi_app': 'android',
});
@@ -604,8 +604,8 @@ class VideoHttp {
type,
}) async {
await Request().post(Api.historyReport, queryParameters: {
if (aid != null) 'aid': aid,
if (type != null) 'type': type,
'aid': ?aid,
'type': ?type,
'csrf': Accounts.main.csrf,
});
}
@@ -622,10 +622,10 @@ class VideoHttp {
await Request().post(Api.heartBeat, queryParameters: {
'bvid': bvid,
'cid': cid,
if (epid != null) 'epid': epid,
if (seasonId != null) 'sid': seasonId,
'epid': ?epid,
'sid': ?seasonId,
if (epid != null) 'type': 4,
if (subType != null) 'sub_type': subType,
'sub_type': ?subType,
'played_time': progress,
'csrf': Accounts.main.csrf,
});
@@ -747,8 +747,8 @@ class VideoHttp {
var res = await Request().get(
Api.playInfo,
queryParameters: {
if (aid != null) 'aid': aid,
if (bvid != null) 'bvid': bvid,
'aid': ?aid,
'bvid': ?bvid,
'cid': cid,
},
);
@@ -873,7 +873,7 @@ class VideoHttp {
'oid_type': 0,
'pn': page,
'ps': 10,
if (uperMid != null) 'uper_mid': uperMid,
'uper_mid': ?uperMid,
},
);
if (res.data['code'] == 0) {