-
Notifications
You must be signed in to change notification settings - Fork 10
Add pagination query parameters to Dataset&File Version Summaries use case #395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
4ca712f
7543635
050a268
3b8e6ab
55dcbd5
8c22c5b
ad571e5
4b27c58
061ad8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -306,11 +306,19 @@ export class DatasetsRepository extends ApiRepository implements IDatasetsReposi | |
| } | ||
|
|
||
| public async getDatasetVersionsSummaries( | ||
| datasetId: string | number | ||
| datasetId: string | number, | ||
| limit?: number, | ||
| offset?: number | ||
| ): Promise<DatasetVersionSummaryInfo[]> { | ||
| const queryParams: { limit?: string; offset?: string } = { | ||
| limit: limit?.toString(), | ||
| offset: offset?.toString() | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can follow same approach as here for limit and offset, using URLSearchParams
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the api returns totalCount but I didn't add it to use case. I modified the code to apply totalCount, please review again. Thank you! @g-saracca |
||
|
|
||
| return this.doGet( | ||
| this.buildApiEndpoint(this.datasetsResourceName, 'versions/compareSummary', datasetId), | ||
| true | ||
| true, | ||
| queryParams | ||
| ) | ||
| .then((response) => response.data.data) | ||
| .catch((error) => { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.