listAssetsSearch method
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)
Parameters:
Implementation
Future<ListAssets200Response?> listAssetsSearch(String companyId, { int? page, int? limit, String? sortBy, String? sortOrder, String? search, }) async {
final response = await listAssetsSearchWithHttpInfo(companyId, page: page, limit: limit, sortBy: sortBy, sortOrder: sortOrder, search: search, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ListAssets200Response',) as ListAssets200Response;
}
return null;
}