patchToolsCatalogById method
Sets what WE say about one catalog entry — hidden, featured, official, logo — and answers with the stored listing.
Sets what WE say about one catalog entry — hidden, featured, official, logo — and answers with the stored listing. SuperAdmin only; every other caller is refused. Curation is the half of a catalog row a sync cannot write, and this is the only thing that writes it. The upstream half is never editable here: a description that disagreed with the publisher's would be a fork of their listing, and the next sync would silently undo it.
Parameters:
Implementation
Future<MCPListing?> patchToolsCatalogById(String id, CurateReq curateReq,) async {
final response = await patchToolsCatalogByIdWithHttpInfo(id, curateReq,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MCPListing',) as MCPListing;
}
return null;
}