customDelete method

Future<Object> customDelete({
  1. required String path,
  2. Map<String, Object>? parameters,
  3. RequestOptions? requestOptions,
})

This method allow you to send requests to the Algolia REST API.

Parameters:

  • path Path of the endpoint, anything after "/1" must be specified.
  • parameters Query parameters to apply to the current query.
  • requestOptions additional request configuration.

Implementation

Future<Object> customDelete({
  required String path,
  Map<String, Object>? parameters,
  RequestOptions? requestOptions,
}) async {
  assert(
    path.isNotEmpty,
    'Parameter `path` is required when calling `customDelete`.',
  );
  final request = ApiRequest(
    method: RequestMethod.delete,
    path: r'/{path}'.replaceAll('{' r'path' '}', path),
    queryParams: {
      ...?parameters,
    },
  );
  final response = await _retryStrategy.execute(
    request: request,
    options: requestOptions,
  );
  return deserialize<Object, Object>(
    response,
    'Object',
    growable: true,
  );
}