aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-04-12 17:36:34 +0800
committercrupest <crupest@outlook.com>2022-04-12 17:36:34 +0800
commit3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415 (patch)
treecf694d961ed67329d7b040db3f64fa72469dd827 /FrontEnd
parentda0f0abb3d5b2941e2e7c545ec8faf681c26e72a (diff)
downloadtimeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.tar.gz
timeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.tar.bz2
timeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.zip
...
Diffstat (limited to 'FrontEnd')
-rw-r--r--FrontEnd/src/http/timeline.ts16
1 files changed, 13 insertions, 3 deletions
diff --git a/FrontEnd/src/http/timeline.ts b/FrontEnd/src/http/timeline.ts
index 0e1ceb81..d9e679ea 100644
--- a/FrontEnd/src/http/timeline.ts
+++ b/FrontEnd/src/http/timeline.ts
@@ -133,7 +133,9 @@ export interface IHttpTimelineClient {
): Promise<void>;
listPost(
ownerUsername: string,
- timelineName: string
+ timelineName: string,
+ page?: number,
+ pageSize?: number
): Promise<Page<HttpTimelineGenericPostInfo>>;
generatePostDataUrl(
ownerUsername: string,
@@ -235,11 +237,19 @@ export class HttpTimelineClient implements IHttpTimelineClient {
listPost(
ownerUsername: string,
- timelineName: string
+ timelineName: string,
+ page?: number,
+ pageSize?: number
): Promise<Page<HttpTimelineGenericPostInfo>> {
return axios
.get<Page<HttpTimelineGenericPostInfo>>(
- `${apiBaseUrl}/v2/timelines/${ownerUsername}/${timelineName}/posts`
+ applyQueryParameters(
+ `${apiBaseUrl}/v2/timelines/${ownerUsername}/${timelineName}/posts`,
+ {
+ page,
+ pageSize,
+ }
+ )
)
.then(extractResponseData);
}