mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-29 22:00:16 +08:00
feat: sort fav folder
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -116,6 +116,8 @@ class Api {
|
||||
|
||||
static const String sortFav = '/x/v3/fav/resource/sort';
|
||||
|
||||
static const String sortFavFolder = '/x/v3/fav/folder/sort';
|
||||
|
||||
// 判断视频是否被收藏(双端)GET
|
||||
/// aid
|
||||
// https://api.bilibili.com/x/v2/fav/video/favoured
|
||||
|
||||
@@ -66,6 +66,28 @@ class UserHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future sortFavFolder({
|
||||
required List<int?> sort,
|
||||
}) async {
|
||||
Map<String, dynamic> data = {
|
||||
'sort': sort.join(','),
|
||||
'csrf': await Request.getCsrf(),
|
||||
};
|
||||
Utils.appSign(data);
|
||||
var res = await Request().post(
|
||||
Api.sortFavFolder,
|
||||
data: data,
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
),
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return {'status': true, 'data': res.data['data']};
|
||||
} else {
|
||||
return {'status': false, 'msg': res.data['message']};
|
||||
}
|
||||
}
|
||||
|
||||
static Future sortFav({
|
||||
required dynamic mediaId,
|
||||
required List<String> sort,
|
||||
|
||||
Reference in New Issue
Block a user