mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 04:58:41 +00:00
@@ -214,6 +214,8 @@ class Api {
|
||||
// https://api.bilibili.com/x/polymer/web-dynamic/v1/portal
|
||||
static const String followUp = '/x/polymer/web-dynamic/v1/portal';
|
||||
|
||||
static const String dynUplist = '/x/polymer/web-dynamic/v1/uplist';
|
||||
|
||||
// 关注的up动态
|
||||
// https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/all
|
||||
// https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/all?timezone_offset=-480&type=video&page=1&features=itemOpusStyle
|
||||
|
||||
@@ -68,7 +68,13 @@ class DynamicsHttp {
|
||||
}
|
||||
|
||||
static Future<LoadingState<FollowUpModel>> followUp() async {
|
||||
var res = await Request().get(Api.followUp);
|
||||
var res = await Request().get(
|
||||
Api.followUp,
|
||||
queryParameters: {
|
||||
'up_list_more': 1,
|
||||
'web_location': 333.1365,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return Success(FollowUpModel.fromJson(res.data['data']));
|
||||
} else {
|
||||
@@ -76,6 +82,22 @@ class DynamicsHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<DynUpList>> dynUpList(String? offset) async {
|
||||
var res = await Request().get(
|
||||
Api.dynUplist,
|
||||
queryParameters: {
|
||||
'offset': offset,
|
||||
'platform': 'web',
|
||||
'web_location': 333.1365,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return Success(DynUpList.fromJson(res.data['data']));
|
||||
} else {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
|
||||
// 动态点赞
|
||||
// static Future likeDynamic({
|
||||
// required String? dynamicId,
|
||||
|
||||
Reference in New Issue
Block a user