Interface SearchOptions
The search options of the search API.
🏷️ Properties
categoryId
categoryId: number
This 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:399
classId
classId: number
The 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 here
Defined in: packages/curseforge/index.ts:381
gameId
gameId: number
The game id. The Minecraft is 432.
Defined in: packages/curseforge/index.ts:405
gameVersion
gameVersion: string
The game version. For Minecraft, it should looks like 1.12.2.
Defined in: packages/curseforge/index.ts:409
gameVersionTypeId
gameVersionTypeId: number
Filter only mods that contain files tagged with versions of the given gameVersionTypeId
Defined in: packages/curseforge/index.ts:435
index
index: number
The 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:417
modLoaderType
modLoaderType: FileModLoaderType
Filter only mods associated to a given modloader (Forge, Fabric ...). Must be coupled with gameVersion.
Defined in: packages/curseforge/index.ts:429
modLoaderTypes
modLoaderTypes: string[]
Defined in: packages/curseforge/index.ts:431
pageSize
pageSize: number
The page size, or the number of the addons in a page.
Defined in: packages/curseforge/index.ts:445
searchFilter
searchFilter: string
The keyword of search. If this is absent, it just list out the available addons by sectionId
and categoryId
.
Defined in: packages/curseforge/index.ts:449
slug
slug: string
Filter by slug (coupled with classId will result in a unique result).
Defined in: packages/curseforge/index.ts:439
sortField
sortField: ModsSearchSortField
Filter by ModsSearchSortField enumeration
Defined in: packages/curseforge/index.ts:421
sortOrder
sortOrder: "desc" | "asc"
'asc' if sort is in ascending order, 'desc' if sort is in descending order
Defined in: packages/curseforge/index.ts:425