Skip to content

Class ModrinthV2Client

🏭 Constructors

constructor

ts
new ModrinthV2Client(options: ModrinthClientOptions): ModrinthV2Client

Parameters

  • options: ModrinthClientOptions

Return Type

  • ModrinthV2Client

Defined in: packages/modrinth/index.ts:185

🏷️ Properties

baseUrl

ts
baseUrl: string

Defined in: packages/modrinth/index.ts:181

dispatcher

ts
dispatcher: Dispatcher

Defined in: packages/modrinth/index.ts:182

headers

ts
headers: Record<string, string>

Defined in: packages/modrinth/index.ts:183

🔧 Methods

getCategoryTags

ts
getCategoryTags(signal: AbortSignal): Promise<Category[]>

Parameters

  • signal: AbortSignal

Return Type

  • Promise<Category[]>

Defined in: packages/modrinth/index.ts:397

getGameVersionTags

ts
getGameVersionTags(signal: AbortSignal): Promise<GameVersion[]>

Parameters

  • signal: AbortSignal

Return Type

  • Promise<GameVersion[]>

Defined in: packages/modrinth/index.ts:414

getLatestProjectVersion

ts
getLatestProjectVersion(sha1: string, __namedParameters: Object= {}, signal: AbortSignal): Promise<ProjectVersion>

Parameters

  • sha1: string
  • __namedParameters: Object
  • signal: AbortSignal

Return Type

  • Promise<ProjectVersion>

Defined in: packages/modrinth/index.ts:357

getLatestVersionsFromHashes

ts
getLatestVersionsFromHashes(hashes: string[], __namedParameters: Object= {}, signal: AbortSignal): Promise<Record<string, ProjectVersion>>

Parameters

  • hashes: string[]
  • __namedParameters: Object
  • signal: AbortSignal

Return Type

  • Promise<Record<string, ProjectVersion>>

Defined in: packages/modrinth/index.ts:333

getLicenseTags

ts
getLicenseTags(signal: AbortSignal): Promise<License[]>

Parameters

  • signal: AbortSignal

Return Type

  • Promise<License[]>

Defined in: packages/modrinth/index.ts:380

getLoaderTags

ts
getLoaderTags(signal: AbortSignal): Promise<Loader[]>

Parameters

  • signal: AbortSignal

Return Type

  • Promise<Loader[]>

Defined in: packages/modrinth/index.ts:431

getProject

ts
getProject(projectId: string, signal: AbortSignal): Promise<Project>

Parameters

  • projectId: string
  • signal: AbortSignal

Return Type

  • Promise<Project>

Defined in: packages/modrinth/index.ts:217

getProjectTeamMembers

ts
getProjectTeamMembers(projectId: string, signal: AbortSignal): Promise<TeamMember[]>

Parameters

  • projectId: string
  • signal: AbortSignal

Return Type

  • Promise<TeamMember[]>

Defined in: packages/modrinth/index.ts:448

getProjectVersion

ts
getProjectVersion(versionId: string, signal: AbortSignal): Promise<ProjectVersion>

Parameters

  • versionId: string
  • signal: AbortSignal

Return Type

  • Promise<ProjectVersion>

Defined in: packages/modrinth/index.ts:273

getProjectVersions

ts
getProjectVersions(projectId: string, __namedParameters: Object= {}, signal: AbortSignal): Promise<ProjectVersion[]>

Parameters

  • projectId: string
  • __namedParameters: Object
  • signal: AbortSignal

Return Type

  • Promise<ProjectVersion[]>

Defined in: packages/modrinth/index.ts:253

getProjectVersionsByHash

ts
getProjectVersionsByHash(hashes: string[], algorithm: string= 'sha1', signal: AbortSignal): Promise<Record<string, ProjectVersion>>

Parameters

  • hashes: string[]
  • algorithm: string
  • signal: AbortSignal

Return Type

  • Promise<Record<string, ProjectVersion>>

Defined in: packages/modrinth/index.ts:308

getProjectVersionsById

ts
getProjectVersionsById(ids: string[], signal: AbortSignal): Promise<ProjectVersion[]>

Parameters

  • ids: string[]
  • signal: AbortSignal

Return Type

  • Promise<ProjectVersion[]>

Defined in: packages/modrinth/index.ts:290

getProjects

ts
getProjects(projectIds: string[], signal: AbortSignal): Promise<Project[]>

Parameters

  • projectIds: string[]
  • signal: AbortSignal

Return Type

  • Promise<Project[]>

Defined in: packages/modrinth/index.ts:235

getUser

ts
getUser(id: string, signal: AbortSignal): Promise<User>

Parameters

  • id: string
  • signal: AbortSignal

Return Type

  • Promise<User>

Defined in: packages/modrinth/index.ts:465

getUserProjects

ts
getUserProjects(id: string, signal: AbortSignal): Promise<Project[]>

Parameters

  • id: string
  • signal: AbortSignal

Return Type

  • Promise<Project[]>

Defined in: packages/modrinth/index.ts:482

searchProjects

ts
searchProjects(options: SearchProjectOptions, signal: AbortSignal): Promise<SearchResult>

Parameters

  • options: SearchProjectOptions
  • signal: AbortSignal

Return Type

  • Promise<SearchResult>

Defined in: packages/modrinth/index.ts:194

Released under the MIT License.