Skip to content

gi-nx


gi-nx / fetchContentPacks

ts
function fetchContentPacks(search?: string, contents?: PackContentType[]): Promise<PackFile[]>;

Fetches all available content packs from the server.

Parameters

ParameterTypeDescription
search?stringOptional 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');