You've already forked AstralRinth
refactor: remove useBaseFetch for @modrinth/api-client (#5596)
* Reapply "fix: start swapping useBaseFetch usages to api-client" This reverts commit f4f33db7019ea861addb2c66c204d736800b7b6c. * fix: bugs * fix: analytics * fix: lint
This commit is contained in:
@@ -256,4 +256,31 @@ export class LabrinthProjectsV2Module extends AbstractModule {
|
||||
params: { count: String(count) },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Bulk edit multiple projects at once
|
||||
*
|
||||
* @param ids - Array of project IDs to edit
|
||||
* @param data - Fields to update across all specified projects
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* await client.labrinth.projects_v2.bulkEdit(['id1', 'id2'], {
|
||||
* issues_url: 'https://github.com/issues',
|
||||
* source_url: null,
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
public async bulkEdit(
|
||||
ids: string[],
|
||||
data: Labrinth.Projects.v2.BulkEditProjectRequest,
|
||||
): Promise<void> {
|
||||
return this.client.request(`/projects`, {
|
||||
api: 'labrinth',
|
||||
version: 2,
|
||||
method: 'PATCH',
|
||||
params: { ids: JSON.stringify(ids) },
|
||||
body: data,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user