Interface SearchOptions
The search options of the search API.
🏷️ Properties
categoryId optional
categoryId: numberThis is actually the sub category id of the sectionId. All the numbers for this should also be fetch by getCategories.
To get available values, you can:
const cat = await getCategories();
const sectionId = 6; // the mods
const categoryIds = cat
.filter(c => c.gameId === 432) // 432 is minecraft game id
.filter(c => c.rootGameCategoryId === sectionId) // only under the section id
.map(c => c.id);
// Use categoryIds' id to search under the corresponding section id.Defined in: packages/curseforge/index.ts:402
classId optional
classId: numberThe category section id, which is also a category id. You can fetch if from getCategories.
To get available categories, you can:
const cat = await getCategories();
const sectionIds = cat
.filter(c => c.gameId === 432) // 432 is minecraft game id
.filter(c => c.rootGameCategoryId === null).map(c => c.id);
// the sectionIds is all normal sections hereDefined in: packages/curseforge/index.ts:384
gameId optional
gameId: numberThe game id. The Minecraft is 432.
Defined in: packages/curseforge/index.ts:408
gameVersion optional
gameVersion: stringThe game version. For Minecraft, it should looks like 1.12.2.
Defined in: packages/curseforge/index.ts:412
gameVersionTypeId optional
gameVersionTypeId: numberFilter only mods that contain files tagged with versions of the given gameVersionTypeId
Defined in: packages/curseforge/index.ts:438
index optional
index: numberThe index of the addon, NOT the page!
When your page size is 25, if you want to get next page contents, you should have index = 25 to get 2nd page content.
Defined in: packages/curseforge/index.ts:420
modLoaderType optional
modLoaderType: FileModLoaderTypeFilter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion.
Defined in: packages/curseforge/index.ts:432
modLoaderTypes optional
modLoaderTypes: string[]Defined in: packages/curseforge/index.ts:434
pageSize optional
pageSize: numberThe page size, or the number of the addons in a page.
Defined in: packages/curseforge/index.ts:448
searchFilter optional
searchFilter: stringThe keyword of search. If this is absent, it just list out the available addons by sectionId and categoryId.
Defined in: packages/curseforge/index.ts:452
slug optional
slug: stringFilter by slug (coupled with classId will result in a unique result).
Defined in: packages/curseforge/index.ts:442
sortField optional
sortField: ModsSearchSortFieldFilter by ModsSearchSortField enumeration
Defined in: packages/curseforge/index.ts:424
sortOrder optional
sortOrder: "desc" | "asc"'asc' if sort is in ascending order, 'desc' if sort is in descending order
Defined in: packages/curseforge/index.ts:428