mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-15 13:50:14 +08:00
@@ -4,15 +4,22 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models_new/fans/data.dart';
|
||||
|
||||
class FanHttp {
|
||||
static Future<LoadingState<FansData>> fans(
|
||||
{int? vmid, int? pn, int? ps, String? orderType}) async {
|
||||
var res = await Request().get(Api.fans, queryParameters: {
|
||||
'vmid': vmid,
|
||||
'pn': pn,
|
||||
'ps': ps,
|
||||
'order': 'desc',
|
||||
'order_type': orderType,
|
||||
});
|
||||
static Future<LoadingState<FansData>> fans({
|
||||
int? vmid,
|
||||
int? pn,
|
||||
int? ps,
|
||||
String? orderType,
|
||||
}) async {
|
||||
var res = await Request().get(
|
||||
Api.fans,
|
||||
queryParameters: {
|
||||
'vmid': vmid,
|
||||
'pn': pn,
|
||||
'ps': ps,
|
||||
'order': 'desc',
|
||||
'order_type': orderType,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return Success(FansData.fromJson(res.data['data']));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user