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:
term
Term to search. Defaults to""
.sortOrder
Order of entries.limit
Maximum amount of entries.cursor
Offset for searching.from
The current user URL. Defaults to""
.providerId
ID of the provider.oCSAPIRequest
Required 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
Response
from 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 _response = await _rootClient.httpClient.send(_request);
final _serializer = $search_Serializer();
final _rawResponse =
await _i1.ResponseConverter<UnifiedSearchSearchResponseApplicationJson, void>(_serializer).convert(_response);
return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}