@@ -1131,8 +1131,8 @@ def search(self, query_string, sorting_criteria=None, sorting_order="desc", page
1131
1131
1132
1132
'av-count:5 available:TRUE'
1133
1133
1134
- :param query_string: query string
1135
- :type query_string: str
1134
+ :param query_string: search query; can be a string or a dict
1135
+ :type query_string: str or dict
1136
1136
:param sorting_criteria: define the criteria used in sorting; possible values are 'sha1', 'firstseen',
1137
1137
'threatname', 'sampletype', 'filecount', 'size'
1138
1138
:type sorting_criteria: str
@@ -1145,9 +1145,6 @@ def search(self, query_string, sorting_criteria=None, sorting_order="desc", page
1145
1145
:returns: response
1146
1146
:rtype: requests.Response
1147
1147
"""
1148
- if not isinstance (query_string , str ):
1149
- raise WrongInputError ("The search query must be a string." )
1150
-
1151
1148
if not isinstance (records_per_page , int ) or not 1 <= records_per_page <= 10000 :
1152
1149
raise WrongInputError ("records_per_page parameter must be integer "
1153
1150
"with value between 1 and 10000 (included)." )
@@ -1186,8 +1183,8 @@ def search_aggregated(self, query_string, sorting_criteria=None, sorting_order="
1186
1183
Query string example:
1187
1184
'av-count:5 available:TRUE'
1188
1185
1189
- :param query_string: search query - see API documentation for details on writing search queries
1190
- :type query_string: str
1186
+ :param query_string: search query; can be a string or a dict
1187
+ :type query_string: str or dict
1191
1188
:param sorting_criteria: define the criteria used in sorting; possible values are 'sha1', 'firstseen',
1192
1189
'threatname', 'sampletype', 'filecount', 'size'
1193
1190
:type sorting_criteria: str
0 commit comments