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:
- searchRaw for an experimental operation that returns a DynamiteRawResponse that can be serialized.
Implementation
Future<DynamiteResponse<UnifiedSearchSearchResponseApplicationJson, void>> search({
required String providerId,
String? term,
int? sortOrder,
int? limit,
UnifiedSearchSearchCursor? cursor,
String? from,
bool? oCSAPIRequest,
}) async {
final rawResponse = searchRaw(
providerId: providerId,
term: term,
sortOrder: sortOrder,
limit: limit,
cursor: cursor,
from: from,
oCSAPIRequest: oCSAPIRequest,
);
return rawResponse.future;
}