search method
Launch a search for a specific search provider.
Additional filters are available for each provider. Send a request to /providers endpoint to list providers with their available filters.
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:
providerIdID of the provider.termTerm to search. Defaults to"".sortOrderOrder of entries.limitMaximum amount of entries, limited to 25.cursorOffset for searching.fromThe current user URL. Defaults to"".oCSAPIRequestRequired to be true for the API request to pass. Defaults totrue.
Status codes:
- 200: Search entries returned
- 400: Searching is not possible
See:
- $search_Request for the request send by this method.
- $search_Serializer for a converter to parse the
Responsefrom an executed request.
Implementation
Future<_i1.DynamiteResponse<UnifiedSearchSearchResponseApplicationJson, void>> search({
required String providerId,
String? term,
int? sortOrder,
int? limit,
UnifiedSearchSearchCursor? cursor,
String? from,
bool? oCSAPIRequest,
}) async {
final _request = $search_Request(
providerId: providerId,
term: term,
sortOrder: sortOrder,
limit: limit,
cursor: cursor,
from: from,
oCSAPIRequest: oCSAPIRequest,
);
final _streamedResponse = await _rootClient.httpClient.send(_request);
final _response = await _i3.Response.fromStream(_streamedResponse);
final _serializer = $search_Serializer();
return _i1.ResponseConverter<UnifiedSearchSearchResponseApplicationJson, void>(_serializer).convert(_response);
}