opt: bangumi triple

This commit is contained in:
bggRGjQaUbCoE
2024-10-01 20:44:41 +08:00
parent fb1ae9df15
commit 41ed15b0d7
3 changed files with 27 additions and 9 deletions

View File

@@ -108,6 +108,8 @@ class Api {
// csrf str CSRF Token位于cookie 必要
static const String oneThree = '/x/web-interface/archive/like/triple';
static const String triple = '/pgc/season/episode/like/triple';
// 获取指定用户创建的所有收藏夹信息
// 该接口也能查询目标内容id存在于那些收藏夹中
// up_mid num 目标用户mid 必要

View File

@@ -348,6 +348,27 @@ class VideoHttp {
}
}
// 一键三连 bangumi
static Future triple({dynamic epId}) async {
var res = await Request().post(
Api.triple,
data: {
'ep_id': epId,
'csrf': await Request.getCsrf(),
},
options: Options(
headers: {
'Content-Type': Headers.formUrlEncodedContentType,
},
),
);
if (res.data['code'] == 0) {
return {'status': true, 'data': res.data['data']};
} else {
return {'status': false, 'data': [], 'msg': res.data['message']};
}
}
// 一键三连
static Future oneThree({required String bvid}) async {
var res = await Request().post(
@@ -533,11 +554,6 @@ class VideoHttp {
var res = await Request().post(
Api.replyAdd,
data: FormData.fromMap(data),
options: Options(
headers: {
'Content-Type': Headers.formUrlEncodedContentType,
},
),
);
log(res.toString());
if (res.data['code'] == 0) {