mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 新增长按删评论功能
This commit is contained in:
@@ -120,6 +120,10 @@ class Api {
|
||||
// https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/comment/action.md
|
||||
static const String replyAdd = '/x/v2/reply/add';
|
||||
|
||||
// 删除评论
|
||||
// https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/comment/action.md
|
||||
static const String replyDel = '/x/v2/reply/del';
|
||||
|
||||
// 用户(被)关注数、投稿数
|
||||
// https://api.bilibili.com/x/relation/stat?vmid=697166795
|
||||
static const String userStat = '/x/relation/stat';
|
||||
|
||||
@@ -376,6 +376,25 @@ class VideoHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future replyDel({
|
||||
required int type,//replyType
|
||||
required int oid,
|
||||
required int rpid,
|
||||
}) async {
|
||||
var res = await Request().post(Api.replyDel, queryParameters: {
|
||||
'type': type,//type.index
|
||||
'oid': oid,
|
||||
'rpid': rpid,
|
||||
'csrf': await Request.getCsrf(),
|
||||
});
|
||||
log(res.toString());
|
||||
if (res.data['code'] == 0) {
|
||||
return {'status': true};
|
||||
} else {
|
||||
return {'status': false, 'msg': res.data['message']};
|
||||
}
|
||||
}
|
||||
|
||||
// 查询是否关注up
|
||||
static Future hasFollow({required int mid}) async {
|
||||
var res = await Request().get(Api.hasFollow, data: {'fid': mid});
|
||||
@@ -584,14 +603,11 @@ class VideoHttp {
|
||||
}
|
||||
}
|
||||
if (subtitlesVtt.isNotEmpty) {
|
||||
subtitlesVtt.insert(0, {
|
||||
'language': '',
|
||||
'title': '关闭字幕',
|
||||
'text': ""
|
||||
});
|
||||
subtitlesVtt.insert(0, {'language': '', 'title': '关闭字幕', 'text': ""});
|
||||
}
|
||||
return subtitlesVtt;
|
||||
}
|
||||
|
||||
// 视频排行
|
||||
static Future getRankVideoList(int rid) async {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user