Skip to content

Class CurseforgeV1Client

Reference the https://docs.curseforge.com/#curseforge-core-api-mods

🏭 Constructors

constructor

ts
new CurseforgeV1Client(apiKey: string, options: CurseforgeClientOptions): CurseforgeV1Client

Parameters

  • apiKey: string
  • options: CurseforgeClientOptions

Return Type

  • CurseforgeV1Client

Defined in: packages/curseforge/index.ts:538

🏷️ Properties

apiKey private

ts
apiKey: string

Defined in: packages/curseforge/index.ts:538

baseUrl private

ts
baseUrl: string

Defined in: packages/curseforge/index.ts:536

dispatcher private optional

ts
dispatcher: Dispatcher

Defined in: packages/curseforge/index.ts:535

headers

ts
headers: Record<string, string>

Defined in: packages/curseforge/index.ts:534

🔧 Methods

getCategories

ts
getCategories(signal: AbortSignal): Promise<ModCategory[]>

Parameters

  • signal: AbortSignal

Return Type

  • Promise<ModCategory[]>

Defined in: packages/curseforge/index.ts:550

getFiles

ts
getFiles(fileIds: number[], signal: AbortSignal): Promise<File[]>

Parameters

  • fileIds: number[]
  • signal: AbortSignal

Return Type

  • Promise<File[]>

Defined in: packages/curseforge/index.ts:684

getMod

ts
getMod(modId: number, signal: AbortSignal): Promise<Mod>

Get the mod by mod Id.

Parameters

  • modId: number The id of mod
  • signal: AbortSignal

Return Type

  • Promise<Mod>

Defined in: packages/curseforge/index.ts:574

getModDescription

ts
getModDescription(modId: number, signal: AbortSignal): Promise<string>

Parameters

  • modId: number
  • signal: AbortSignal

Return Type

  • Promise<string>

Defined in: packages/curseforge/index.ts:594

getModFile

ts
getModFile(modId: number, fileId: number, signal: AbortSignal): Promise<File>

Parameters

  • modId: number
  • fileId: number
  • signal: AbortSignal

Return Type

  • Promise<File>

Defined in: packages/curseforge/index.ts:641

getModFileChangelog

ts
getModFileChangelog(modId: number, fileId: number, signal: AbortSignal): Promise<string>

https://docs.curseforge.com/#get-mod-file-changelog

Parameters

  • modId: number
  • fileId: number
  • signal: AbortSignal

Return Type

  • Promise<string>

Defined in: packages/curseforge/index.ts:740

getModFiles

ts
getModFiles(options: GetModFilesOptions, signal: AbortSignal): Promise<Object>

Parameters

  • options: GetModFilesOptions
  • signal: AbortSignal

Return Type

  • Promise<Object>

Defined in: packages/curseforge/index.ts:614

getMods

ts
getMods(modIds: number[], signal: AbortSignal): Promise<Mod[]>

Parameters

  • modIds: number[]
  • signal: AbortSignal

Return Type

  • Promise<Mod[]>

Defined in: packages/curseforge/index.ts:661

searchMods

ts
searchMods(options: SearchOptions, signal: AbortSignal): Promise<Object>

Parameters

  • options: SearchOptions
  • signal: AbortSignal

Return Type

  • Promise<Object>

Defined in: packages/curseforge/index.ts:707