feat: 关注页面
This commit is contained in:
@ -167,4 +167,17 @@ class Api {
|
||||
|
||||
// 番剧/剧集明细
|
||||
static const String bangumiInfo = '/pgc/view/web/season';
|
||||
|
||||
// 全部关注的up
|
||||
// vmid 用户id pn 页码 ps 每页个数,最大50 order: desc
|
||||
// order_type 排序规则 最近访问传空,最常访问传 attention
|
||||
static const String followings = '/x/relation/followings';
|
||||
|
||||
// 指定分类的关注
|
||||
// https://api.bilibili.com/x/relation/tag?mid=17340771&tagid=-10&pn=1&ps=20
|
||||
static const String tagFollowings = '/x/relation/tag';
|
||||
|
||||
// 关注分类
|
||||
// https://api.bilibili.com/x/relation/tags
|
||||
static const String followingsClass = '/x/relation/tags';
|
||||
}
|
||||
|
||||
27
lib/http/follow.dart
Normal file
27
lib/http/follow.dart
Normal file
@ -0,0 +1,27 @@
|
||||
import 'package:pilipala/http/index.dart';
|
||||
import 'package:pilipala/models/follow/result.dart';
|
||||
|
||||
class FollowHttp {
|
||||
static Future followings(
|
||||
{int? vmid, int? pn, int? ps, String? orderType}) async {
|
||||
var res = await Request().get(Api.followings, data: {
|
||||
'vmid': vmid,
|
||||
'pn': pn,
|
||||
'ps': ps,
|
||||
'order': 'desc',
|
||||
'order_type': orderType,
|
||||
});
|
||||
if (res.data['code'] == 0) {
|
||||
return {
|
||||
'status': true,
|
||||
'data': FollowDataModel.fromJson(res.data['data'])
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
'status': false,
|
||||
'data': [],
|
||||
'msg': res.data['message'],
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user