renameCategory method

Future<DynamiteResponse<String, void>> renameCategory({
  1. required String category,
  2. required RenameCategoryRequestApplicationJson $body,
})

Rename a category.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • category The name of the category to be queried as urlencoded string.

Put the string _ to obtain all recipes with no category.

Status codes:

  • 200: The category was renamed successfully
  • 400: The new category name was not included during the request.
  • 500: The renaming did not succeed.

See:

Implementation

Future<_i1.DynamiteResponse<String, void>> renameCategory({
  required String category,
  required RenameCategoryRequestApplicationJson $body,
}) async {
  final _request = $renameCategory_Request(
    category: category,
    $body: $body,
  );
  final _streamedResponse = await _rootClient.httpClient.send(_request);
  final _response = await _i3.Response.fromStream(_streamedResponse);

  final _serializer = $renameCategory_Serializer();
  return _i1.ResponseConverter<String, void>(_serializer).convert(_response);
}