gi-nx / fetchContentPacks
ts
function fetchContentPacks(search?: string, contents?: PackContentType[]): Promise<PackFile[]>;Fetches all available content packs from the server.
Parameters
| Parameter | Type | Description |
|---|---|---|
search? | string | Optional search string to filter packs by name |
contents? | PackContentType[] | Optional list of pack content types; only packs containing at least one of these will be returned |
Returns
Promise<PackFile[]>
Example
ts
const packs = await fetchContentPacks();
const blockPacks = await fetchContentPacks(undefined, [BLOCKS_IN_BUNDLE]);
const searched = await fetchContentPacks('kitchen');