feat: 观看历史分类、记录视频播放进度
This commit is contained in:
@ -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';
|
||||
}
|
||||
|
||||
@ -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(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user