$get method
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.limit
Maximum number of results to return. Defaults to10
.oCSAPIRequest
Required to be true for the API request to pass. Defaults totrue
.
Status codes:
- 200: Autocomplete results returned
See:
- $getRaw for an experimental operation that returns a DynamiteRawResponse that can be serialized.
Implementation
Future<DynamiteResponse<AutoCompleteGetResponseApplicationJson, void>> $get({
required String search,
String? itemType,
String? itemId,
String? sorter,
BuiltList<int>? shareTypes,
int? limit,
bool? oCSAPIRequest,
}) async {
final rawResponse = $getRaw(
search: search,
itemType: itemType,
itemId: itemId,
sorter: sorter,
shareTypes: shareTypes,
limit: limit,
oCSAPIRequest: oCSAPIRequest,
);
return rawResponse.future;
}