feat: show video note list

Closes #376

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-04 11:42:41 +08:00
parent c990cf1660
commit 5986add7dd
13 changed files with 363 additions and 16 deletions

View File

@@ -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';
}

View File

@@ -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']);
}
}
}