$get method

Future<DynamiteResponse<AutoCompleteGetResponseApplicationJson, void>> $get({
  1. required String search,
  2. String? itemType,
  3. String? itemId,
  4. String? sorter,
  5. BuiltList<int>? shareTypes,
  6. int? limit,
  7. bool? oCSAPIRequest,
})

Autocomplete a query.

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:

  • search Text to search for.
  • itemType Type of the items to search for.
  • itemId ID of the items to search for.
  • sorter can be piped, top prio first, e.g.: "commenters|share-recipients".
  • shareTypes Types of shares to search for. Defaults to [].
  • limit Maximum number of results to return. Defaults to 10.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Autocomplete results returned

See:

Implementation

Future<_i1.DynamiteResponse<AutoCompleteGetResponseApplicationJson, void>> $get({
  required String search,
  String? itemType,
  String? itemId,
  String? sorter,
  BuiltList<int>? shareTypes,
  int? limit,
  bool? oCSAPIRequest,
}) async {
  final _request = $$get_Request(
    search: search,
    itemType: itemType,
    itemId: itemId,
    sorter: sorter,
    shareTypes: shareTypes,
    limit: limit,
    oCSAPIRequest: oCSAPIRequest,
  );
  final _response = await _rootClient.httpClient.send(_request);

  final _serializer = $$get_Serializer();
  final _rawResponse =
      await _i1.ResponseConverter<AutoCompleteGetResponseApplicationJson, void>(_serializer).convert(_response);
  return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}