mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-29 05:40:17 +08:00
opt: linter
This commit is contained in:
@@ -60,7 +60,7 @@ abstract final class DanmakuHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> danmakuLike({
|
||||
static Future<LoadingState<void>> danmakuLike({
|
||||
required bool isLike,
|
||||
required int cid,
|
||||
required int id,
|
||||
@@ -89,7 +89,7 @@ abstract final class DanmakuHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> danmakuReport({
|
||||
static Future<LoadingState<void>> danmakuReport({
|
||||
required int reason,
|
||||
required int cid,
|
||||
required int id,
|
||||
|
||||
@@ -15,7 +15,7 @@ abstract final class DanmakuFilterHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> danmakuFilterDel({required int ids}) async {
|
||||
static Future<LoadingState<void>> danmakuFilterDel({required int ids}) async {
|
||||
final res = await Request().post(
|
||||
Api.danmakuFilterDel,
|
||||
data: {
|
||||
|
||||
@@ -127,7 +127,7 @@ abstract final class DynamicsHttp {
|
||||
// }
|
||||
|
||||
// 动态点赞
|
||||
static Future<LoadingState<Null>> thumbDynamic({
|
||||
static Future<LoadingState<void>> thumbDynamic({
|
||||
required String? dynamicId,
|
||||
required int? up,
|
||||
}) async {
|
||||
@@ -275,7 +275,7 @@ abstract final class DynamicsHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> setTop({
|
||||
static Future<LoadingState<void>> setTop({
|
||||
required Object dynamicId,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
@@ -294,7 +294,7 @@ abstract final class DynamicsHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> rmTop({
|
||||
static Future<LoadingState<void>> rmTop({
|
||||
required Object dynamicId,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
@@ -672,7 +672,7 @@ abstract final class DynamicsHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> dynPrivatePubSetting({
|
||||
static Future<LoadingState<void>> dynPrivatePubSetting({
|
||||
required Object dynId,
|
||||
int? dynType,
|
||||
required String action,
|
||||
@@ -699,7 +699,7 @@ abstract final class DynamicsHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> editDyn({
|
||||
static Future<LoadingState<void>> editDyn({
|
||||
required Object dynId,
|
||||
Object? repostDynId,
|
||||
dynamic rawText,
|
||||
|
||||
@@ -18,7 +18,7 @@ import 'package:PiliPlus/utils/app_sign.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
abstract final class FavHttp {
|
||||
static Future<LoadingState<Null>> favFavFolder(Object mediaId) async {
|
||||
static Future<LoadingState<void>> favFavFolder(Object mediaId) async {
|
||||
final res = await Request().post(
|
||||
Api.favFavFolder,
|
||||
data: {
|
||||
@@ -34,7 +34,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> unfavFavFolder(Object mediaId) async {
|
||||
static Future<LoadingState<void>> unfavFavFolder(Object mediaId) async {
|
||||
final res = await Request().post(
|
||||
Api.unfavFavFolder,
|
||||
data: {
|
||||
@@ -79,7 +79,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
|
||||
// 取消订阅
|
||||
static Future<LoadingState<Null>> cancelSub({
|
||||
static Future<LoadingState<void>> cancelSub({
|
||||
required int id,
|
||||
required int type,
|
||||
}) async {
|
||||
@@ -148,7 +148,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> addFavPugv(Object seasonId) async {
|
||||
static Future<LoadingState<void>> addFavPugv(Object seasonId) async {
|
||||
final res = await Request().post(
|
||||
Api.addFavPugv,
|
||||
data: {
|
||||
@@ -164,7 +164,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> delFavPugv(Object seasonId) async {
|
||||
static Future<LoadingState<void>> delFavPugv(Object seasonId) async {
|
||||
final res = await Request().post(
|
||||
Api.delFavPugv,
|
||||
data: {
|
||||
@@ -198,7 +198,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> addFavTopic(Object topicId) async {
|
||||
static Future<LoadingState<void>> addFavTopic(Object topicId) async {
|
||||
final res = await Request().post(
|
||||
Api.addFavTopic,
|
||||
data: {
|
||||
@@ -214,7 +214,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> delFavTopic(Object topicId) async {
|
||||
static Future<LoadingState<void>> delFavTopic(Object topicId) async {
|
||||
final res = await Request().post(
|
||||
Api.delFavTopic,
|
||||
data: {
|
||||
@@ -230,7 +230,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> likeTopic(
|
||||
static Future<LoadingState<void>> likeTopic(
|
||||
Object topicId,
|
||||
bool isLike,
|
||||
) async {
|
||||
@@ -269,7 +269,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> addFavArticle({
|
||||
static Future<LoadingState<void>> addFavArticle({
|
||||
required Object id,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
@@ -289,7 +289,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> delFavArticle({
|
||||
static Future<LoadingState<void>> delFavArticle({
|
||||
required Object id,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
@@ -351,7 +351,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> delNote({
|
||||
static Future<LoadingState<void>> delNote({
|
||||
required bool isPublish,
|
||||
required String noteIds,
|
||||
}) async {
|
||||
@@ -415,7 +415,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> sortFavFolder({
|
||||
static Future<LoadingState<void>> sortFavFolder({
|
||||
required String sort,
|
||||
}) async {
|
||||
Map<String, dynamic> data = {
|
||||
@@ -437,7 +437,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> sortFav({
|
||||
static Future<LoadingState<void>> sortFav({
|
||||
required Object mediaId,
|
||||
required String sort,
|
||||
}) async {
|
||||
@@ -461,7 +461,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> cleanFav({
|
||||
static Future<LoadingState<void>> cleanFav({
|
||||
required Object mediaId,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
@@ -482,7 +482,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> deleteFolder({
|
||||
static Future<LoadingState<void>> deleteFolder({
|
||||
required String mediaIds,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
@@ -548,7 +548,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> seasonFav({
|
||||
static Future<LoadingState<void>> seasonFav({
|
||||
required bool isFav,
|
||||
required dynamic seasonId,
|
||||
}) async {
|
||||
@@ -605,7 +605,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> communityAction({
|
||||
static Future<LoadingState<void>> communityAction({
|
||||
required Object opusId,
|
||||
required Object action,
|
||||
}) async {
|
||||
@@ -630,7 +630,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
|
||||
// (取消)收藏
|
||||
static Future<LoadingState<Null>> favVideo({
|
||||
static Future<LoadingState<void>> favVideo({
|
||||
required String resources,
|
||||
String? addIds,
|
||||
String? delIds,
|
||||
@@ -653,7 +653,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
|
||||
// (取消)收藏
|
||||
static Future<LoadingState<Null>> unfavAll({
|
||||
static Future<LoadingState<void>> unfavAll({
|
||||
required Object rid,
|
||||
required Object type,
|
||||
}) async {
|
||||
@@ -673,7 +673,7 @@ abstract final class FavHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> copyOrMoveFav({
|
||||
static Future<LoadingState<void>> copyOrMoveFav({
|
||||
required bool isCopy,
|
||||
required bool isFav,
|
||||
required dynamic srcMediaId,
|
||||
|
||||
@@ -33,7 +33,7 @@ import 'package:dio/dio.dart';
|
||||
abstract final class LiveHttp {
|
||||
static Account get recommend => Accounts.get(AccountType.recommend);
|
||||
|
||||
static Future<LoadingState<Null>> sendLiveMsg({
|
||||
static Future<LoadingState<void>> sendLiveMsg({
|
||||
required Object roomId,
|
||||
required Object msg,
|
||||
Object? dmType,
|
||||
@@ -385,7 +385,7 @@ abstract final class LiveHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> setLiveFavTag({
|
||||
static Future<LoadingState<void>> setLiveFavTag({
|
||||
required String ids,
|
||||
}) async {
|
||||
final data = {
|
||||
@@ -505,7 +505,7 @@ abstract final class LiveHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> liveSetSilent({
|
||||
static Future<LoadingState<void>> liveSetSilent({
|
||||
required String type,
|
||||
required int level,
|
||||
}) async {
|
||||
@@ -527,7 +527,7 @@ abstract final class LiveHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> addShieldKeyword({
|
||||
static Future<LoadingState<void>> addShieldKeyword({
|
||||
required String keyword,
|
||||
}) async {
|
||||
final csrf = Accounts.main.csrf;
|
||||
@@ -547,7 +547,7 @@ abstract final class LiveHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> delShieldKeyword({
|
||||
static Future<LoadingState<void>> delShieldKeyword({
|
||||
required String keyword,
|
||||
}) async {
|
||||
final csrf = Accounts.main.csrf;
|
||||
@@ -591,7 +591,7 @@ abstract final class LiveHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> liveLikeReport({
|
||||
static Future<LoadingState<void>> liveLikeReport({
|
||||
required int clickTime,
|
||||
required Object roomId,
|
||||
required Object uid,
|
||||
@@ -637,7 +637,7 @@ abstract final class LiveHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> liveDmReport({
|
||||
static Future<LoadingState<void>> liveDmReport({
|
||||
required int roomId,
|
||||
required Object mid,
|
||||
required String msg,
|
||||
@@ -707,7 +707,7 @@ abstract final class LiveHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> superChatReport({
|
||||
static Future<LoadingState<void>> superChatReport({
|
||||
required int id,
|
||||
required Object roomId,
|
||||
required Object uid,
|
||||
|
||||
@@ -482,7 +482,7 @@ abstract final class MemberHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> specialAction({
|
||||
static Future<LoadingState<void>> specialAction({
|
||||
int? fid,
|
||||
bool isAdd = true,
|
||||
}) async {
|
||||
@@ -502,7 +502,7 @@ abstract final class MemberHttp {
|
||||
}
|
||||
|
||||
// 设置分组
|
||||
static Future<LoadingState<Null>> addUsers(String fids, String tagids) async {
|
||||
static Future<LoadingState<void>> addUsers(String fids, String tagids) async {
|
||||
final res = await Request().post(
|
||||
Api.addUsers,
|
||||
queryParameters: {
|
||||
@@ -555,7 +555,7 @@ abstract final class MemberHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> createFollowTag(Object tagName) async {
|
||||
static Future<LoadingState<void>> createFollowTag(Object tagName) async {
|
||||
final res = await Request().post(
|
||||
Api.createFollowTag,
|
||||
queryParameters: {
|
||||
@@ -575,7 +575,7 @@ abstract final class MemberHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> updateFollowTag(
|
||||
static Future<LoadingState<void>> updateFollowTag(
|
||||
Object tagid,
|
||||
Object name,
|
||||
) async {
|
||||
@@ -599,7 +599,7 @@ abstract final class MemberHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> delFollowTag(Object tagid) async {
|
||||
static Future<LoadingState<void>> delFollowTag(Object tagid) async {
|
||||
final res = await Request().post(
|
||||
Api.delFollowTag,
|
||||
queryParameters: {
|
||||
|
||||
@@ -18,7 +18,6 @@ import 'package:PiliPlus/models_new/upload_bfs/data.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:PiliPlus/utils/wbi_sign.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:uuid/v4.dart';
|
||||
|
||||
abstract final class MsgHttp {
|
||||
static Future<LoadingState<MsgReplyData>> msgFeedReplyMe({
|
||||
@@ -136,7 +135,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> msgSysUpdateCursor(int cursor) async {
|
||||
static Future<LoadingState<void>> msgSysUpdateCursor(int cursor) async {
|
||||
String csrf = Accounts.main.csrf;
|
||||
final res = await Request().get(
|
||||
Api.msgSysUpdateCursor,
|
||||
@@ -196,7 +195,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> createTextDynamic(
|
||||
static Future<LoadingState<void>> createTextDynamic(
|
||||
Object content,
|
||||
) async {
|
||||
String csrf = Accounts.main.csrf;
|
||||
@@ -220,7 +219,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> removeDynamic({
|
||||
static Future<LoadingState<void>> removeDynamic({
|
||||
required Object dynIdStr,
|
||||
Object? dynType,
|
||||
Object? ridStr,
|
||||
@@ -244,7 +243,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> removeMsg(
|
||||
static Future<LoadingState<void>> removeMsg(
|
||||
Object talkerId,
|
||||
) async {
|
||||
String csrf = Accounts.main.csrf;
|
||||
@@ -268,7 +267,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> delMsgfeed(
|
||||
static Future<LoadingState<void>> delMsgfeed(
|
||||
int tp,
|
||||
dynamic id,
|
||||
) async {
|
||||
@@ -292,7 +291,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> delSysMsg(
|
||||
static Future<LoadingState<void>> delSysMsg(
|
||||
Object id,
|
||||
) async {
|
||||
String csrf = Accounts.main.csrf;
|
||||
@@ -317,7 +316,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> setTop({
|
||||
static Future<LoadingState<void>> setTop({
|
||||
required Object talkerId,
|
||||
required int opType,
|
||||
}) async {
|
||||
@@ -344,7 +343,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
|
||||
// 消息标记已读
|
||||
static Future<LoadingState<Null>> ackSessionMsg({
|
||||
static Future<LoadingState<void>> ackSessionMsg({
|
||||
required int talkerId,
|
||||
required int ackSeqno,
|
||||
}) async {
|
||||
@@ -370,60 +369,60 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
// 发送私信
|
||||
static Future<LoadingState<Null>> sendMsg({
|
||||
int? senderUid,
|
||||
int? receiverId,
|
||||
int? msgType,
|
||||
dynamic content,
|
||||
}) async {
|
||||
String csrf = Accounts.main.csrf;
|
||||
final devId = getDevId();
|
||||
final data = {
|
||||
'msg': {
|
||||
'sender_uid': senderUid,
|
||||
'receiver_id': receiverId,
|
||||
'receiver_type': 1,
|
||||
'msg_type': msgType ?? 1,
|
||||
'msg_status': 0,
|
||||
'dev_id': devId,
|
||||
'timestamp': DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
||||
'new_face_version': 1,
|
||||
'content': content,
|
||||
},
|
||||
'from_firework': 0,
|
||||
'build': 0,
|
||||
'mobi_app': 'web',
|
||||
'csrf_token': csrf,
|
||||
'csrf': csrf,
|
||||
};
|
||||
Map<String, dynamic> params = await WbiSign.makSign(data);
|
||||
final res = await Request().post(
|
||||
Api.sendMsg,
|
||||
queryParameters: <String, dynamic>{
|
||||
'w_sender_uid': senderUid,
|
||||
'w_receiver_id': receiverId,
|
||||
'w_dev_id': devId,
|
||||
'w_rid': params['w_rid'],
|
||||
'wts': params['wts'],
|
||||
},
|
||||
data: data,
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
),
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return const Success(null);
|
||||
} else {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
// // 发送私信
|
||||
// static Future<LoadingState<void>> sendMsg({
|
||||
// required int senderUid,
|
||||
// required int receiverId,
|
||||
// int? msgType,
|
||||
// dynamic content,
|
||||
// }) async {
|
||||
// String csrf = Accounts.main.csrf;
|
||||
// final devId = getDevId();
|
||||
// final data = {
|
||||
// 'msg': {
|
||||
// 'sender_uid': senderUid,
|
||||
// 'receiver_id': receiverId,
|
||||
// 'receiver_type': 1,
|
||||
// 'msg_type': msgType ?? 1,
|
||||
// 'msg_status': 0,
|
||||
// 'dev_id': devId,
|
||||
// 'timestamp': DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
||||
// 'new_face_version': 1,
|
||||
// 'content': content,
|
||||
// },
|
||||
// 'from_firework': 0,
|
||||
// 'build': 0,
|
||||
// 'mobi_app': 'web',
|
||||
// 'csrf_token': csrf,
|
||||
// 'csrf': csrf,
|
||||
// };
|
||||
// Map<String, dynamic> params = await WbiSign.makSign(data);
|
||||
// final res = await Request().post(
|
||||
// Api.sendMsg,
|
||||
// queryParameters: <String, dynamic>{
|
||||
// 'w_sender_uid': senderUid,
|
||||
// 'w_receiver_id': receiverId,
|
||||
// 'w_dev_id': devId,
|
||||
// 'w_rid': params['w_rid'],
|
||||
// 'wts': params['wts'],
|
||||
// },
|
||||
// data: data,
|
||||
// options: Options(
|
||||
// contentType: Headers.formUrlEncodedContentType,
|
||||
// ),
|
||||
// );
|
||||
// if (res.data['code'] == 0) {
|
||||
// return const Success(null);
|
||||
// } else {
|
||||
// return Error(res.data['message']);
|
||||
// }
|
||||
// }
|
||||
|
||||
static String getDevId() {
|
||||
return const UuidV4().generate();
|
||||
}
|
||||
// static String getDevId() {
|
||||
// return const UuidV4().generate();
|
||||
// }
|
||||
|
||||
static Future<LoadingState<Null>> msgSetNotice({
|
||||
static Future<LoadingState<void>> msgSetNotice({
|
||||
required Object id,
|
||||
required int noticeState,
|
||||
}) async {
|
||||
@@ -451,7 +450,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> setMsgDnd({
|
||||
static Future<LoadingState<void>> setMsgDnd({
|
||||
required Object uid,
|
||||
required int setting,
|
||||
required dndUid,
|
||||
@@ -477,7 +476,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> setPushSs({
|
||||
static Future<LoadingState<void>> setPushSs({
|
||||
required int setting,
|
||||
required talkerUid,
|
||||
}) async {
|
||||
@@ -606,7 +605,7 @@ abstract final class MsgHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> imMsgReport({
|
||||
static Future<LoadingState<void>> imMsgReport({
|
||||
required int accusedUid,
|
||||
required int reasonType,
|
||||
required String reasonDesc,
|
||||
|
||||
@@ -23,7 +23,7 @@ abstract final class MusicHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> wishUpdate(
|
||||
static Future<LoadingState<void>> wishUpdate(
|
||||
String musicId,
|
||||
bool hasLike,
|
||||
) async {
|
||||
|
||||
@@ -133,7 +133,7 @@ abstract final class PgcHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> pgcReviewLike({
|
||||
static Future<LoadingState<void>> pgcReviewLike({
|
||||
required Object mediaId,
|
||||
required Object reviewId,
|
||||
}) async {
|
||||
@@ -154,7 +154,7 @@ abstract final class PgcHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> pgcReviewDislike({
|
||||
static Future<LoadingState<void>> pgcReviewDislike({
|
||||
required Object mediaId,
|
||||
required Object reviewId,
|
||||
}) async {
|
||||
@@ -175,7 +175,7 @@ abstract final class PgcHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> pgcReviewPost({
|
||||
static Future<LoadingState<void>> pgcReviewPost({
|
||||
required Object mediaId,
|
||||
required int score,
|
||||
required String content,
|
||||
@@ -199,7 +199,7 @@ abstract final class PgcHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> pgcReviewMod({
|
||||
static Future<LoadingState<void>> pgcReviewMod({
|
||||
required Object mediaId,
|
||||
required int score,
|
||||
required String content,
|
||||
@@ -223,7 +223,7 @@ abstract final class PgcHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> pgcReviewDel({
|
||||
static Future<LoadingState<void>> pgcReviewDel({
|
||||
required Object mediaId,
|
||||
required Object reviewId,
|
||||
}) async {
|
||||
|
||||
@@ -88,7 +88,7 @@ abstract final class ReplyHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> hateReply({
|
||||
static Future<LoadingState<void>> hateReply({
|
||||
required int type,
|
||||
required int action,
|
||||
required int oid,
|
||||
@@ -113,7 +113,7 @@ abstract final class ReplyHttp {
|
||||
}
|
||||
|
||||
// 评论点赞
|
||||
static Future<LoadingState<Null>> likeReply({
|
||||
static Future<LoadingState<void>> likeReply({
|
||||
required int type,
|
||||
required int oid,
|
||||
required int rpid,
|
||||
@@ -154,7 +154,7 @@ abstract final class ReplyHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> replyTop({
|
||||
static Future<LoadingState<void>> replyTop({
|
||||
required Object oid,
|
||||
required Object type,
|
||||
required Object rpid,
|
||||
@@ -178,7 +178,7 @@ abstract final class ReplyHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> report({
|
||||
static Future<LoadingState<void>> report({
|
||||
required Object rpid,
|
||||
required Object oid,
|
||||
required int reasonType,
|
||||
@@ -232,7 +232,7 @@ abstract final class ReplyHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> replySubjectModify({
|
||||
static Future<LoadingState<void>> replySubjectModify({
|
||||
required int oid,
|
||||
required int type,
|
||||
required int action,
|
||||
|
||||
@@ -74,7 +74,7 @@ abstract final class SponsorBlock {
|
||||
return getErrMsg(res);
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> voteOnSponsorTime({
|
||||
static Future<LoadingState<void>> voteOnSponsorTime({
|
||||
required String uuid,
|
||||
int? type,
|
||||
SegmentType? category,
|
||||
@@ -93,7 +93,7 @@ abstract final class SponsorBlock {
|
||||
return res.statusCode == 200 ? const Success(null) : getErrMsg(res);
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> viewedVideoSponsorTime(String uuid) async {
|
||||
static Future<LoadingState<void>> viewedVideoSponsorTime(String uuid) async {
|
||||
final res = await Request().post(
|
||||
_api(SponsorBlockApi.viewedVideoSponsorTime),
|
||||
data: {'UUID': uuid},
|
||||
@@ -102,7 +102,7 @@ abstract final class SponsorBlock {
|
||||
return res.statusCode == 200 ? const Success(null) : getErrMsg(res);
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> uptimeStatus() async {
|
||||
static Future<LoadingState<void>> uptimeStatus() async {
|
||||
final res = await Request().get(
|
||||
_api(SponsorBlockApi.uptimeStatus),
|
||||
options: options,
|
||||
|
||||
@@ -105,7 +105,7 @@ abstract final class UserHttp {
|
||||
}
|
||||
|
||||
// 暂停观看历史
|
||||
static Future<LoadingState<Null>> pauseHistory(
|
||||
static Future<LoadingState<void>> pauseHistory(
|
||||
bool switchStatus, {
|
||||
Account? account,
|
||||
}) async {
|
||||
@@ -144,7 +144,7 @@ abstract final class UserHttp {
|
||||
}
|
||||
|
||||
// 清空历史记录
|
||||
static Future<LoadingState<Null>> clearHistory({Account? account}) async {
|
||||
static Future<LoadingState<void>> clearHistory({Account? account}) async {
|
||||
account ??= Accounts.history;
|
||||
final res = await Request().post(
|
||||
Api.clearHistory,
|
||||
@@ -165,7 +165,7 @@ abstract final class UserHttp {
|
||||
}
|
||||
|
||||
// 稍后再看
|
||||
static Future<LoadingState<Null>> toViewLater({
|
||||
static Future<LoadingState<void>> toViewLater({
|
||||
String? bvid,
|
||||
Object? aid,
|
||||
}) async {
|
||||
@@ -189,7 +189,7 @@ abstract final class UserHttp {
|
||||
}
|
||||
|
||||
// 移除已观看
|
||||
static Future<LoadingState<Null>> toViewDel({required String aids}) async {
|
||||
static Future<LoadingState<void>> toViewDel({required String aids}) async {
|
||||
final Map<String, dynamic> params = {
|
||||
'csrf': Accounts.main.csrf,
|
||||
'resources': aids,
|
||||
@@ -228,7 +228,7 @@ abstract final class UserHttp {
|
||||
// }
|
||||
|
||||
// 清空稍后再看 // clean_type: null->all, 1->invalid, 2->viewed
|
||||
static Future<LoadingState<Null>> toViewClear([int? cleanType]) async {
|
||||
static Future<LoadingState<void>> toViewClear([int? cleanType]) async {
|
||||
final res = await Request().post(
|
||||
Api.toViewClear,
|
||||
data: {
|
||||
@@ -245,7 +245,7 @@ abstract final class UserHttp {
|
||||
}
|
||||
|
||||
// 删除历史记录
|
||||
static Future<LoadingState<Null>> delHistory(
|
||||
static Future<LoadingState<void>> delHistory(
|
||||
String kid, {
|
||||
Account? account,
|
||||
}) async {
|
||||
@@ -390,7 +390,7 @@ abstract final class UserHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> dynamicReport({
|
||||
static Future<LoadingState<void>> dynamicReport({
|
||||
required Object mid,
|
||||
required Object dynId,
|
||||
required int reasonType,
|
||||
@@ -430,7 +430,7 @@ abstract final class UserHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> spaceSettingMod(Map data) async {
|
||||
static Future<LoadingState<void>> spaceSettingMod(Map data) async {
|
||||
final res = await Request().post(
|
||||
Api.spaceSettingMod,
|
||||
queryParameters: {
|
||||
@@ -446,7 +446,7 @@ abstract final class UserHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> vipExpAdd() async {
|
||||
static Future<LoadingState<void>> vipExpAdd() async {
|
||||
final res = await Request().post(
|
||||
Api.vipExpAdd,
|
||||
queryParameters: {
|
||||
|
||||
@@ -345,7 +345,7 @@ abstract final class VideoHttp {
|
||||
}
|
||||
|
||||
// 投币
|
||||
static Future<LoadingState<Null>> coinVideo({
|
||||
static Future<LoadingState<void>> coinVideo({
|
||||
required String bvid,
|
||||
required int multiply,
|
||||
int selectLike = 0,
|
||||
@@ -443,7 +443,7 @@ abstract final class VideoHttp {
|
||||
}
|
||||
|
||||
// (取消)点踩
|
||||
static Future<LoadingState<Null>> dislikeVideo({
|
||||
static Future<LoadingState<void>> dislikeVideo({
|
||||
required String bvid,
|
||||
required bool type,
|
||||
}) async {
|
||||
@@ -466,7 +466,7 @@ abstract final class VideoHttp {
|
||||
}
|
||||
|
||||
// 推送不感兴趣反馈
|
||||
static Future<LoadingState<Null>> feedDislike({
|
||||
static Future<LoadingState<void>> feedDislike({
|
||||
required String goto,
|
||||
required int id,
|
||||
int? reasonId,
|
||||
@@ -495,7 +495,7 @@ abstract final class VideoHttp {
|
||||
}
|
||||
|
||||
// 推送不感兴趣取消
|
||||
static Future<LoadingState<Null>> feedDislikeCancel({
|
||||
static Future<LoadingState<void>> feedDislikeCancel({
|
||||
required String goto,
|
||||
required int id,
|
||||
int? reasonId,
|
||||
@@ -578,7 +578,7 @@ abstract final class VideoHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<Null>> replyDel({
|
||||
static Future<LoadingState<void>> replyDel({
|
||||
required int type, //replyType
|
||||
required int oid,
|
||||
required int rpid,
|
||||
@@ -602,7 +602,7 @@ abstract final class VideoHttp {
|
||||
}
|
||||
|
||||
// 操作用户关系
|
||||
static Future<LoadingState<Null>> relationMod({
|
||||
static Future<LoadingState<void>> relationMod({
|
||||
required int mid,
|
||||
required int act,
|
||||
required int reSrc,
|
||||
|
||||
Reference in New Issue
Block a user