assets()

Returns assets and asset details from specified collection

Parameters

export type CollectionAssetsProps = {
    collectionId: string;
    serials?: string; // if specified, response only includes assets with serial numbers in specified range (e.g. 1-10, 15, 20-25)
    idOnly?: boolean; // if specified, response includes assetIds only
}

Examples

const assets = await assetlayer.collections.assets({
    collectionId: 'collectionId',
    serials: '0-5'
});
const assetIds = await assetlayer.collections.assets({
    collectionId: 'collectionId',
    serials: '10-20',
    idOnly: true
});

Return Types

type ReturnType = Asset[] | string[];
Asset

Alternatives

getCollectionAssets()getCollectionAssetIds()

Last updated