mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
merge mine & media
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user