Skip to content

gi-nx


gi-nx / fetchPackContents

ts
function fetchPackContents(urlOrId: string | number): Promise<PackContents>;

Fetches the contents of a specific content pack by its URL or file ID.

Parameters

ParameterTypeDescription
urlOrIdstring | numberThe URL of the content pack, or the numeric file ID

Returns

Promise<PackContents>

The contents of the pack

Example

ts
const packs = await fetchContentPacks();
const contents = await fetchPackContents(packs[0].url);
// or by ID:
const contents = await fetchPackContents(packs[0].id);