revengai 2.74.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. revengai/__init__.py +647 -0
  2. revengai/api/__init__.py +22 -0
  3. revengai/api/analyses_comments_api.py +1198 -0
  4. revengai/api/analyses_core_api.py +3870 -0
  5. revengai/api/analyses_dynamic_execution_api.py +1884 -0
  6. revengai/api/analyses_results_metadata_api.py +2240 -0
  7. revengai/api/analyses_security_checks_api.py +862 -0
  8. revengai/api/authentication_users_api.py +1323 -0
  9. revengai/api/binaries_api.py +1610 -0
  10. revengai/api/collections_api.py +2167 -0
  11. revengai/api/external_sources_api.py +827 -0
  12. revengai/api/firmware_api.py +592 -0
  13. revengai/api/functions_ai_decompilation_api.py +2592 -0
  14. revengai/api/functions_block_comments_api.py +849 -0
  15. revengai/api/functions_core_api.py +3430 -0
  16. revengai/api/functions_data_types_api.py +1746 -0
  17. revengai/api/functions_decompilation_api.py +1198 -0
  18. revengai/api/functions_renaming_history_api.py +1151 -0
  19. revengai/api/models_api.py +284 -0
  20. revengai/api/search_api.py +1454 -0
  21. revengai/api_client.py +803 -0
  22. revengai/api_response.py +21 -0
  23. revengai/configuration.py +605 -0
  24. revengai/exceptions.py +215 -0
  25. revengai/models/__init__.py +298 -0
  26. revengai/models/addr.py +143 -0
  27. revengai/models/ai_decompilation_rating.py +37 -0
  28. revengai/models/ai_unstrip_request.py +86 -0
  29. revengai/models/analysis_access_info.py +88 -0
  30. revengai/models/analysis_config.py +106 -0
  31. revengai/models/analysis_create_request.py +131 -0
  32. revengai/models/analysis_create_response.py +88 -0
  33. revengai/models/analysis_detail_response.py +121 -0
  34. revengai/models/analysis_function_mapping.py +90 -0
  35. revengai/models/analysis_function_matching_request.py +110 -0
  36. revengai/models/analysis_functions.py +94 -0
  37. revengai/models/analysis_functions_list.py +94 -0
  38. revengai/models/analysis_record.py +128 -0
  39. revengai/models/analysis_scope.py +36 -0
  40. revengai/models/analysis_strings_response.py +96 -0
  41. revengai/models/analysis_tags.py +94 -0
  42. revengai/models/analysis_update_request.py +108 -0
  43. revengai/models/analysis_update_tags_request.py +86 -0
  44. revengai/models/analysis_update_tags_response.py +94 -0
  45. revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py +38 -0
  46. revengai/models/app_api_rest_v2_analyses_enums_order_by.py +37 -0
  47. revengai/models/app_api_rest_v2_collections_enums_order_by.py +40 -0
  48. revengai/models/app_api_rest_v2_functions_responses_function.py +93 -0
  49. revengai/models/app_api_rest_v2_functions_types_function.py +110 -0
  50. revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py +86 -0
  51. revengai/models/argument.py +99 -0
  52. revengai/models/auto_unstrip_request.py +99 -0
  53. revengai/models/auto_unstrip_response.py +129 -0
  54. revengai/models/base_response.py +124 -0
  55. revengai/models/base_response_analysis_create_response.py +125 -0
  56. revengai/models/base_response_analysis_detail_response.py +125 -0
  57. revengai/models/base_response_analysis_function_mapping.py +125 -0
  58. revengai/models/base_response_analysis_functions.py +125 -0
  59. revengai/models/base_response_analysis_functions_list.py +125 -0
  60. revengai/models/base_response_analysis_strings_response.py +125 -0
  61. revengai/models/base_response_analysis_tags.py +125 -0
  62. revengai/models/base_response_analysis_update_tags_response.py +125 -0
  63. revengai/models/base_response_basic.py +125 -0
  64. revengai/models/base_response_binary_additional_response.py +125 -0
  65. revengai/models/base_response_binary_details_response.py +125 -0
  66. revengai/models/base_response_binary_externals_response.py +125 -0
  67. revengai/models/base_response_binary_search_response.py +125 -0
  68. revengai/models/base_response_block_comments_generation_for_function_response.py +125 -0
  69. revengai/models/base_response_block_comments_overview_generation_response.py +116 -0
  70. revengai/models/base_response_bool.py +121 -0
  71. revengai/models/base_response_callees_caller_functions_response.py +125 -0
  72. revengai/models/base_response_capabilities.py +125 -0
  73. revengai/models/base_response_check_security_checks_task_response.py +125 -0
  74. revengai/models/base_response_child_binaries_response.py +125 -0
  75. revengai/models/base_response_collection_binaries_update_response.py +125 -0
  76. revengai/models/base_response_collection_response.py +125 -0
  77. revengai/models/base_response_collection_search_response.py +125 -0
  78. revengai/models/base_response_collection_tags_update_response.py +125 -0
  79. revengai/models/base_response_comment_response.py +125 -0
  80. revengai/models/base_response_communities.py +125 -0
  81. revengai/models/base_response_created.py +125 -0
  82. revengai/models/base_response_dict.py +121 -0
  83. revengai/models/base_response_dynamic_execution_status.py +125 -0
  84. revengai/models/base_response_external_response.py +125 -0
  85. revengai/models/base_response_function_blocks_response.py +125 -0
  86. revengai/models/base_response_function_capability_response.py +125 -0
  87. revengai/models/base_response_function_data_types.py +125 -0
  88. revengai/models/base_response_function_data_types_list.py +125 -0
  89. revengai/models/base_response_function_search_response.py +125 -0
  90. revengai/models/base_response_function_strings_response.py +125 -0
  91. revengai/models/base_response_function_task_response.py +125 -0
  92. revengai/models/base_response_functions_detail_response.py +125 -0
  93. revengai/models/base_response_generate_function_data_types.py +125 -0
  94. revengai/models/base_response_generation_status_list.py +125 -0
  95. revengai/models/base_response_get_ai_decompilation_rating_response.py +125 -0
  96. revengai/models/base_response_get_ai_decompilation_task.py +125 -0
  97. revengai/models/base_response_get_me_response.py +125 -0
  98. revengai/models/base_response_get_public_user_response.py +125 -0
  99. revengai/models/base_response_list_collection_results.py +125 -0
  100. revengai/models/base_response_list_comment_response.py +129 -0
  101. revengai/models/base_response_list_die_match.py +129 -0
  102. revengai/models/base_response_list_function_name_history.py +129 -0
  103. revengai/models/base_response_list_sbom.py +129 -0
  104. revengai/models/base_response_list_user_activity_response.py +129 -0
  105. revengai/models/base_response_login_response.py +125 -0
  106. revengai/models/base_response_logs.py +125 -0
  107. revengai/models/base_response_models_response.py +125 -0
  108. revengai/models/base_response_network_overview_response.py +125 -0
  109. revengai/models/base_response_params.py +125 -0
  110. revengai/models/base_response_process_dumps.py +125 -0
  111. revengai/models/base_response_process_registry.py +125 -0
  112. revengai/models/base_response_process_tree.py +125 -0
  113. revengai/models/base_response_queued_security_checks_task_response.py +125 -0
  114. revengai/models/base_response_recent.py +125 -0
  115. revengai/models/base_response_security_checks_response.py +125 -0
  116. revengai/models/base_response_status.py +125 -0
  117. revengai/models/base_response_str.py +121 -0
  118. revengai/models/base_response_tag_search_response.py +125 -0
  119. revengai/models/base_response_task_response.py +125 -0
  120. revengai/models/base_response_ttps.py +125 -0
  121. revengai/models/base_response_upload_response.py +125 -0
  122. revengai/models/base_response_vulnerabilities.py +125 -0
  123. revengai/models/basic.py +116 -0
  124. revengai/models/binary_additional_details_data_response.py +112 -0
  125. revengai/models/binary_additional_response.py +105 -0
  126. revengai/models/binary_config.py +108 -0
  127. revengai/models/binary_details_response.py +125 -0
  128. revengai/models/binary_externals_response.py +95 -0
  129. revengai/models/binary_search_response.py +94 -0
  130. revengai/models/binary_search_result.py +108 -0
  131. revengai/models/binary_task_status.py +39 -0
  132. revengai/models/block.py +86 -0
  133. revengai/models/block_comments_generation_for_function_response.py +86 -0
  134. revengai/models/callee_function_info.py +106 -0
  135. revengai/models/callees_caller_functions_response.py +106 -0
  136. revengai/models/caller_function_info.py +106 -0
  137. revengai/models/capabilities.py +94 -0
  138. revengai/models/capability.py +90 -0
  139. revengai/models/check_security_checks_task_response.py +87 -0
  140. revengai/models/child_binaries_response.py +104 -0
  141. revengai/models/code_signature_model.py +98 -0
  142. revengai/models/collection_binaries_update_request.py +86 -0
  143. revengai/models/collection_binaries_update_response.py +94 -0
  144. revengai/models/collection_binary_response.py +97 -0
  145. revengai/models/collection_create_request.py +107 -0
  146. revengai/models/collection_list_item.py +112 -0
  147. revengai/models/collection_response.py +131 -0
  148. revengai/models/collection_response_binaries_inner.py +135 -0
  149. revengai/models/collection_scope.py +38 -0
  150. revengai/models/collection_search_response.py +94 -0
  151. revengai/models/collection_search_result.py +124 -0
  152. revengai/models/collection_tags_update_request.py +86 -0
  153. revengai/models/collection_tags_update_response.py +86 -0
  154. revengai/models/collection_update_request.py +106 -0
  155. revengai/models/comment_base.py +86 -0
  156. revengai/models/comment_response.py +110 -0
  157. revengai/models/comment_update_request.py +86 -0
  158. revengai/models/communities.py +100 -0
  159. revengai/models/community_match_percentages.py +92 -0
  160. revengai/models/confidence_type.py +39 -0
  161. revengai/models/context.py +141 -0
  162. revengai/models/created.py +90 -0
  163. revengai/models/decompilation_comment_context.py +98 -0
  164. revengai/models/die_match.py +92 -0
  165. revengai/models/dynamic_execution_status_input.py +38 -0
  166. revengai/models/elf_dynamic_entry.py +88 -0
  167. revengai/models/elf_import_model.py +88 -0
  168. revengai/models/elf_model.py +179 -0
  169. revengai/models/elf_relocation.py +98 -0
  170. revengai/models/elf_section.py +104 -0
  171. revengai/models/elf_security.py +94 -0
  172. revengai/models/elf_segment.py +102 -0
  173. revengai/models/elf_symbol.py +98 -0
  174. revengai/models/entrypoint_model.py +88 -0
  175. revengai/models/enumeration.py +97 -0
  176. revengai/models/error_model.py +88 -0
  177. revengai/models/export_model.py +88 -0
  178. revengai/models/external_response.py +91 -0
  179. revengai/models/file_format.py +37 -0
  180. revengai/models/file_hashes.py +140 -0
  181. revengai/models/file_metadata.py +96 -0
  182. revengai/models/filters.py +39 -0
  183. revengai/models/function_block_destination_response.py +95 -0
  184. revengai/models/function_block_response.py +109 -0
  185. revengai/models/function_blocks_response.py +121 -0
  186. revengai/models/function_boundary.py +90 -0
  187. revengai/models/function_capability_response.py +86 -0
  188. revengai/models/function_comment_create_request.py +92 -0
  189. revengai/models/function_data_types.py +106 -0
  190. revengai/models/function_data_types_list.py +98 -0
  191. revengai/models/function_data_types_list_item.py +108 -0
  192. revengai/models/function_data_types_params.py +86 -0
  193. revengai/models/function_data_types_status.py +90 -0
  194. revengai/models/function_header.py +112 -0
  195. revengai/models/function_info_input.py +105 -0
  196. revengai/models/function_info_input_func_deps_inner.py +163 -0
  197. revengai/models/function_info_output.py +105 -0
  198. revengai/models/function_list_item.py +96 -0
  199. revengai/models/function_local_variable_response.py +94 -0
  200. revengai/models/function_mapping.py +90 -0
  201. revengai/models/function_mapping_full.py +275 -0
  202. revengai/models/function_match.py +111 -0
  203. revengai/models/function_matching_filters.py +103 -0
  204. revengai/models/function_matching_request.py +114 -0
  205. revengai/models/function_matching_response.py +157 -0
  206. revengai/models/function_name_history.py +99 -0
  207. revengai/models/function_param_response.py +94 -0
  208. revengai/models/function_rename.py +88 -0
  209. revengai/models/function_rename_map.py +90 -0
  210. revengai/models/function_search_response.py +94 -0
  211. revengai/models/function_search_result.py +99 -0
  212. revengai/models/function_source_type.py +39 -0
  213. revengai/models/function_string.py +88 -0
  214. revengai/models/function_strings_response.py +96 -0
  215. revengai/models/function_task_response.py +94 -0
  216. revengai/models/function_task_status.py +39 -0
  217. revengai/models/function_type_input.py +127 -0
  218. revengai/models/function_type_output.py +127 -0
  219. revengai/models/functions_detail_response.py +125 -0
  220. revengai/models/functions_list_rename.py +94 -0
  221. revengai/models/generate_function_data_types.py +94 -0
  222. revengai/models/generation_status_list.py +98 -0
  223. revengai/models/get_ai_decompilation_rating_response.py +94 -0
  224. revengai/models/get_ai_decompilation_task.py +159 -0
  225. revengai/models/get_me_response.py +108 -0
  226. revengai/models/get_public_user_response.py +88 -0
  227. revengai/models/global_variable.py +101 -0
  228. revengai/models/icon_model.py +91 -0
  229. revengai/models/import_model.py +88 -0
  230. revengai/models/inverse_function_map_item.py +99 -0
  231. revengai/models/inverse_string_map_item.py +93 -0
  232. revengai/models/inverse_value.py +86 -0
  233. revengai/models/isa.py +37 -0
  234. revengai/models/list_collection_results.py +94 -0
  235. revengai/models/login_request.py +89 -0
  236. revengai/models/login_response.py +86 -0
  237. revengai/models/logs.py +86 -0
  238. revengai/models/matched_function.py +116 -0
  239. revengai/models/matched_function_suggestion.py +97 -0
  240. revengai/models/meta_model.py +95 -0
  241. revengai/models/model_name.py +40 -0
  242. revengai/models/models_response.py +86 -0
  243. revengai/models/name_confidence.py +89 -0
  244. revengai/models/network_overview_dns.py +98 -0
  245. revengai/models/network_overview_dns_answer.py +88 -0
  246. revengai/models/network_overview_metadata.py +99 -0
  247. revengai/models/network_overview_response.py +104 -0
  248. revengai/models/order.py +36 -0
  249. revengai/models/pagination_model.py +90 -0
  250. revengai/models/params.py +103 -0
  251. revengai/models/pdb_debug_model.py +94 -0
  252. revengai/models/pe_model.py +215 -0
  253. revengai/models/platform.py +36 -0
  254. revengai/models/process.py +103 -0
  255. revengai/models/process_dump.py +96 -0
  256. revengai/models/process_dump_metadata.py +90 -0
  257. revengai/models/process_dumps.py +92 -0
  258. revengai/models/process_dumps_data.py +96 -0
  259. revengai/models/process_registry.py +105 -0
  260. revengai/models/process_tree.py +96 -0
  261. revengai/models/queued_security_checks_task_response.py +86 -0
  262. revengai/models/re_analysis_form.py +101 -0
  263. revengai/models/recent.py +94 -0
  264. revengai/models/registry.py +102 -0
  265. revengai/models/relative_binary_response.py +90 -0
  266. revengai/models/sandbox_options.py +88 -0
  267. revengai/models/sbom.py +96 -0
  268. revengai/models/sbom_package.py +88 -0
  269. revengai/models/scrape_third_party_config.py +86 -0
  270. revengai/models/section_model.py +96 -0
  271. revengai/models/security_checks_response.py +98 -0
  272. revengai/models/security_checks_result.py +103 -0
  273. revengai/models/security_model.py +106 -0
  274. revengai/models/severity_type.py +40 -0
  275. revengai/models/single_code_certificate_model.py +96 -0
  276. revengai/models/single_code_signature_model.py +96 -0
  277. revengai/models/single_pdb_entry_model.py +90 -0
  278. revengai/models/single_section_model.py +98 -0
  279. revengai/models/stack_variable.py +101 -0
  280. revengai/models/status_input.py +40 -0
  281. revengai/models/status_output.py +88 -0
  282. revengai/models/string_functions.py +96 -0
  283. revengai/models/structure.py +117 -0
  284. revengai/models/structure_member.py +99 -0
  285. revengai/models/symbols.py +96 -0
  286. revengai/models/tag.py +86 -0
  287. revengai/models/tag_item.py +95 -0
  288. revengai/models/tag_response.py +88 -0
  289. revengai/models/tag_search_response.py +94 -0
  290. revengai/models/tag_search_result.py +88 -0
  291. revengai/models/task_response.py +94 -0
  292. revengai/models/task_status.py +39 -0
  293. revengai/models/timestamp_model.py +90 -0
  294. revengai/models/ttps.py +92 -0
  295. revengai/models/ttps_attack.py +88 -0
  296. revengai/models/ttps_data.py +96 -0
  297. revengai/models/ttps_element.py +108 -0
  298. revengai/models/ttps_occurance.py +88 -0
  299. revengai/models/type_definition.py +97 -0
  300. revengai/models/update_function_data_types.py +92 -0
  301. revengai/models/upload_file_type.py +38 -0
  302. revengai/models/upload_response.py +91 -0
  303. revengai/models/upsert_ai_decomplation_rating_request.py +94 -0
  304. revengai/models/user_activity_response.py +97 -0
  305. revengai/models/vulnerabilities.py +94 -0
  306. revengai/models/vulnerability.py +113 -0
  307. revengai/models/vulnerability_type.py +40 -0
  308. revengai/models/workspace.py +37 -0
  309. revengai/py.typed +0 -0
  310. revengai/rest.py +257 -0
  311. revengai-2.74.0.dist-info/METADATA +447 -0
  312. revengai-2.74.0.dist-info/RECORD +314 -0
  313. revengai-2.74.0.dist-info/WHEEL +4 -0
  314. revengai-2.74.0.dist-info/licenses/LICENSE.md +19 -0
@@ -0,0 +1,1323 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ RevEng.AI API
5
+
6
+ RevEng.AI is Similarity Search Engine for executable binaries
7
+
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import StrictInt
19
+ from revengai.models.base_response_get_me_response import BaseResponseGetMeResponse
20
+ from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse
21
+ from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse
22
+ from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse
23
+ from revengai.models.base_response_login_response import BaseResponseLoginResponse
24
+ from revengai.models.login_request import LoginRequest
25
+
26
+ from revengai.api_client import ApiClient, RequestSerialized
27
+ from revengai.api_response import ApiResponse
28
+ from revengai.rest import RESTResponseType
29
+
30
+
31
+ class AuthenticationUsersApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def get_requester_user_info(
46
+ self,
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Annotated[StrictFloat, Field(gt=0)]
53
+ ]
54
+ ] = None,
55
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
+ _content_type: Optional[StrictStr] = None,
57
+ _headers: Optional[Dict[StrictStr, Any]] = None,
58
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
+ ) -> BaseResponseGetMeResponse:
60
+ """Get the requesters user information
61
+
62
+
63
+ :param _request_timeout: timeout setting for this request. If one
64
+ number provided, it will be total request
65
+ timeout. It can also be a pair (tuple) of
66
+ (connection, read) timeouts.
67
+ :type _request_timeout: int, tuple(int, int), optional
68
+ :param _request_auth: set to override the auth_settings for an a single
69
+ request; this effectively ignores the
70
+ authentication in the spec for a single request.
71
+ :type _request_auth: dict, optional
72
+ :param _content_type: force content-type for the request.
73
+ :type _content_type: str, Optional
74
+ :param _headers: set to override the headers for a single
75
+ request; this effectively ignores the headers
76
+ in the spec for a single request.
77
+ :type _headers: dict, optional
78
+ :param _host_index: set to override the host_index for a single
79
+ request; this effectively ignores the host_index
80
+ in the spec for a single request.
81
+ :type _host_index: int, optional
82
+ :return: Returns the result object.
83
+ """ # noqa: E501
84
+
85
+ _param = self._get_requester_user_info_serialize(
86
+ _request_auth=_request_auth,
87
+ _content_type=_content_type,
88
+ _headers=_headers,
89
+ _host_index=_host_index
90
+ )
91
+
92
+ _response_types_map: Dict[str, Optional[str]] = {
93
+ '200': "BaseResponseGetMeResponse",
94
+ '422': "BaseResponse",
95
+ }
96
+ response_data = self.api_client.call_api(
97
+ *_param,
98
+ _request_timeout=_request_timeout
99
+ )
100
+ response_data.read()
101
+ return self.api_client.response_deserialize(
102
+ response_data=response_data,
103
+ response_types_map=_response_types_map,
104
+ ).data
105
+
106
+
107
+ @validate_call
108
+ def get_requester_user_info_with_http_info(
109
+ self,
110
+ _request_timeout: Union[
111
+ None,
112
+ Annotated[StrictFloat, Field(gt=0)],
113
+ Tuple[
114
+ Annotated[StrictFloat, Field(gt=0)],
115
+ Annotated[StrictFloat, Field(gt=0)]
116
+ ]
117
+ ] = None,
118
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
119
+ _content_type: Optional[StrictStr] = None,
120
+ _headers: Optional[Dict[StrictStr, Any]] = None,
121
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
122
+ ) -> ApiResponse[BaseResponseGetMeResponse]:
123
+ """Get the requesters user information
124
+
125
+
126
+ :param _request_timeout: timeout setting for this request. If one
127
+ number provided, it will be total request
128
+ timeout. It can also be a pair (tuple) of
129
+ (connection, read) timeouts.
130
+ :type _request_timeout: int, tuple(int, int), optional
131
+ :param _request_auth: set to override the auth_settings for an a single
132
+ request; this effectively ignores the
133
+ authentication in the spec for a single request.
134
+ :type _request_auth: dict, optional
135
+ :param _content_type: force content-type for the request.
136
+ :type _content_type: str, Optional
137
+ :param _headers: set to override the headers for a single
138
+ request; this effectively ignores the headers
139
+ in the spec for a single request.
140
+ :type _headers: dict, optional
141
+ :param _host_index: set to override the host_index for a single
142
+ request; this effectively ignores the host_index
143
+ in the spec for a single request.
144
+ :type _host_index: int, optional
145
+ :return: Returns the result object.
146
+ """ # noqa: E501
147
+
148
+ _param = self._get_requester_user_info_serialize(
149
+ _request_auth=_request_auth,
150
+ _content_type=_content_type,
151
+ _headers=_headers,
152
+ _host_index=_host_index
153
+ )
154
+
155
+ _response_types_map: Dict[str, Optional[str]] = {
156
+ '200': "BaseResponseGetMeResponse",
157
+ '422': "BaseResponse",
158
+ }
159
+ response_data = self.api_client.call_api(
160
+ *_param,
161
+ _request_timeout=_request_timeout
162
+ )
163
+ response_data.read()
164
+ return self.api_client.response_deserialize(
165
+ response_data=response_data,
166
+ response_types_map=_response_types_map,
167
+ )
168
+
169
+
170
+ @validate_call
171
+ def get_requester_user_info_without_preload_content(
172
+ self,
173
+ _request_timeout: Union[
174
+ None,
175
+ Annotated[StrictFloat, Field(gt=0)],
176
+ Tuple[
177
+ Annotated[StrictFloat, Field(gt=0)],
178
+ Annotated[StrictFloat, Field(gt=0)]
179
+ ]
180
+ ] = None,
181
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
182
+ _content_type: Optional[StrictStr] = None,
183
+ _headers: Optional[Dict[StrictStr, Any]] = None,
184
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
185
+ ) -> RESTResponseType:
186
+ """Get the requesters user information
187
+
188
+
189
+ :param _request_timeout: timeout setting for this request. If one
190
+ number provided, it will be total request
191
+ timeout. It can also be a pair (tuple) of
192
+ (connection, read) timeouts.
193
+ :type _request_timeout: int, tuple(int, int), optional
194
+ :param _request_auth: set to override the auth_settings for an a single
195
+ request; this effectively ignores the
196
+ authentication in the spec for a single request.
197
+ :type _request_auth: dict, optional
198
+ :param _content_type: force content-type for the request.
199
+ :type _content_type: str, Optional
200
+ :param _headers: set to override the headers for a single
201
+ request; this effectively ignores the headers
202
+ in the spec for a single request.
203
+ :type _headers: dict, optional
204
+ :param _host_index: set to override the host_index for a single
205
+ request; this effectively ignores the host_index
206
+ in the spec for a single request.
207
+ :type _host_index: int, optional
208
+ :return: Returns the result object.
209
+ """ # noqa: E501
210
+
211
+ _param = self._get_requester_user_info_serialize(
212
+ _request_auth=_request_auth,
213
+ _content_type=_content_type,
214
+ _headers=_headers,
215
+ _host_index=_host_index
216
+ )
217
+
218
+ _response_types_map: Dict[str, Optional[str]] = {
219
+ '200': "BaseResponseGetMeResponse",
220
+ '422': "BaseResponse",
221
+ }
222
+ response_data = self.api_client.call_api(
223
+ *_param,
224
+ _request_timeout=_request_timeout
225
+ )
226
+ return response_data.response
227
+
228
+
229
+ def _get_requester_user_info_serialize(
230
+ self,
231
+ _request_auth,
232
+ _content_type,
233
+ _headers,
234
+ _host_index,
235
+ ) -> RequestSerialized:
236
+
237
+ _host = None
238
+
239
+ _collection_formats: Dict[str, str] = {
240
+ }
241
+
242
+ _path_params: Dict[str, str] = {}
243
+ _query_params: List[Tuple[str, str]] = []
244
+ _header_params: Dict[str, Optional[str]] = _headers or {}
245
+ _form_params: List[Tuple[str, str]] = []
246
+ _files: Dict[
247
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
248
+ ] = {}
249
+ _body_params: Optional[bytes] = None
250
+
251
+ # process the path parameters
252
+ # process the query parameters
253
+ # process the header parameters
254
+ # process the form parameters
255
+ # process the body parameter
256
+
257
+
258
+ # set the HTTP header `Accept`
259
+ if 'Accept' not in _header_params:
260
+ _header_params['Accept'] = self.api_client.select_header_accept(
261
+ [
262
+ 'application/json'
263
+ ]
264
+ )
265
+
266
+
267
+ # authentication setting
268
+ _auth_settings: List[str] = [
269
+ 'APIKey'
270
+ ]
271
+
272
+ return self.api_client.param_serialize(
273
+ method='GET',
274
+ resource_path='/v2/users/me',
275
+ path_params=_path_params,
276
+ query_params=_query_params,
277
+ header_params=_header_params,
278
+ body=_body_params,
279
+ post_params=_form_params,
280
+ files=_files,
281
+ auth_settings=_auth_settings,
282
+ collection_formats=_collection_formats,
283
+ _host=_host,
284
+ _request_auth=_request_auth
285
+ )
286
+
287
+
288
+
289
+
290
+ @validate_call
291
+ def get_user(
292
+ self,
293
+ user_id: StrictInt,
294
+ _request_timeout: Union[
295
+ None,
296
+ Annotated[StrictFloat, Field(gt=0)],
297
+ Tuple[
298
+ Annotated[StrictFloat, Field(gt=0)],
299
+ Annotated[StrictFloat, Field(gt=0)]
300
+ ]
301
+ ] = None,
302
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
303
+ _content_type: Optional[StrictStr] = None,
304
+ _headers: Optional[Dict[StrictStr, Any]] = None,
305
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
306
+ ) -> BaseResponseGetPublicUserResponse:
307
+ """Get a user's public information
308
+
309
+
310
+ :param user_id: (required)
311
+ :type user_id: int
312
+ :param _request_timeout: timeout setting for this request. If one
313
+ number provided, it will be total request
314
+ timeout. It can also be a pair (tuple) of
315
+ (connection, read) timeouts.
316
+ :type _request_timeout: int, tuple(int, int), optional
317
+ :param _request_auth: set to override the auth_settings for an a single
318
+ request; this effectively ignores the
319
+ authentication in the spec for a single request.
320
+ :type _request_auth: dict, optional
321
+ :param _content_type: force content-type for the request.
322
+ :type _content_type: str, Optional
323
+ :param _headers: set to override the headers for a single
324
+ request; this effectively ignores the headers
325
+ in the spec for a single request.
326
+ :type _headers: dict, optional
327
+ :param _host_index: set to override the host_index for a single
328
+ request; this effectively ignores the host_index
329
+ in the spec for a single request.
330
+ :type _host_index: int, optional
331
+ :return: Returns the result object.
332
+ """ # noqa: E501
333
+
334
+ _param = self._get_user_serialize(
335
+ user_id=user_id,
336
+ _request_auth=_request_auth,
337
+ _content_type=_content_type,
338
+ _headers=_headers,
339
+ _host_index=_host_index
340
+ )
341
+
342
+ _response_types_map: Dict[str, Optional[str]] = {
343
+ '200': "BaseResponseGetPublicUserResponse",
344
+ '422': "BaseResponse",
345
+ }
346
+ response_data = self.api_client.call_api(
347
+ *_param,
348
+ _request_timeout=_request_timeout
349
+ )
350
+ response_data.read()
351
+ return self.api_client.response_deserialize(
352
+ response_data=response_data,
353
+ response_types_map=_response_types_map,
354
+ ).data
355
+
356
+
357
+ @validate_call
358
+ def get_user_with_http_info(
359
+ self,
360
+ user_id: StrictInt,
361
+ _request_timeout: Union[
362
+ None,
363
+ Annotated[StrictFloat, Field(gt=0)],
364
+ Tuple[
365
+ Annotated[StrictFloat, Field(gt=0)],
366
+ Annotated[StrictFloat, Field(gt=0)]
367
+ ]
368
+ ] = None,
369
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
370
+ _content_type: Optional[StrictStr] = None,
371
+ _headers: Optional[Dict[StrictStr, Any]] = None,
372
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
373
+ ) -> ApiResponse[BaseResponseGetPublicUserResponse]:
374
+ """Get a user's public information
375
+
376
+
377
+ :param user_id: (required)
378
+ :type user_id: int
379
+ :param _request_timeout: timeout setting for this request. If one
380
+ number provided, it will be total request
381
+ timeout. It can also be a pair (tuple) of
382
+ (connection, read) timeouts.
383
+ :type _request_timeout: int, tuple(int, int), optional
384
+ :param _request_auth: set to override the auth_settings for an a single
385
+ request; this effectively ignores the
386
+ authentication in the spec for a single request.
387
+ :type _request_auth: dict, optional
388
+ :param _content_type: force content-type for the request.
389
+ :type _content_type: str, Optional
390
+ :param _headers: set to override the headers for a single
391
+ request; this effectively ignores the headers
392
+ in the spec for a single request.
393
+ :type _headers: dict, optional
394
+ :param _host_index: set to override the host_index for a single
395
+ request; this effectively ignores the host_index
396
+ in the spec for a single request.
397
+ :type _host_index: int, optional
398
+ :return: Returns the result object.
399
+ """ # noqa: E501
400
+
401
+ _param = self._get_user_serialize(
402
+ user_id=user_id,
403
+ _request_auth=_request_auth,
404
+ _content_type=_content_type,
405
+ _headers=_headers,
406
+ _host_index=_host_index
407
+ )
408
+
409
+ _response_types_map: Dict[str, Optional[str]] = {
410
+ '200': "BaseResponseGetPublicUserResponse",
411
+ '422': "BaseResponse",
412
+ }
413
+ response_data = self.api_client.call_api(
414
+ *_param,
415
+ _request_timeout=_request_timeout
416
+ )
417
+ response_data.read()
418
+ return self.api_client.response_deserialize(
419
+ response_data=response_data,
420
+ response_types_map=_response_types_map,
421
+ )
422
+
423
+
424
+ @validate_call
425
+ def get_user_without_preload_content(
426
+ self,
427
+ user_id: StrictInt,
428
+ _request_timeout: Union[
429
+ None,
430
+ Annotated[StrictFloat, Field(gt=0)],
431
+ Tuple[
432
+ Annotated[StrictFloat, Field(gt=0)],
433
+ Annotated[StrictFloat, Field(gt=0)]
434
+ ]
435
+ ] = None,
436
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
437
+ _content_type: Optional[StrictStr] = None,
438
+ _headers: Optional[Dict[StrictStr, Any]] = None,
439
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
440
+ ) -> RESTResponseType:
441
+ """Get a user's public information
442
+
443
+
444
+ :param user_id: (required)
445
+ :type user_id: int
446
+ :param _request_timeout: timeout setting for this request. If one
447
+ number provided, it will be total request
448
+ timeout. It can also be a pair (tuple) of
449
+ (connection, read) timeouts.
450
+ :type _request_timeout: int, tuple(int, int), optional
451
+ :param _request_auth: set to override the auth_settings for an a single
452
+ request; this effectively ignores the
453
+ authentication in the spec for a single request.
454
+ :type _request_auth: dict, optional
455
+ :param _content_type: force content-type for the request.
456
+ :type _content_type: str, Optional
457
+ :param _headers: set to override the headers for a single
458
+ request; this effectively ignores the headers
459
+ in the spec for a single request.
460
+ :type _headers: dict, optional
461
+ :param _host_index: set to override the host_index for a single
462
+ request; this effectively ignores the host_index
463
+ in the spec for a single request.
464
+ :type _host_index: int, optional
465
+ :return: Returns the result object.
466
+ """ # noqa: E501
467
+
468
+ _param = self._get_user_serialize(
469
+ user_id=user_id,
470
+ _request_auth=_request_auth,
471
+ _content_type=_content_type,
472
+ _headers=_headers,
473
+ _host_index=_host_index
474
+ )
475
+
476
+ _response_types_map: Dict[str, Optional[str]] = {
477
+ '200': "BaseResponseGetPublicUserResponse",
478
+ '422': "BaseResponse",
479
+ }
480
+ response_data = self.api_client.call_api(
481
+ *_param,
482
+ _request_timeout=_request_timeout
483
+ )
484
+ return response_data.response
485
+
486
+
487
+ def _get_user_serialize(
488
+ self,
489
+ user_id,
490
+ _request_auth,
491
+ _content_type,
492
+ _headers,
493
+ _host_index,
494
+ ) -> RequestSerialized:
495
+
496
+ _host = None
497
+
498
+ _collection_formats: Dict[str, str] = {
499
+ }
500
+
501
+ _path_params: Dict[str, str] = {}
502
+ _query_params: List[Tuple[str, str]] = []
503
+ _header_params: Dict[str, Optional[str]] = _headers or {}
504
+ _form_params: List[Tuple[str, str]] = []
505
+ _files: Dict[
506
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
507
+ ] = {}
508
+ _body_params: Optional[bytes] = None
509
+
510
+ # process the path parameters
511
+ if user_id is not None:
512
+ _path_params['user_id'] = user_id
513
+ # process the query parameters
514
+ # process the header parameters
515
+ # process the form parameters
516
+ # process the body parameter
517
+
518
+
519
+ # set the HTTP header `Accept`
520
+ if 'Accept' not in _header_params:
521
+ _header_params['Accept'] = self.api_client.select_header_accept(
522
+ [
523
+ 'application/json'
524
+ ]
525
+ )
526
+
527
+
528
+ # authentication setting
529
+ _auth_settings: List[str] = [
530
+ 'APIKey'
531
+ ]
532
+
533
+ return self.api_client.param_serialize(
534
+ method='GET',
535
+ resource_path='/v2/users/{user_id}',
536
+ path_params=_path_params,
537
+ query_params=_query_params,
538
+ header_params=_header_params,
539
+ body=_body_params,
540
+ post_params=_form_params,
541
+ files=_files,
542
+ auth_settings=_auth_settings,
543
+ collection_formats=_collection_formats,
544
+ _host=_host,
545
+ _request_auth=_request_auth
546
+ )
547
+
548
+
549
+
550
+
551
+ @validate_call
552
+ def get_user_activity(
553
+ self,
554
+ _request_timeout: Union[
555
+ None,
556
+ Annotated[StrictFloat, Field(gt=0)],
557
+ Tuple[
558
+ Annotated[StrictFloat, Field(gt=0)],
559
+ Annotated[StrictFloat, Field(gt=0)]
560
+ ]
561
+ ] = None,
562
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
563
+ _content_type: Optional[StrictStr] = None,
564
+ _headers: Optional[Dict[StrictStr, Any]] = None,
565
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
566
+ ) -> BaseResponseListUserActivityResponse:
567
+ """Get auth user activity
568
+
569
+
570
+ :param _request_timeout: timeout setting for this request. If one
571
+ number provided, it will be total request
572
+ timeout. It can also be a pair (tuple) of
573
+ (connection, read) timeouts.
574
+ :type _request_timeout: int, tuple(int, int), optional
575
+ :param _request_auth: set to override the auth_settings for an a single
576
+ request; this effectively ignores the
577
+ authentication in the spec for a single request.
578
+ :type _request_auth: dict, optional
579
+ :param _content_type: force content-type for the request.
580
+ :type _content_type: str, Optional
581
+ :param _headers: set to override the headers for a single
582
+ request; this effectively ignores the headers
583
+ in the spec for a single request.
584
+ :type _headers: dict, optional
585
+ :param _host_index: set to override the host_index for a single
586
+ request; this effectively ignores the host_index
587
+ in the spec for a single request.
588
+ :type _host_index: int, optional
589
+ :return: Returns the result object.
590
+ """ # noqa: E501
591
+
592
+ _param = self._get_user_activity_serialize(
593
+ _request_auth=_request_auth,
594
+ _content_type=_content_type,
595
+ _headers=_headers,
596
+ _host_index=_host_index
597
+ )
598
+
599
+ _response_types_map: Dict[str, Optional[str]] = {
600
+ '200': "BaseResponseListUserActivityResponse",
601
+ '422': "BaseResponse",
602
+ }
603
+ response_data = self.api_client.call_api(
604
+ *_param,
605
+ _request_timeout=_request_timeout
606
+ )
607
+ response_data.read()
608
+ return self.api_client.response_deserialize(
609
+ response_data=response_data,
610
+ response_types_map=_response_types_map,
611
+ ).data
612
+
613
+
614
+ @validate_call
615
+ def get_user_activity_with_http_info(
616
+ self,
617
+ _request_timeout: Union[
618
+ None,
619
+ Annotated[StrictFloat, Field(gt=0)],
620
+ Tuple[
621
+ Annotated[StrictFloat, Field(gt=0)],
622
+ Annotated[StrictFloat, Field(gt=0)]
623
+ ]
624
+ ] = None,
625
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
626
+ _content_type: Optional[StrictStr] = None,
627
+ _headers: Optional[Dict[StrictStr, Any]] = None,
628
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
629
+ ) -> ApiResponse[BaseResponseListUserActivityResponse]:
630
+ """Get auth user activity
631
+
632
+
633
+ :param _request_timeout: timeout setting for this request. If one
634
+ number provided, it will be total request
635
+ timeout. It can also be a pair (tuple) of
636
+ (connection, read) timeouts.
637
+ :type _request_timeout: int, tuple(int, int), optional
638
+ :param _request_auth: set to override the auth_settings for an a single
639
+ request; this effectively ignores the
640
+ authentication in the spec for a single request.
641
+ :type _request_auth: dict, optional
642
+ :param _content_type: force content-type for the request.
643
+ :type _content_type: str, Optional
644
+ :param _headers: set to override the headers for a single
645
+ request; this effectively ignores the headers
646
+ in the spec for a single request.
647
+ :type _headers: dict, optional
648
+ :param _host_index: set to override the host_index for a single
649
+ request; this effectively ignores the host_index
650
+ in the spec for a single request.
651
+ :type _host_index: int, optional
652
+ :return: Returns the result object.
653
+ """ # noqa: E501
654
+
655
+ _param = self._get_user_activity_serialize(
656
+ _request_auth=_request_auth,
657
+ _content_type=_content_type,
658
+ _headers=_headers,
659
+ _host_index=_host_index
660
+ )
661
+
662
+ _response_types_map: Dict[str, Optional[str]] = {
663
+ '200': "BaseResponseListUserActivityResponse",
664
+ '422': "BaseResponse",
665
+ }
666
+ response_data = self.api_client.call_api(
667
+ *_param,
668
+ _request_timeout=_request_timeout
669
+ )
670
+ response_data.read()
671
+ return self.api_client.response_deserialize(
672
+ response_data=response_data,
673
+ response_types_map=_response_types_map,
674
+ )
675
+
676
+
677
+ @validate_call
678
+ def get_user_activity_without_preload_content(
679
+ self,
680
+ _request_timeout: Union[
681
+ None,
682
+ Annotated[StrictFloat, Field(gt=0)],
683
+ Tuple[
684
+ Annotated[StrictFloat, Field(gt=0)],
685
+ Annotated[StrictFloat, Field(gt=0)]
686
+ ]
687
+ ] = None,
688
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
689
+ _content_type: Optional[StrictStr] = None,
690
+ _headers: Optional[Dict[StrictStr, Any]] = None,
691
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
692
+ ) -> RESTResponseType:
693
+ """Get auth user activity
694
+
695
+
696
+ :param _request_timeout: timeout setting for this request. If one
697
+ number provided, it will be total request
698
+ timeout. It can also be a pair (tuple) of
699
+ (connection, read) timeouts.
700
+ :type _request_timeout: int, tuple(int, int), optional
701
+ :param _request_auth: set to override the auth_settings for an a single
702
+ request; this effectively ignores the
703
+ authentication in the spec for a single request.
704
+ :type _request_auth: dict, optional
705
+ :param _content_type: force content-type for the request.
706
+ :type _content_type: str, Optional
707
+ :param _headers: set to override the headers for a single
708
+ request; this effectively ignores the headers
709
+ in the spec for a single request.
710
+ :type _headers: dict, optional
711
+ :param _host_index: set to override the host_index for a single
712
+ request; this effectively ignores the host_index
713
+ in the spec for a single request.
714
+ :type _host_index: int, optional
715
+ :return: Returns the result object.
716
+ """ # noqa: E501
717
+
718
+ _param = self._get_user_activity_serialize(
719
+ _request_auth=_request_auth,
720
+ _content_type=_content_type,
721
+ _headers=_headers,
722
+ _host_index=_host_index
723
+ )
724
+
725
+ _response_types_map: Dict[str, Optional[str]] = {
726
+ '200': "BaseResponseListUserActivityResponse",
727
+ '422': "BaseResponse",
728
+ }
729
+ response_data = self.api_client.call_api(
730
+ *_param,
731
+ _request_timeout=_request_timeout
732
+ )
733
+ return response_data.response
734
+
735
+
736
+ def _get_user_activity_serialize(
737
+ self,
738
+ _request_auth,
739
+ _content_type,
740
+ _headers,
741
+ _host_index,
742
+ ) -> RequestSerialized:
743
+
744
+ _host = None
745
+
746
+ _collection_formats: Dict[str, str] = {
747
+ }
748
+
749
+ _path_params: Dict[str, str] = {}
750
+ _query_params: List[Tuple[str, str]] = []
751
+ _header_params: Dict[str, Optional[str]] = _headers or {}
752
+ _form_params: List[Tuple[str, str]] = []
753
+ _files: Dict[
754
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
755
+ ] = {}
756
+ _body_params: Optional[bytes] = None
757
+
758
+ # process the path parameters
759
+ # process the query parameters
760
+ # process the header parameters
761
+ # process the form parameters
762
+ # process the body parameter
763
+
764
+
765
+ # set the HTTP header `Accept`
766
+ if 'Accept' not in _header_params:
767
+ _header_params['Accept'] = self.api_client.select_header_accept(
768
+ [
769
+ 'application/json'
770
+ ]
771
+ )
772
+
773
+
774
+ # authentication setting
775
+ _auth_settings: List[str] = [
776
+ 'APIKey'
777
+ ]
778
+
779
+ return self.api_client.param_serialize(
780
+ method='GET',
781
+ resource_path='/v2/users/activity',
782
+ path_params=_path_params,
783
+ query_params=_query_params,
784
+ header_params=_header_params,
785
+ body=_body_params,
786
+ post_params=_form_params,
787
+ files=_files,
788
+ auth_settings=_auth_settings,
789
+ collection_formats=_collection_formats,
790
+ _host=_host,
791
+ _request_auth=_request_auth
792
+ )
793
+
794
+
795
+
796
+
797
+ @validate_call
798
+ def get_user_comments(
799
+ self,
800
+ _request_timeout: Union[
801
+ None,
802
+ Annotated[StrictFloat, Field(gt=0)],
803
+ Tuple[
804
+ Annotated[StrictFloat, Field(gt=0)],
805
+ Annotated[StrictFloat, Field(gt=0)]
806
+ ]
807
+ ] = None,
808
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
809
+ _content_type: Optional[StrictStr] = None,
810
+ _headers: Optional[Dict[StrictStr, Any]] = None,
811
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
812
+ ) -> BaseResponseListCommentResponse:
813
+ """Get comments by user
814
+
815
+ Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to.
816
+
817
+ :param _request_timeout: timeout setting for this request. If one
818
+ number provided, it will be total request
819
+ timeout. It can also be a pair (tuple) of
820
+ (connection, read) timeouts.
821
+ :type _request_timeout: int, tuple(int, int), optional
822
+ :param _request_auth: set to override the auth_settings for an a single
823
+ request; this effectively ignores the
824
+ authentication in the spec for a single request.
825
+ :type _request_auth: dict, optional
826
+ :param _content_type: force content-type for the request.
827
+ :type _content_type: str, Optional
828
+ :param _headers: set to override the headers for a single
829
+ request; this effectively ignores the headers
830
+ in the spec for a single request.
831
+ :type _headers: dict, optional
832
+ :param _host_index: set to override the host_index for a single
833
+ request; this effectively ignores the host_index
834
+ in the spec for a single request.
835
+ :type _host_index: int, optional
836
+ :return: Returns the result object.
837
+ """ # noqa: E501
838
+
839
+ _param = self._get_user_comments_serialize(
840
+ _request_auth=_request_auth,
841
+ _content_type=_content_type,
842
+ _headers=_headers,
843
+ _host_index=_host_index
844
+ )
845
+
846
+ _response_types_map: Dict[str, Optional[str]] = {
847
+ '200': "BaseResponseListCommentResponse",
848
+ '422': "BaseResponse",
849
+ }
850
+ response_data = self.api_client.call_api(
851
+ *_param,
852
+ _request_timeout=_request_timeout
853
+ )
854
+ response_data.read()
855
+ return self.api_client.response_deserialize(
856
+ response_data=response_data,
857
+ response_types_map=_response_types_map,
858
+ ).data
859
+
860
+
861
+ @validate_call
862
+ def get_user_comments_with_http_info(
863
+ self,
864
+ _request_timeout: Union[
865
+ None,
866
+ Annotated[StrictFloat, Field(gt=0)],
867
+ Tuple[
868
+ Annotated[StrictFloat, Field(gt=0)],
869
+ Annotated[StrictFloat, Field(gt=0)]
870
+ ]
871
+ ] = None,
872
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
873
+ _content_type: Optional[StrictStr] = None,
874
+ _headers: Optional[Dict[StrictStr, Any]] = None,
875
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
876
+ ) -> ApiResponse[BaseResponseListCommentResponse]:
877
+ """Get comments by user
878
+
879
+ Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to.
880
+
881
+ :param _request_timeout: timeout setting for this request. If one
882
+ number provided, it will be total request
883
+ timeout. It can also be a pair (tuple) of
884
+ (connection, read) timeouts.
885
+ :type _request_timeout: int, tuple(int, int), optional
886
+ :param _request_auth: set to override the auth_settings for an a single
887
+ request; this effectively ignores the
888
+ authentication in the spec for a single request.
889
+ :type _request_auth: dict, optional
890
+ :param _content_type: force content-type for the request.
891
+ :type _content_type: str, Optional
892
+ :param _headers: set to override the headers for a single
893
+ request; this effectively ignores the headers
894
+ in the spec for a single request.
895
+ :type _headers: dict, optional
896
+ :param _host_index: set to override the host_index for a single
897
+ request; this effectively ignores the host_index
898
+ in the spec for a single request.
899
+ :type _host_index: int, optional
900
+ :return: Returns the result object.
901
+ """ # noqa: E501
902
+
903
+ _param = self._get_user_comments_serialize(
904
+ _request_auth=_request_auth,
905
+ _content_type=_content_type,
906
+ _headers=_headers,
907
+ _host_index=_host_index
908
+ )
909
+
910
+ _response_types_map: Dict[str, Optional[str]] = {
911
+ '200': "BaseResponseListCommentResponse",
912
+ '422': "BaseResponse",
913
+ }
914
+ response_data = self.api_client.call_api(
915
+ *_param,
916
+ _request_timeout=_request_timeout
917
+ )
918
+ response_data.read()
919
+ return self.api_client.response_deserialize(
920
+ response_data=response_data,
921
+ response_types_map=_response_types_map,
922
+ )
923
+
924
+
925
+ @validate_call
926
+ def get_user_comments_without_preload_content(
927
+ self,
928
+ _request_timeout: Union[
929
+ None,
930
+ Annotated[StrictFloat, Field(gt=0)],
931
+ Tuple[
932
+ Annotated[StrictFloat, Field(gt=0)],
933
+ Annotated[StrictFloat, Field(gt=0)]
934
+ ]
935
+ ] = None,
936
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
937
+ _content_type: Optional[StrictStr] = None,
938
+ _headers: Optional[Dict[StrictStr, Any]] = None,
939
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
940
+ ) -> RESTResponseType:
941
+ """Get comments by user
942
+
943
+ Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to.
944
+
945
+ :param _request_timeout: timeout setting for this request. If one
946
+ number provided, it will be total request
947
+ timeout. It can also be a pair (tuple) of
948
+ (connection, read) timeouts.
949
+ :type _request_timeout: int, tuple(int, int), optional
950
+ :param _request_auth: set to override the auth_settings for an a single
951
+ request; this effectively ignores the
952
+ authentication in the spec for a single request.
953
+ :type _request_auth: dict, optional
954
+ :param _content_type: force content-type for the request.
955
+ :type _content_type: str, Optional
956
+ :param _headers: set to override the headers for a single
957
+ request; this effectively ignores the headers
958
+ in the spec for a single request.
959
+ :type _headers: dict, optional
960
+ :param _host_index: set to override the host_index for a single
961
+ request; this effectively ignores the host_index
962
+ in the spec for a single request.
963
+ :type _host_index: int, optional
964
+ :return: Returns the result object.
965
+ """ # noqa: E501
966
+
967
+ _param = self._get_user_comments_serialize(
968
+ _request_auth=_request_auth,
969
+ _content_type=_content_type,
970
+ _headers=_headers,
971
+ _host_index=_host_index
972
+ )
973
+
974
+ _response_types_map: Dict[str, Optional[str]] = {
975
+ '200': "BaseResponseListCommentResponse",
976
+ '422': "BaseResponse",
977
+ }
978
+ response_data = self.api_client.call_api(
979
+ *_param,
980
+ _request_timeout=_request_timeout
981
+ )
982
+ return response_data.response
983
+
984
+
985
+ def _get_user_comments_serialize(
986
+ self,
987
+ _request_auth,
988
+ _content_type,
989
+ _headers,
990
+ _host_index,
991
+ ) -> RequestSerialized:
992
+
993
+ _host = None
994
+
995
+ _collection_formats: Dict[str, str] = {
996
+ }
997
+
998
+ _path_params: Dict[str, str] = {}
999
+ _query_params: List[Tuple[str, str]] = []
1000
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1001
+ _form_params: List[Tuple[str, str]] = []
1002
+ _files: Dict[
1003
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1004
+ ] = {}
1005
+ _body_params: Optional[bytes] = None
1006
+
1007
+ # process the path parameters
1008
+ # process the query parameters
1009
+ # process the header parameters
1010
+ # process the form parameters
1011
+ # process the body parameter
1012
+
1013
+
1014
+ # set the HTTP header `Accept`
1015
+ if 'Accept' not in _header_params:
1016
+ _header_params['Accept'] = self.api_client.select_header_accept(
1017
+ [
1018
+ 'application/json'
1019
+ ]
1020
+ )
1021
+
1022
+
1023
+ # authentication setting
1024
+ _auth_settings: List[str] = [
1025
+ 'APIKey'
1026
+ ]
1027
+
1028
+ return self.api_client.param_serialize(
1029
+ method='GET',
1030
+ resource_path='/v2/users/me/comments',
1031
+ path_params=_path_params,
1032
+ query_params=_query_params,
1033
+ header_params=_header_params,
1034
+ body=_body_params,
1035
+ post_params=_form_params,
1036
+ files=_files,
1037
+ auth_settings=_auth_settings,
1038
+ collection_formats=_collection_formats,
1039
+ _host=_host,
1040
+ _request_auth=_request_auth
1041
+ )
1042
+
1043
+
1044
+
1045
+
1046
+ @validate_call
1047
+ def login_user(
1048
+ self,
1049
+ login_request: LoginRequest,
1050
+ _request_timeout: Union[
1051
+ None,
1052
+ Annotated[StrictFloat, Field(gt=0)],
1053
+ Tuple[
1054
+ Annotated[StrictFloat, Field(gt=0)],
1055
+ Annotated[StrictFloat, Field(gt=0)]
1056
+ ]
1057
+ ] = None,
1058
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1059
+ _content_type: Optional[StrictStr] = None,
1060
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1061
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1062
+ ) -> BaseResponseLoginResponse:
1063
+ """Authenticate a user
1064
+
1065
+ Authenticates a user and returns a token.
1066
+
1067
+ :param login_request: (required)
1068
+ :type login_request: LoginRequest
1069
+ :param _request_timeout: timeout setting for this request. If one
1070
+ number provided, it will be total request
1071
+ timeout. It can also be a pair (tuple) of
1072
+ (connection, read) timeouts.
1073
+ :type _request_timeout: int, tuple(int, int), optional
1074
+ :param _request_auth: set to override the auth_settings for an a single
1075
+ request; this effectively ignores the
1076
+ authentication in the spec for a single request.
1077
+ :type _request_auth: dict, optional
1078
+ :param _content_type: force content-type for the request.
1079
+ :type _content_type: str, Optional
1080
+ :param _headers: set to override the headers for a single
1081
+ request; this effectively ignores the headers
1082
+ in the spec for a single request.
1083
+ :type _headers: dict, optional
1084
+ :param _host_index: set to override the host_index for a single
1085
+ request; this effectively ignores the host_index
1086
+ in the spec for a single request.
1087
+ :type _host_index: int, optional
1088
+ :return: Returns the result object.
1089
+ """ # noqa: E501
1090
+
1091
+ _param = self._login_user_serialize(
1092
+ login_request=login_request,
1093
+ _request_auth=_request_auth,
1094
+ _content_type=_content_type,
1095
+ _headers=_headers,
1096
+ _host_index=_host_index
1097
+ )
1098
+
1099
+ _response_types_map: Dict[str, Optional[str]] = {
1100
+ '200': "BaseResponseLoginResponse",
1101
+ '422': "BaseResponse",
1102
+ '401': None,
1103
+ }
1104
+ response_data = self.api_client.call_api(
1105
+ *_param,
1106
+ _request_timeout=_request_timeout
1107
+ )
1108
+ response_data.read()
1109
+ return self.api_client.response_deserialize(
1110
+ response_data=response_data,
1111
+ response_types_map=_response_types_map,
1112
+ ).data
1113
+
1114
+
1115
+ @validate_call
1116
+ def login_user_with_http_info(
1117
+ self,
1118
+ login_request: LoginRequest,
1119
+ _request_timeout: Union[
1120
+ None,
1121
+ Annotated[StrictFloat, Field(gt=0)],
1122
+ Tuple[
1123
+ Annotated[StrictFloat, Field(gt=0)],
1124
+ Annotated[StrictFloat, Field(gt=0)]
1125
+ ]
1126
+ ] = None,
1127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1128
+ _content_type: Optional[StrictStr] = None,
1129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1131
+ ) -> ApiResponse[BaseResponseLoginResponse]:
1132
+ """Authenticate a user
1133
+
1134
+ Authenticates a user and returns a token.
1135
+
1136
+ :param login_request: (required)
1137
+ :type login_request: LoginRequest
1138
+ :param _request_timeout: timeout setting for this request. If one
1139
+ number provided, it will be total request
1140
+ timeout. It can also be a pair (tuple) of
1141
+ (connection, read) timeouts.
1142
+ :type _request_timeout: int, tuple(int, int), optional
1143
+ :param _request_auth: set to override the auth_settings for an a single
1144
+ request; this effectively ignores the
1145
+ authentication in the spec for a single request.
1146
+ :type _request_auth: dict, optional
1147
+ :param _content_type: force content-type for the request.
1148
+ :type _content_type: str, Optional
1149
+ :param _headers: set to override the headers for a single
1150
+ request; this effectively ignores the headers
1151
+ in the spec for a single request.
1152
+ :type _headers: dict, optional
1153
+ :param _host_index: set to override the host_index for a single
1154
+ request; this effectively ignores the host_index
1155
+ in the spec for a single request.
1156
+ :type _host_index: int, optional
1157
+ :return: Returns the result object.
1158
+ """ # noqa: E501
1159
+
1160
+ _param = self._login_user_serialize(
1161
+ login_request=login_request,
1162
+ _request_auth=_request_auth,
1163
+ _content_type=_content_type,
1164
+ _headers=_headers,
1165
+ _host_index=_host_index
1166
+ )
1167
+
1168
+ _response_types_map: Dict[str, Optional[str]] = {
1169
+ '200': "BaseResponseLoginResponse",
1170
+ '422': "BaseResponse",
1171
+ '401': None,
1172
+ }
1173
+ response_data = self.api_client.call_api(
1174
+ *_param,
1175
+ _request_timeout=_request_timeout
1176
+ )
1177
+ response_data.read()
1178
+ return self.api_client.response_deserialize(
1179
+ response_data=response_data,
1180
+ response_types_map=_response_types_map,
1181
+ )
1182
+
1183
+
1184
+ @validate_call
1185
+ def login_user_without_preload_content(
1186
+ self,
1187
+ login_request: LoginRequest,
1188
+ _request_timeout: Union[
1189
+ None,
1190
+ Annotated[StrictFloat, Field(gt=0)],
1191
+ Tuple[
1192
+ Annotated[StrictFloat, Field(gt=0)],
1193
+ Annotated[StrictFloat, Field(gt=0)]
1194
+ ]
1195
+ ] = None,
1196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1197
+ _content_type: Optional[StrictStr] = None,
1198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1200
+ ) -> RESTResponseType:
1201
+ """Authenticate a user
1202
+
1203
+ Authenticates a user and returns a token.
1204
+
1205
+ :param login_request: (required)
1206
+ :type login_request: LoginRequest
1207
+ :param _request_timeout: timeout setting for this request. If one
1208
+ number provided, it will be total request
1209
+ timeout. It can also be a pair (tuple) of
1210
+ (connection, read) timeouts.
1211
+ :type _request_timeout: int, tuple(int, int), optional
1212
+ :param _request_auth: set to override the auth_settings for an a single
1213
+ request; this effectively ignores the
1214
+ authentication in the spec for a single request.
1215
+ :type _request_auth: dict, optional
1216
+ :param _content_type: force content-type for the request.
1217
+ :type _content_type: str, Optional
1218
+ :param _headers: set to override the headers for a single
1219
+ request; this effectively ignores the headers
1220
+ in the spec for a single request.
1221
+ :type _headers: dict, optional
1222
+ :param _host_index: set to override the host_index for a single
1223
+ request; this effectively ignores the host_index
1224
+ in the spec for a single request.
1225
+ :type _host_index: int, optional
1226
+ :return: Returns the result object.
1227
+ """ # noqa: E501
1228
+
1229
+ _param = self._login_user_serialize(
1230
+ login_request=login_request,
1231
+ _request_auth=_request_auth,
1232
+ _content_type=_content_type,
1233
+ _headers=_headers,
1234
+ _host_index=_host_index
1235
+ )
1236
+
1237
+ _response_types_map: Dict[str, Optional[str]] = {
1238
+ '200': "BaseResponseLoginResponse",
1239
+ '422': "BaseResponse",
1240
+ '401': None,
1241
+ }
1242
+ response_data = self.api_client.call_api(
1243
+ *_param,
1244
+ _request_timeout=_request_timeout
1245
+ )
1246
+ return response_data.response
1247
+
1248
+
1249
+ def _login_user_serialize(
1250
+ self,
1251
+ login_request,
1252
+ _request_auth,
1253
+ _content_type,
1254
+ _headers,
1255
+ _host_index,
1256
+ ) -> RequestSerialized:
1257
+
1258
+ _host = None
1259
+
1260
+ _collection_formats: Dict[str, str] = {
1261
+ }
1262
+
1263
+ _path_params: Dict[str, str] = {}
1264
+ _query_params: List[Tuple[str, str]] = []
1265
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1266
+ _form_params: List[Tuple[str, str]] = []
1267
+ _files: Dict[
1268
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1269
+ ] = {}
1270
+ _body_params: Optional[bytes] = None
1271
+
1272
+ # process the path parameters
1273
+ # process the query parameters
1274
+ # process the header parameters
1275
+ # process the form parameters
1276
+ # process the body parameter
1277
+ if login_request is not None:
1278
+ _body_params = login_request
1279
+
1280
+
1281
+ # set the HTTP header `Accept`
1282
+ if 'Accept' not in _header_params:
1283
+ _header_params['Accept'] = self.api_client.select_header_accept(
1284
+ [
1285
+ 'application/json'
1286
+ ]
1287
+ )
1288
+
1289
+ # set the HTTP header `Content-Type`
1290
+ if _content_type:
1291
+ _header_params['Content-Type'] = _content_type
1292
+ else:
1293
+ _default_content_type = (
1294
+ self.api_client.select_header_content_type(
1295
+ [
1296
+ 'application/json'
1297
+ ]
1298
+ )
1299
+ )
1300
+ if _default_content_type is not None:
1301
+ _header_params['Content-Type'] = _default_content_type
1302
+
1303
+ # authentication setting
1304
+ _auth_settings: List[str] = [
1305
+ 'APIKey'
1306
+ ]
1307
+
1308
+ return self.api_client.param_serialize(
1309
+ method='POST',
1310
+ resource_path='/v2/auth/login',
1311
+ path_params=_path_params,
1312
+ query_params=_query_params,
1313
+ header_params=_header_params,
1314
+ body=_body_params,
1315
+ post_params=_form_params,
1316
+ files=_files,
1317
+ auth_settings=_auth_settings,
1318
+ collection_formats=_collection_formats,
1319
+ _host=_host,
1320
+ _request_auth=_request_auth
1321
+ )
1322
+
1323
+