pub fn list_assets_store(
caller: Principal,
collection: &CollectionKey,
filters: &ListParams,
) -> Result<ListResults<AssetNoContent>, String>
Expand description
List assets in a collection.
This function retrieves a list of assets from a collection’s store based on the specified parameters.
It returns a Result<ListResults<AssetNoContent>, String>
where Ok(ListResults)
contains the retrieved assets,
or an error message as Err(String)
if the operation encounters issues.
§Parameters
caller
: ThePrincipal
representing the caller initiating the operation. If used in serverless functions, you can useic_cdk::id()
to pass an administrator controller.collection
: A reference to theCollectionKey
representing the collection from which to list the assets.filters
: A reference toListParams
containing the filter criteria for listing the assets.
§Returns
Ok(ListResults<AssetNoContent>)
: Contains the list of retrieved assets, without their content, matching the filter criteria.Err(String)
: An error message if the operation fails.
This function lists assets in a Juno collection’s store, applying the specified filter criteria to retrieve the assets.
The returned list includes the assets without their content (AssetNoContent
), which is useful for operations where only
metadata or references are needed.