listAssetsSearchWithHttpInfo 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)
Note: This method returns the HTTP Response.
Parameters:
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,
);
}