feat: unfollow bangumi, change followState

This commit is contained in:
bggRGjQaUbCoE
2024-10-03 12:02:03 +08:00
parent f5202beb44
commit b795d5d2b2
5 changed files with 165 additions and 22 deletions

View File

@@ -320,6 +320,8 @@ class Api {
// 取消追番
static const String bangumiDel = '/pgc/web/follow/del';
static const String bangumiUpdate = '/pgc/web/follow/status/update';
// 番剧列表
// https://api.bilibili.com/pgc/season/index/result?
// st=1&

View File

@@ -766,6 +766,27 @@ class VideoHttp {
}
}
static Future bangumiUpdate({
dynamic seasonId,
dynamic status,
}) async {
var res = await Request().post(
Api.bangumiUpdate,
data: {
'season_id': seasonId,
'status': status,
'csrf': await Request.getCsrf(),
},
options: Options(
contentType: Headers.formUrlEncodedContentType,
),
);
return {
'status': res.data['code'] == 0,
'msg': res.data['result'] == null ? 'failed' : res.data['result']['toast']
};
}
// 查看视频同时在看人数
static Future onlineTotal({int? aid, String? bvid, int? cid}) async {
var res = await Request().get(Api.onlineTotal, data: {