mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: show video note list
Closes #376 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -719,4 +719,6 @@ class Api {
|
||||
static const String pgcIndexCondition = '/pgc/season/index/condition';
|
||||
|
||||
static const String pgcIndexResult = '/pgc/season/index/result';
|
||||
|
||||
static const String noteList = '/x/note/publish/list/archive';
|
||||
}
|
||||
|
||||
@@ -1134,4 +1134,27 @@ class VideoHttp {
|
||||
return LoadingState.error(res.data['message']);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState> getVideoNoteList({
|
||||
dynamic oid,
|
||||
dynamic uperMid,
|
||||
required int page,
|
||||
}) async {
|
||||
var res = await Request().get(
|
||||
Api.noteList,
|
||||
queryParameters: {
|
||||
'csrf': await Request.getCsrf(),
|
||||
'oid': oid,
|
||||
'oid_type': 0,
|
||||
'pn': page,
|
||||
'ps': 10,
|
||||
if (uperMid != null) 'uper_mid': uperMid,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return LoadingState.success(res.data['data']);
|
||||
} else {
|
||||
return LoadingState.error(res.data['message']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user