diff options
author | crupest <crupest@outlook.com> | 2022-04-12 17:36:34 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-04-12 17:36:34 +0800 |
commit | 3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415 (patch) | |
tree | cf694d961ed67329d7b040db3f64fa72469dd827 /FrontEnd/src/http/timeline.ts | |
parent | da0f0abb3d5b2941e2e7c545ec8faf681c26e72a (diff) | |
download | timeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.tar.gz timeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.tar.bz2 timeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.zip |
...
Diffstat (limited to 'FrontEnd/src/http/timeline.ts')
-rw-r--r-- | FrontEnd/src/http/timeline.ts | 16 |
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); } |