diff --git a/lib/http/api.dart b/lib/http/api.dart index b922f15d..2f989749 100644 --- a/lib/http/api.dart +++ b/lib/http/api.dart @@ -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 diff --git a/lib/http/search.dart b/lib/http/search.dart index f57b7567..f0633065 100644 --- a/lib/http/search.dart +++ b/lib/http/search.dart @@ -177,6 +177,20 @@ class SearchHttp { } } + static Future 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> bangumiInfo({ dynamic seasonId, dynamic epId,