Skip to content

Commit 7ed3bce

Browse files
committed
docs: add use case for getting dataset versions
1 parent f906ca4 commit 7ed3bce

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

docs/useCases.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The different use cases currently available in the package are classified below,
3737
- [Get User Permissions on a Dataset](#get-user-permissions-on-a-dataset)
3838
- [Get Differences between Two Dataset Versions](#get-differences-between-two-dataset-versions)
3939
- [List All Datasets](#list-all-datasets)
40+
- [Get Dataset Versions](#get-dataset-versions)
4041
- [Get Dataset Versions Summaries](#get-dataset-versions-summaries)
4142
- [Get Dataset Linked Collections](#get-dataset-linked-collections)
4243
- [Get Dataset Available Categories](#get-dataset-available-categories)
@@ -871,6 +872,36 @@ Note that `collectionId` is an optional parameter to filter datasets by collecti
871872

872873
The `DatasetPreviewSubset`returned instance contains a property called `totalDatasetCount` which is necessary for pagination.
873874

875+
#### Get Dataset Versions
876+
877+
Returns the total count of versions and an array of [DatasetVersion](../src/datasets/domain/models/DatasetVersion.ts) that contains information about every specific version.
878+
879+
##### Example call:
880+
881+
```typescript
882+
import { getDatasetVersions } from '@iqss/dataverse-client-javascript'
883+
884+
/* ... */
885+
886+
const datasetId = 'doi:10.77777/FK2/AAAAAA'
887+
888+
getDatasetVersions
889+
.execute(datasetId)
890+
.then((datasetVersions: DatasetVersionSubset) => {
891+
/* ... */
892+
})
893+
894+
/* ... */
895+
```
896+
897+
_See [use case](../src/datasets/domain/useCases/GetDatasetVersions.ts) implementation_.
898+
899+
- The `datasetId` parameter can be a string, for persistent identifiers, or a number, for numeric identifiers.
900+
- **limit**: (number) Limit for pagination.
901+
- **offset**: (number) Offset for pagination.
902+
- **excludeMetadataBlocks**: (boolean) Exclude metadata blocks (default: false).
903+
- **excludesFiles**: (boolean) Exclude files (default: true).
904+
874905
#### Get Dataset Versions Summaries
875906

876907
Returns the total count of versions and an array of [DatasetVersionSummaryInfo](../src/datasets/domain/models/DatasetVersionSummaryInfo.ts) that contains information about what changed in every specific version.

0 commit comments

Comments
 (0)