Skip to content

Commit 7f18ee4

Browse files
committed
add use case documentation
1 parent 3cb8f19 commit 7f18ee4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/useCases.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The different use cases currently available in the package are classified below,
1515
- [Get User Permissions on a Collection](#get-user-permissions-on-a-collection)
1616
- [Collections write use cases](#collections-write-use-cases)
1717
- [Create a Collection](#create-a-collection)
18+
- [Publish a Collection](#publish-a-collection)
1819
- [Datasets](#Datasets)
1920
- [Datasets read use cases](#datasets-read-use-cases)
2021
- [Get a Dataset](#get-a-dataset)
@@ -191,6 +192,27 @@ The above example creates the new collection in the `root` collection since no c
191192

192193
The use case returns a number, which is the identifier of the created collection.
193194

195+
#### Publish a Collection
196+
197+
Publishes a Collection, given the collection identifier.
198+
199+
##### Example call:
200+
201+
```typescript
202+
import { publishCollection } from '@iqss/dataverse-client-javascript'
203+
204+
/* ... */
205+
206+
const collectionIdOrAlias = 12345
207+
208+
publishCollection.execute(collectionIdOrAlias)
209+
210+
/* ... */
211+
```
212+
The `collectionIdOrAlias` is a generic collection identifier, which can be either a string (for queries by CollectionAlias), or a number (for queries by CollectionId).
213+
214+
_See [use case](../src/collections/domain/useCases/PublishCollection.ts)_ definition.
215+
194216
## Datasets
195217

196218
### Datasets Read Use Cases

0 commit comments

Comments
 (0)