listAssetsSearchWithHttpInfo method

Future<Response> listAssetsSearchWithHttpInfo(
  1. String companyId, {
  2. int? page,
  3. int? limit,
  4. String? sortBy,
  5. String? sortOrder,
  6. String? search,
})

Search and filter assets with advanced options Query Parameters: q: Search query string category: Filter by category sport: Filter by sport tag sort_by: Sort field (name|recent|popular|trending) limit: Number of results (default 20, max 100) offset: Offset for pagination include_recommended: Include recommendations (true/false) include_schema: Include asset_schema in response (true/false, default false)

Note: This method returns the HTTP Response.

Parameters:

  • String companyId (required): Unique identifier for the Company

  • int page: Page number for pagination

  • int limit: Number of items per page

  • String sortBy: Field to sort by

  • String sortOrder: Sort order (ascending or descending)

  • String search: Search term to filter results

Implementation

Future<Response> listAssetsSearchWithHttpInfo(String companyId, { int? page, int? limit, String? sortBy, String? sortOrder, String? search, }) async {
  // ignore: prefer_const_declarations
  final path = r'/companies/{company_id}/assets/search'
    .replaceAll('{company_id}', companyId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (sortBy != null) {
    queryParams.addAll(_queryParams('', 'sort_by', sortBy));
  }
  if (sortOrder != null) {
    queryParams.addAll(_queryParams('', 'sort_order', sortOrder));
  }
  if (search != null) {
    queryParams.addAll(_queryParams('', 'search', search));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}