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
| Parameter | Type | Description |
|---|---|---|
urlOrId | string | number | The 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);