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:
termTerm to search. Defaults to''.sortOrderOrder of entries.limitMaximum amount of entries.cursorOffset for searching.fromThe current user URL. Defaults to''.providerIdID of the provider.oCSAPIRequestRequired 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;
}