search method

Future<DynamiteResponse<UnifiedSearchSearchResponseApplicationJson, void>> search({
  1. required String providerId,
  2. String? term,
  3. int? sortOrder,
  4. int? limit,
  5. UnifiedSearchSearchCursor? cursor,
  6. String? from,
  7. bool? oCSAPIRequest,
})

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:

  • providerId ID of the provider.
  • 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 "".
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Search entries returned
  • 400: Searching is not possible

See:

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);
}