@@ -88,7 +88,7 @@ def _search_collection(self, query: Dict[str, Any] = {}):
8888 try :
8989 output = []
9090 log_info ("RevEng.AI | Searching for collections" )
91- with revengai . ApiClient ( self .config .api_config ) as api_client :
91+ with self .config .create_api_client ( ) as api_client :
9292 api_instance = revengai .SearchApi (api_client )
9393 api_response = api_instance .search_collections (
9494 page = 1 ,
@@ -116,7 +116,7 @@ def _search_binaries(self, query: Dict[str, Any] = {}):
116116 output = []
117117 try :
118118 log_info ("RevEng.AI | Searching for binaries" )
119- with revengai . ApiClient ( self .config .api_config ) as api_client :
119+ with self .config .create_api_client ( ) as api_client :
120120 api_instance = revengai .SearchApi (api_client )
121121 api_response = api_instance .search_binaries (
122122 page = 1 ,
@@ -184,7 +184,7 @@ def search_collections(self, query: Dict[str, Any] = {}) -> None:
184184 page = 1
185185 while True :
186186 log_info (f"RevEng.AI | Searching for collections on page { page } " )
187- with revengai . ApiClient ( self .config .api_config ) as api_client :
187+ with self .config .create_api_client ( ) as api_client :
188188 api_instance = revengai .SearchApi (api_client )
189189 api_response = api_instance .search_collections (
190190 page = page ,
@@ -220,7 +220,7 @@ def search_binaries(self, query: Dict[str, Any] = {}) -> None:
220220 page = 1
221221 while True :
222222 log_info (f"RevEng.AI | Searching for binaries on page { page } " )
223- with revengai . ApiClient ( self .config .api_config ) as api_client :
223+ with self .config .create_api_client ( ) as api_client :
224224 api_instance = revengai .SearchApi (api_client )
225225 api_response = api_instance .search_binaries (
226226 page = page ,
@@ -262,7 +262,7 @@ def _process_data_type_batch(self, chunk: List[Dict], chunk_index: int) -> List[
262262 if self .cancelled .is_set ():
263263 return []
264264
265- with revengai . ApiClient ( self .config .api_config ) as api_client :
265+ with self .config .create_api_client ( ) as api_client :
266266 api_instance = revengai .FunctionsDataTypesApi (api_client )
267267 function_data_types_params = revengai .FunctionDataTypesParams .from_dict ({"function_ids" : function_ids })
268268 api_response = api_instance .generate_function_data_types_for_functions (function_data_types_params )
@@ -275,7 +275,7 @@ def _process_data_type_batch(self, chunk: List[Dict], chunk_index: int) -> List[
275275 while True :
276276 if self .cancelled .is_set ():
277277 return []
278- with revengai . ApiClient ( self .config .api_config ) as api_client :
278+ with self .config .create_api_client ( ) as api_client :
279279 api_instance = revengai .FunctionsDataTypesApi (api_client )
280280 api_response = api_instance .list_function_data_types_for_functions (function_ids = function_ids ).to_dict ()
281281 log_info ("The response of FunctionsDataTypesApi->list_function_data_types_for_functions:\n " )
0 commit comments