merge mine & media

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-28 14:27:18 +08:00
parent 6ca7efe8d1
commit 65b432ed2c
40 changed files with 903 additions and 1038 deletions

View File

@@ -5,31 +5,6 @@ import 'package:PiliPlus/models_new/follow/data.dart';
class FollowHttp {
static Future<LoadingState<FollowData>> followings({
int? vmid,
int? pn,
int ps = 50,
String orderType = '',
}) async {
var res = await Request().get(
Api.followings,
queryParameters: {
'vmid': vmid,
'pn': pn,
'ps': ps,
'order': 'desc',
'order_type': orderType,
},
);
if (res.data['code'] == 0) {
return Success(
FollowData.fromJson(res.data['data']),
);
} else {
return Error(res.data['message']);
}
}
static Future<LoadingState<FollowData>> followingsNew({
int? vmid,
int? pn,
int ps = 20,
@@ -45,11 +20,8 @@ class FollowHttp {
'order_type': orderType,
},
);
if (res.data['code'] == 0) {
return Success(
FollowData.fromJson(res.data['data']),
);
return Success(FollowData.fromJson(res.data['data']));
} else {
return Error(res.data['message']);
}