Skip to content

Commit f1f47be

Browse files
box-sdk-buildbox-sdk-build
andauthored
feat: Support get collection by ID endpoint (box/box-codegen#595) (#396)
Co-authored-by: box-sdk-build <[email protected]>
1 parent b092704 commit f1f47be

File tree

5 files changed

+218
-90
lines changed

5 files changed

+218
-90
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "4d95546", "specHash": "9d452cf", "version": "1.7.0" }
1+
{ "engineHash": "108d2d7", "specHash": "c2c76f3", "version": "1.7.0" }

docs/collections.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- [List all collections](#list-all-collections)
44
- [List collection items](#list-collection-items)
5+
- [Get collection by ID](#get-collection-by-id)
56

67
## List all collections
78

@@ -64,3 +65,31 @@ await client.collections.getCollectionItems(favouriteCollection.id!);
6465
This function returns a value of type `Items`.
6566

6667
Returns an array of items in the collection.
68+
69+
## Get collection by ID
70+
71+
Retrieves a collection by its ID.
72+
73+
This operation is performed by calling function `getCollectionById`.
74+
75+
See the endpoint docs at
76+
[API Reference](https://developer.box.com/reference/get-collections-id/).
77+
78+
<!-- sample get_collections_id -->
79+
80+
```ts
81+
await client.collections.getCollectionById(collections.entries![0].id!);
82+
```
83+
84+
### Arguments
85+
86+
- collectionId `string`
87+
- The ID of the collection. Example: "926489"
88+
- optionalsInput `GetCollectionByIdOptionalsInput`
89+
-
90+
91+
### Returns
92+
93+
This function returns a value of type `Collection`.
94+
95+
Returns an array of items in the collection.

package-lock.json

Lines changed: 87 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)