chore: add episode info api

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-09 17:37:35 +08:00
parent 847ac80d5f
commit 58c16ef52e
2 changed files with 17 additions and 0 deletions

View File

@@ -265,6 +265,9 @@ class Api {
// 番剧/剧集明细
static const String bangumiInfo = '/pgc/view/web/season';
// https://api.bilibili.com/pgc/season/episode/web/info?ep_id=12345678
static const String episodeInfo = '/pgc/season/episode/web/info';
// 全部关注的up
// vmid 用户id pn 页码 ps 每页个数最大50 order: desc
// order_type 排序规则 最近访问传空,最常访问传 attention

View File

@@ -177,6 +177,20 @@ class SearchHttp {
}
}
static Future<LoadingState> episodeInfo({int? epId}) async {
final dynamic res = await Request().get(
Api.episodeInfo,
queryParameters: {
if (epId != null) 'ep_id': epId,
},
);
if (res.data['code'] == 0) {
return LoadingState.success(res.data['data']);
} else {
return LoadingState.error(res.data['message']);
}
}
static Future<Map<String, dynamic>> bangumiInfo({
dynamic seasonId,
dynamic epId,