List
client.collections.list(CollectionListParams { pageSize, paginationToken } query?, RequestOptionsoptions?): CollectionsCursor<CollectionListResponse { id, assetCount, createdAt, 6 more } >
GET/collections
List
import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const collectionListResponse of client.collections.list()) {
console.log(collectionListResponse.id);
}{
"collections": [
{
"id": "id",
"assetCount": 0,
"createdAt": "createdAt",
"itemCount": 0,
"modelCount": 0,
"name": "name",
"ownerId": "ownerId",
"updatedAt": "updatedAt",
"thumbnail": {
"assetId": "assetId",
"url": "url"
}
}
],
"nextPaginationToken": "nextPaginationToken"
}Returns Examples
{
"collections": [
{
"id": "id",
"assetCount": 0,
"createdAt": "createdAt",
"itemCount": 0,
"modelCount": 0,
"name": "name",
"ownerId": "ownerId",
"updatedAt": "updatedAt",
"thumbnail": {
"assetId": "assetId",
"url": "url"
}
}
],
"nextPaginationToken": "nextPaginationToken"
}