feat: 观看历史分类、记录视频播放进度

This commit is contained in:
guozhigq
2023-06-21 12:40:21 +08:00
parent fe93eb690c
commit e738d58766
9 changed files with 167 additions and 24 deletions

View File

@ -150,4 +150,8 @@ class Api {
// 分类搜索
static const String searchByType = '/x/web-interface/search/type';
// 记录视频播放进度
// https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/video/report.md
static const String heartBeat = '/x/click-interface/web/heartbeat';
}

View File

@ -303,4 +303,21 @@ class VideoHttp {
return {'status': true, 'data': []};
}
}
// 视频播放进度
static Future heartBeat({aid, progress, realtime}) async {
var res = await Request().post(Api.heartBeat, queryParameters: {
'aid': aid,
// 'bvid': '',
// 'cid': '',
// 'epid': '',
// 'sid': '',
// 'mid': '',
'played_time': progress,
// 'realtime': realtime,
// 'type': '',
// 'sub_type': '',
'csrf': await Request.getCsrf(),
});
}
}