Constructor
new Collections(client) → {void}
Parameters:
Name | Type | Description |
---|---|---|
client |
BoxClient | The Box API Client that is responsible for making calls to the API |
- Source:
Returns:
- Type
- void
Methods
getAll(callbackopt) → {Promise.<Object>}
Requests all of a user's collection objects.
API Endpoint: '/collections'
Method: GET
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Called with a collection of collections if successful |
- Source:
Returns:
A promise resolving to the collection of collections
- Type
- Promise.<Object>
getAll(callbackopt) → {Promise.<Object>}
Requests all of a user's collection objects.
API Endpoint: '/collections'
Method: GET
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Called with a collection of collections if successful |
- Source:
Returns:
A promise resolving to the collection of collections
- Type
- Promise.<Object>
getItems(collectionID, optionsopt, callbackopt) → {Promise.<Object>}
Requests the items in the collection object with a given ID.
API Endpoint: '/collections/:collectionID/items'
Method: GET
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
collectionID |
string | Box ID of the collection with items being requested | |
options |
Object |
<optional> |
Additional options for the request. Can be left null in most cases. |
callback |
function |
<optional> |
Passed the items information if they were acquired successfully |
- Source:
Returns:
A promise resolving to the collection of items in the collection
- Type
- Promise.<Object>
getItems(collectionID, optionsopt, callbackopt) → {Promise.<Object>}
Requests the items in the collection object with a given ID.
API Endpoint: '/collections/:collectionID/items'
Method: GET
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
collectionID |
string | Box ID of the collection with items being requested | |
options |
Object |
<optional> |
Additional options for the request. Can be left null in most cases. |
callback |
function |
<optional> |
Passed the items information if they were acquired successfully |
- Source:
Returns:
A promise resolving to the collection of items in the collection
- Type
- Promise.<Object>