crypticorn 1.0.2rc3__py3-none-any.whl → 2.0.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.
- crypticorn/__init__.py +3 -3
- crypticorn/auth/__init__.py +2 -0
- crypticorn/auth/client/__init__.py +112 -0
- crypticorn/auth/client/api/__init__.py +8 -0
- crypticorn/auth/client/api/admin_api.py +522 -0
- crypticorn/auth/client/api/auth_api.py +2089 -0
- crypticorn/auth/client/api/service_api.py +309 -0
- crypticorn/auth/client/api/user_api.py +2540 -0
- crypticorn/auth/client/api/wallet_api.py +1698 -0
- crypticorn/auth/client/api_client.py +758 -0
- crypticorn/auth/client/api_response.py +20 -0
- crypticorn/auth/client/configuration.py +584 -0
- crypticorn/auth/client/exceptions.py +220 -0
- crypticorn/auth/client/models/__init__.py +91 -0
- crypticorn/auth/client/models/add_wallet200_response.py +86 -0
- crypticorn/auth/client/models/add_wallet_request.py +107 -0
- crypticorn/auth/client/models/authorize_user200_response.py +107 -0
- crypticorn/auth/client/models/authorize_user200_response_auth.py +101 -0
- crypticorn/auth/client/models/authorize_user_request.py +96 -0
- crypticorn/auth/client/models/create_user_request.py +114 -0
- crypticorn/auth/client/models/list_wallets200_response.py +137 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +115 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +115 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +168 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +191 -0
- crypticorn/auth/client/models/list_wallets200_response_data_inner.py +102 -0
- crypticorn/auth/client/models/list_wallets200_response_user_value.py +118 -0
- crypticorn/auth/client/models/logout_default_response.py +108 -0
- crypticorn/auth/client/models/logout_default_response_issues_inner.py +83 -0
- crypticorn/auth/client/models/refresh_token_info200_response.py +97 -0
- crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +105 -0
- crypticorn/auth/client/models/resend_verification_email_request.py +84 -0
- crypticorn/auth/client/models/revoke_user_tokens_request.py +83 -0
- crypticorn/auth/client/models/rotate_tokens200_response.py +110 -0
- crypticorn/auth/client/models/token_info200_response.py +97 -0
- crypticorn/auth/client/models/unlink_wallet_request.py +83 -0
- crypticorn/auth/client/models/update_user_request.py +93 -0
- crypticorn/auth/client/models/user_reset_password_request.py +87 -0
- crypticorn/auth/client/models/user_set_password_request.py +89 -0
- crypticorn/auth/client/models/verify200_response.py +110 -0
- crypticorn/auth/client/models/verify_email200_response.py +107 -0
- crypticorn/auth/client/models/verify_email200_response_auth.py +101 -0
- crypticorn/auth/client/models/verify_email200_response_auth_auth.py +110 -0
- crypticorn/auth/client/models/verify_email_request.py +83 -0
- crypticorn/auth/client/models/verify_wallet_request.py +91 -0
- crypticorn/auth/client/models/wallet_verified200_response.py +83 -0
- crypticorn/auth/client/models/whoami200_response.py +104 -0
- crypticorn/auth/client/rest.py +195 -0
- crypticorn/auth/main.py +45 -0
- crypticorn/client.py +46 -8
- crypticorn/common/__init__.py +5 -0
- crypticorn/common/auth.py +43 -0
- crypticorn/common/auth_client.py +163 -0
- crypticorn/common/errors.py +432 -0
- crypticorn/common/scopes.py +29 -0
- crypticorn/common/urls.py +25 -0
- crypticorn/hive/__init__.py +2 -1
- crypticorn/hive/client/__init__.py +57 -0
- crypticorn/hive/client/api/__init__.py +6 -0
- crypticorn/hive/client/api/data_api.py +594 -0
- crypticorn/hive/client/api/models_api.py +1680 -0
- crypticorn/hive/client/api/status_api.py +263 -0
- crypticorn/hive/client/api_client.py +758 -0
- crypticorn/hive/client/api_response.py +20 -0
- crypticorn/hive/client/configuration.py +612 -0
- crypticorn/hive/client/exceptions.py +220 -0
- crypticorn/hive/client/models/__init__.py +38 -0
- crypticorn/hive/client/models/coins.py +44 -0
- crypticorn/hive/client/models/data_download_response.py +113 -0
- crypticorn/hive/client/models/data_info.py +115 -0
- crypticorn/hive/client/models/data_value_value_value_inner.py +154 -0
- crypticorn/hive/client/models/data_version.py +35 -0
- crypticorn/hive/client/models/download_links.py +91 -0
- crypticorn/hive/client/models/evaluation.py +86 -0
- crypticorn/hive/client/models/evaluation_response.py +85 -0
- crypticorn/hive/client/models/feature_size.py +36 -0
- crypticorn/hive/client/models/http_validation_error.py +99 -0
- crypticorn/hive/client/models/model.py +133 -0
- crypticorn/hive/client/models/model_create.py +93 -0
- crypticorn/hive/client/models/model_status.py +35 -0
- crypticorn/hive/client/models/model_update.py +83 -0
- crypticorn/hive/client/models/target.py +36 -0
- crypticorn/hive/client/models/target_type.py +35 -0
- crypticorn/hive/client/models/validation_error.py +105 -0
- crypticorn/hive/client/models/validation_error_loc_inner.py +159 -0
- crypticorn/hive/client/py.typed +0 -0
- crypticorn/hive/client/rest.py +195 -0
- crypticorn/hive/main.py +27 -100
- crypticorn/klines/client/__init__.py +21 -7
- crypticorn/klines/client/api/__init__.py +0 -1
- crypticorn/klines/client/api/funding_rates_api.py +90 -79
- crypticorn/klines/client/api/health_check_api.py +29 -45
- crypticorn/klines/client/api/ohlcv_data_api.py +104 -87
- crypticorn/klines/client/api/symbols_api.py +36 -54
- crypticorn/klines/client/api/udf_api.py +228 -352
- crypticorn/klines/client/api_client.py +106 -148
- crypticorn/klines/client/api_response.py +2 -3
- crypticorn/klines/client/configuration.py +64 -50
- crypticorn/klines/client/exceptions.py +20 -16
- crypticorn/klines/client/models/__init__.py +21 -7
- crypticorn/klines/client/models/base_response_health_check_response.py +21 -15
- crypticorn/klines/client/models/base_response_list_funding_rate_response.py +21 -15
- crypticorn/klines/client/models/base_response_list_str.py +16 -14
- crypticorn/klines/client/models/base_response_ohlcv_response.py +21 -15
- crypticorn/klines/client/models/error_response.py +23 -15
- crypticorn/klines/client/models/exchange.py +11 -11
- crypticorn/klines/client/models/funding_rate_response.py +11 -11
- crypticorn/klines/client/models/health_check_response.py +14 -12
- crypticorn/klines/client/models/history_error_response.py +11 -11
- crypticorn/klines/client/models/history_no_data_response.py +16 -16
- crypticorn/klines/client/models/history_success_response.py +16 -16
- crypticorn/klines/client/models/http_validation_error.py +14 -10
- crypticorn/klines/client/models/market.py +2 -4
- crypticorn/klines/client/models/ohlcv_response.py +22 -15
- crypticorn/klines/client/models/resolution.py +5 -7
- crypticorn/klines/client/models/response_get_history_udf_history_get.py +71 -22
- crypticorn/klines/client/models/search_symbol_response.py +22 -15
- crypticorn/klines/client/models/sort_direction.py +2 -4
- crypticorn/klines/client/models/symbol_group_response.py +5 -9
- crypticorn/klines/client/models/symbol_info_response.py +40 -24
- crypticorn/klines/client/models/symbol_type.py +5 -10
- crypticorn/klines/client/models/timeframe.py +5 -7
- crypticorn/klines/client/models/udf_config_response.py +60 -21
- crypticorn/klines/client/models/validation_error.py +19 -13
- crypticorn/klines/client/models/validation_error_loc_inner.py +32 -11
- crypticorn/klines/client/rest.py +30 -41
- crypticorn/klines/main.py +52 -15
- crypticorn/pay/__init__.py +2 -0
- crypticorn/pay/client/__init__.py +52 -0
- crypticorn/pay/client/api/__init__.py +7 -0
- crypticorn/pay/client/api/now_payments_api.py +813 -0
- crypticorn/pay/client/api/payments_api.py +799 -0
- crypticorn/pay/client/api/products_api.py +891 -0
- crypticorn/pay/client/api/status_api.py +260 -0
- crypticorn/pay/client/api_client.py +758 -0
- crypticorn/pay/client/api_response.py +20 -0
- crypticorn/pay/client/configuration.py +612 -0
- crypticorn/pay/client/exceptions.py +220 -0
- crypticorn/pay/client/models/__init__.py +32 -0
- crypticorn/pay/client/models/api_status_res.py +83 -0
- crypticorn/pay/client/models/combined_payment_history.py +101 -0
- crypticorn/pay/client/models/create_invoice_req.py +188 -0
- crypticorn/pay/client/models/create_invoice_res.py +188 -0
- crypticorn/pay/client/models/currency.py +165 -0
- crypticorn/pay/client/models/estimate_price_req.py +91 -0
- crypticorn/pay/client/models/estimate_price_res.py +102 -0
- crypticorn/pay/client/models/get_currencies_res.py +99 -0
- crypticorn/pay/client/models/get_payment_status_res.py +222 -0
- crypticorn/pay/client/models/get_payments_list_res.py +109 -0
- crypticorn/pay/client/models/http_validation_error.py +99 -0
- crypticorn/pay/client/models/min_amount_req.py +124 -0
- crypticorn/pay/client/models/min_amount_res.py +105 -0
- crypticorn/pay/client/models/now_api_status_res.py +83 -0
- crypticorn/pay/client/models/now_create_invoice_req.py +188 -0
- crypticorn/pay/client/models/now_create_invoice_res.py +188 -0
- crypticorn/pay/client/models/now_fee_structure.py +104 -0
- crypticorn/pay/client/models/now_payment_model.py +124 -0
- crypticorn/pay/client/models/now_payment_status.py +42 -0
- crypticorn/pay/client/models/now_webhook_payload.py +181 -0
- crypticorn/pay/client/models/payment.py +231 -0
- crypticorn/pay/client/models/payment_status.py +40 -0
- crypticorn/pay/client/models/product.py +87 -0
- crypticorn/pay/client/models/product_model.py +119 -0
- crypticorn/pay/client/models/product_subs_model.py +108 -0
- crypticorn/pay/client/models/services.py +34 -0
- crypticorn/pay/client/models/unified_payment_model.py +112 -0
- crypticorn/pay/client/models/validation_error.py +105 -0
- crypticorn/pay/client/models/validation_error_loc_inner.py +159 -0
- crypticorn/pay/client/py.typed +0 -0
- crypticorn/pay/client/rest.py +195 -0
- crypticorn/pay/main.py +35 -0
- crypticorn/trade/client/__init__.py +9 -4
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/api_keys_api.py +203 -304
- crypticorn/trade/client/api/bots_api.py +177 -250
- crypticorn/trade/client/api/exchanges_api.py +38 -57
- crypticorn/trade/client/api/futures_trading_panel_api.py +223 -321
- crypticorn/trade/client/api/notifications_api.py +247 -364
- crypticorn/trade/client/api/orders_api.py +44 -63
- crypticorn/trade/client/api/status_api.py +35 -53
- crypticorn/trade/client/api/strategies_api.py +852 -64
- crypticorn/trade/client/api/trading_actions_api.py +126 -203
- crypticorn/trade/client/api_client.py +115 -154
- crypticorn/trade/client/api_response.py +2 -3
- crypticorn/trade/client/configuration.py +128 -90
- crypticorn/trade/client/exceptions.py +21 -17
- crypticorn/trade/client/models/__init__.py +9 -4
- crypticorn/trade/client/models/action_model.py +114 -50
- crypticorn/trade/client/models/api_error_identifier.py +60 -51
- crypticorn/trade/client/models/api_error_level.py +37 -0
- crypticorn/trade/client/models/api_error_type.py +37 -0
- crypticorn/trade/client/models/api_key_model.py +49 -28
- crypticorn/trade/client/models/bot_model.py +76 -31
- crypticorn/trade/client/models/bot_status.py +37 -0
- crypticorn/trade/client/models/exchange.py +3 -5
- crypticorn/trade/client/models/execution_ids.py +14 -14
- crypticorn/trade/client/models/futures_balance.py +39 -23
- crypticorn/trade/client/models/futures_trading_action.py +98 -46
- crypticorn/trade/client/models/http_validation_error.py +15 -11
- crypticorn/trade/client/models/margin_mode.py +3 -5
- crypticorn/trade/client/models/market_type.py +3 -5
- crypticorn/trade/client/models/notification_model.py +60 -27
- crypticorn/trade/client/models/notification_type.py +4 -6
- crypticorn/trade/client/models/order_model.py +125 -65
- crypticorn/trade/client/models/order_status.py +6 -8
- crypticorn/trade/client/models/post_futures_action.py +16 -12
- crypticorn/trade/client/models/strategy_exchange_info.py +11 -12
- crypticorn/trade/client/models/strategy_model.py +66 -27
- crypticorn/trade/client/models/strategy_model_input.py +160 -0
- crypticorn/trade/client/models/strategy_model_output.py +160 -0
- crypticorn/trade/client/models/tpsl.py +35 -21
- crypticorn/trade/client/models/trading_action_type.py +5 -7
- crypticorn/trade/client/models/update_notification.py +17 -13
- crypticorn/trade/client/models/validation_error.py +20 -14
- crypticorn/trade/client/models/validation_error_loc_inner.py +33 -12
- crypticorn/trade/client/rest.py +108 -170
- crypticorn/trade/main.py +26 -19
- crypticorn-2.0.0.dist-info/METADATA +74 -0
- crypticorn-2.0.0.dist-info/RECORD +226 -0
- {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/WHEEL +1 -1
- crypticorn/hive/requirements.txt +0 -4
- crypticorn/hive/utils.py +0 -109
- crypticorn/klines/requirements.txt +0 -4
- crypticorn/klines/test/test_base_response_health_check_response.py +0 -56
- crypticorn/klines/test/test_base_response_list_funding_rate_response.py +0 -59
- crypticorn/klines/test/test_base_response_list_str.py +0 -56
- crypticorn/klines/test/test_base_response_ohlcv_response.py +0 -72
- crypticorn/klines/test/test_error_response.py +0 -57
- crypticorn/klines/test/test_exchange.py +0 -56
- crypticorn/klines/test/test_funding_rate_response.py +0 -56
- crypticorn/klines/test/test_funding_rates_api.py +0 -38
- crypticorn/klines/test/test_health_check_api.py +0 -38
- crypticorn/klines/test/test_health_check_response.py +0 -52
- crypticorn/klines/test/test_history_error_response.py +0 -53
- crypticorn/klines/test/test_history_no_data_response.py +0 -69
- crypticorn/klines/test/test_history_success_response.py +0 -87
- crypticorn/klines/test/test_http_validation_error.py +0 -58
- crypticorn/klines/test/test_market.py +0 -33
- crypticorn/klines/test/test_ohlcv_data_api.py +0 -38
- crypticorn/klines/test/test_ohlcv_response.py +0 -86
- crypticorn/klines/test/test_resolution.py +0 -33
- crypticorn/klines/test/test_response_get_history_udf_history_get.py +0 -89
- crypticorn/klines/test/test_search_symbol_response.py +0 -62
- crypticorn/klines/test/test_sort_direction.py +0 -33
- crypticorn/klines/test/test_symbol_group_response.py +0 -53
- crypticorn/klines/test/test_symbol_info_response.py +0 -84
- crypticorn/klines/test/test_symbol_type.py +0 -54
- crypticorn/klines/test/test_symbols_api.py +0 -38
- crypticorn/klines/test/test_timeframe.py +0 -33
- crypticorn/klines/test/test_udf_api.py +0 -80
- crypticorn/klines/test/test_udf_config_response.py +0 -95
- crypticorn/klines/test/test_validation_error.py +0 -60
- crypticorn/klines/test/test_validation_error_loc_inner.py +0 -50
- crypticorn/trade/requirements.txt +0 -4
- crypticorn-1.0.2rc3.dist-info/LICENSE.md +0 -19
- crypticorn-1.0.2rc3.dist-info/METADATA +0 -47
- crypticorn-1.0.2rc3.dist-info/RECORD +0 -128
- /crypticorn/{klines/test/__init__.py → auth/client/py.typed} +0 -0
- {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
|
4
|
+
Trading API
|
5
5
|
|
6
6
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
7
|
|
@@ -37,9 +37,8 @@ class BotsApi:
|
|
37
37
|
api_client = ApiClient.get_default()
|
38
38
|
self.api_client = api_client
|
39
39
|
|
40
|
-
|
41
40
|
@validate_call
|
42
|
-
def create_bot(
|
41
|
+
async def create_bot(
|
43
42
|
self,
|
44
43
|
bot_model: BotModel,
|
45
44
|
access_token: Optional[StrictStr] = None,
|
@@ -47,9 +46,8 @@ class BotsApi:
|
|
47
46
|
None,
|
48
47
|
Annotated[StrictFloat, Field(gt=0)],
|
49
48
|
Tuple[
|
50
|
-
Annotated[StrictFloat, Field(gt=0)],
|
51
|
-
|
52
|
-
]
|
49
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
50
|
+
],
|
53
51
|
] = None,
|
54
52
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
55
53
|
_content_type: Optional[StrictStr] = None,
|
@@ -58,6 +56,7 @@ class BotsApi:
|
|
58
56
|
) -> object:
|
59
57
|
"""Create Bot
|
60
58
|
|
59
|
+
Creates a new bot.
|
61
60
|
|
62
61
|
:param bot_model: (required)
|
63
62
|
:type bot_model: BotModel
|
@@ -83,7 +82,7 @@ class BotsApi:
|
|
83
82
|
in the spec for a single request.
|
84
83
|
:type _host_index: int, optional
|
85
84
|
:return: Returns the result object.
|
86
|
-
"""
|
85
|
+
""" # noqa: E501
|
87
86
|
|
88
87
|
_param = self._create_bot_serialize(
|
89
88
|
bot_model=bot_model,
|
@@ -91,26 +90,24 @@ class BotsApi:
|
|
91
90
|
_request_auth=_request_auth,
|
92
91
|
_content_type=_content_type,
|
93
92
|
_headers=_headers,
|
94
|
-
_host_index=_host_index
|
93
|
+
_host_index=_host_index,
|
95
94
|
)
|
96
95
|
|
97
96
|
_response_types_map: Dict[str, Optional[str]] = {
|
98
|
-
|
99
|
-
|
97
|
+
"200": "object",
|
98
|
+
"422": "HTTPValidationError",
|
100
99
|
}
|
101
|
-
response_data = self.api_client.call_api(
|
102
|
-
*_param,
|
103
|
-
_request_timeout=_request_timeout
|
100
|
+
response_data = await self.api_client.call_api(
|
101
|
+
*_param, _request_timeout=_request_timeout
|
104
102
|
)
|
105
|
-
response_data.read()
|
103
|
+
await response_data.read()
|
106
104
|
return self.api_client.response_deserialize(
|
107
105
|
response_data=response_data,
|
108
106
|
response_types_map=_response_types_map,
|
109
107
|
).data
|
110
108
|
|
111
|
-
|
112
109
|
@validate_call
|
113
|
-
def create_bot_with_http_info(
|
110
|
+
async def create_bot_with_http_info(
|
114
111
|
self,
|
115
112
|
bot_model: BotModel,
|
116
113
|
access_token: Optional[StrictStr] = None,
|
@@ -118,9 +115,8 @@ class BotsApi:
|
|
118
115
|
None,
|
119
116
|
Annotated[StrictFloat, Field(gt=0)],
|
120
117
|
Tuple[
|
121
|
-
Annotated[StrictFloat, Field(gt=0)],
|
122
|
-
|
123
|
-
]
|
118
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
119
|
+
],
|
124
120
|
] = None,
|
125
121
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
126
122
|
_content_type: Optional[StrictStr] = None,
|
@@ -129,6 +125,7 @@ class BotsApi:
|
|
129
125
|
) -> ApiResponse[object]:
|
130
126
|
"""Create Bot
|
131
127
|
|
128
|
+
Creates a new bot.
|
132
129
|
|
133
130
|
:param bot_model: (required)
|
134
131
|
:type bot_model: BotModel
|
@@ -154,7 +151,7 @@ class BotsApi:
|
|
154
151
|
in the spec for a single request.
|
155
152
|
:type _host_index: int, optional
|
156
153
|
:return: Returns the result object.
|
157
|
-
"""
|
154
|
+
""" # noqa: E501
|
158
155
|
|
159
156
|
_param = self._create_bot_serialize(
|
160
157
|
bot_model=bot_model,
|
@@ -162,26 +159,24 @@ class BotsApi:
|
|
162
159
|
_request_auth=_request_auth,
|
163
160
|
_content_type=_content_type,
|
164
161
|
_headers=_headers,
|
165
|
-
_host_index=_host_index
|
162
|
+
_host_index=_host_index,
|
166
163
|
)
|
167
164
|
|
168
165
|
_response_types_map: Dict[str, Optional[str]] = {
|
169
|
-
|
170
|
-
|
166
|
+
"200": "object",
|
167
|
+
"422": "HTTPValidationError",
|
171
168
|
}
|
172
|
-
response_data = self.api_client.call_api(
|
173
|
-
*_param,
|
174
|
-
_request_timeout=_request_timeout
|
169
|
+
response_data = await self.api_client.call_api(
|
170
|
+
*_param, _request_timeout=_request_timeout
|
175
171
|
)
|
176
|
-
response_data.read()
|
172
|
+
await response_data.read()
|
177
173
|
return self.api_client.response_deserialize(
|
178
174
|
response_data=response_data,
|
179
175
|
response_types_map=_response_types_map,
|
180
176
|
)
|
181
177
|
|
182
|
-
|
183
178
|
@validate_call
|
184
|
-
def create_bot_without_preload_content(
|
179
|
+
async def create_bot_without_preload_content(
|
185
180
|
self,
|
186
181
|
bot_model: BotModel,
|
187
182
|
access_token: Optional[StrictStr] = None,
|
@@ -189,9 +184,8 @@ class BotsApi:
|
|
189
184
|
None,
|
190
185
|
Annotated[StrictFloat, Field(gt=0)],
|
191
186
|
Tuple[
|
192
|
-
Annotated[StrictFloat, Field(gt=0)],
|
193
|
-
|
194
|
-
]
|
187
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
188
|
+
],
|
195
189
|
] = None,
|
196
190
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
197
191
|
_content_type: Optional[StrictStr] = None,
|
@@ -200,6 +194,7 @@ class BotsApi:
|
|
200
194
|
) -> RESTResponseType:
|
201
195
|
"""Create Bot
|
202
196
|
|
197
|
+
Creates a new bot.
|
203
198
|
|
204
199
|
:param bot_model: (required)
|
205
200
|
:type bot_model: BotModel
|
@@ -225,7 +220,7 @@ class BotsApi:
|
|
225
220
|
in the spec for a single request.
|
226
221
|
:type _host_index: int, optional
|
227
222
|
:return: Returns the result object.
|
228
|
-
"""
|
223
|
+
""" # noqa: E501
|
229
224
|
|
230
225
|
_param = self._create_bot_serialize(
|
231
226
|
bot_model=bot_model,
|
@@ -233,20 +228,18 @@ class BotsApi:
|
|
233
228
|
_request_auth=_request_auth,
|
234
229
|
_content_type=_content_type,
|
235
230
|
_headers=_headers,
|
236
|
-
_host_index=_host_index
|
231
|
+
_host_index=_host_index,
|
237
232
|
)
|
238
233
|
|
239
234
|
_response_types_map: Dict[str, Optional[str]] = {
|
240
|
-
|
241
|
-
|
235
|
+
"200": "object",
|
236
|
+
"422": "HTTPValidationError",
|
242
237
|
}
|
243
|
-
response_data = self.api_client.call_api(
|
244
|
-
*_param,
|
245
|
-
_request_timeout=_request_timeout
|
238
|
+
response_data = await self.api_client.call_api(
|
239
|
+
*_param, _request_timeout=_request_timeout
|
246
240
|
)
|
247
241
|
return response_data.response
|
248
242
|
|
249
|
-
|
250
243
|
def _create_bot_serialize(
|
251
244
|
self,
|
252
245
|
bot_model,
|
@@ -259,8 +252,7 @@ class BotsApi:
|
|
259
252
|
|
260
253
|
_host = None
|
261
254
|
|
262
|
-
_collection_formats: Dict[str, str] = {
|
263
|
-
}
|
255
|
+
_collection_formats: Dict[str, str] = {}
|
264
256
|
|
265
257
|
_path_params: Dict[str, str] = {}
|
266
258
|
_query_params: List[Tuple[str, str]] = []
|
@@ -279,37 +271,28 @@ class BotsApi:
|
|
279
271
|
if bot_model is not None:
|
280
272
|
_body_params = bot_model
|
281
273
|
|
282
|
-
|
283
274
|
# set the HTTP header `Accept`
|
284
|
-
if
|
285
|
-
_header_params[
|
286
|
-
[
|
287
|
-
'application/json'
|
288
|
-
]
|
275
|
+
if "Accept" not in _header_params:
|
276
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
277
|
+
["application/json"]
|
289
278
|
)
|
290
279
|
|
291
280
|
# set the HTTP header `Content-Type`
|
292
281
|
if _content_type:
|
293
|
-
_header_params[
|
282
|
+
_header_params["Content-Type"] = _content_type
|
294
283
|
else:
|
295
|
-
_default_content_type = (
|
296
|
-
|
297
|
-
[
|
298
|
-
'application/json'
|
299
|
-
]
|
300
|
-
)
|
284
|
+
_default_content_type = self.api_client.select_header_content_type(
|
285
|
+
["application/json"]
|
301
286
|
)
|
302
287
|
if _default_content_type is not None:
|
303
|
-
_header_params[
|
288
|
+
_header_params["Content-Type"] = _default_content_type
|
304
289
|
|
305
290
|
# authentication setting
|
306
|
-
_auth_settings: List[str] = [
|
307
|
-
'OAuth2PasswordBearer'
|
308
|
-
]
|
291
|
+
_auth_settings: List[str] = ["HTTPBearer"]
|
309
292
|
|
310
293
|
return self.api_client.param_serialize(
|
311
|
-
method=
|
312
|
-
resource_path=
|
294
|
+
method="POST",
|
295
|
+
resource_path="/bots",
|
313
296
|
path_params=_path_params,
|
314
297
|
query_params=_query_params,
|
315
298
|
header_params=_header_params,
|
@@ -319,14 +302,11 @@ class BotsApi:
|
|
319
302
|
auth_settings=_auth_settings,
|
320
303
|
collection_formats=_collection_formats,
|
321
304
|
_host=_host,
|
322
|
-
_request_auth=_request_auth
|
305
|
+
_request_auth=_request_auth,
|
323
306
|
)
|
324
307
|
|
325
|
-
|
326
|
-
|
327
|
-
|
328
308
|
@validate_call
|
329
|
-
def delete_bot(
|
309
|
+
async def delete_bot(
|
330
310
|
self,
|
331
311
|
id: StrictStr,
|
332
312
|
access_token: Optional[StrictStr] = None,
|
@@ -334,9 +314,8 @@ class BotsApi:
|
|
334
314
|
None,
|
335
315
|
Annotated[StrictFloat, Field(gt=0)],
|
336
316
|
Tuple[
|
337
|
-
Annotated[StrictFloat, Field(gt=0)],
|
338
|
-
|
339
|
-
]
|
317
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
318
|
+
],
|
340
319
|
] = None,
|
341
320
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
342
321
|
_content_type: Optional[StrictStr] = None,
|
@@ -345,6 +324,7 @@ class BotsApi:
|
|
345
324
|
) -> object:
|
346
325
|
"""Delete Bot
|
347
326
|
|
327
|
+
Soft deletes a bot by cancelling all orders and closing all positions.
|
348
328
|
|
349
329
|
:param id: (required)
|
350
330
|
:type id: str
|
@@ -370,7 +350,7 @@ class BotsApi:
|
|
370
350
|
in the spec for a single request.
|
371
351
|
:type _host_index: int, optional
|
372
352
|
:return: Returns the result object.
|
373
|
-
"""
|
353
|
+
""" # noqa: E501
|
374
354
|
|
375
355
|
_param = self._delete_bot_serialize(
|
376
356
|
id=id,
|
@@ -378,26 +358,24 @@ class BotsApi:
|
|
378
358
|
_request_auth=_request_auth,
|
379
359
|
_content_type=_content_type,
|
380
360
|
_headers=_headers,
|
381
|
-
_host_index=_host_index
|
361
|
+
_host_index=_host_index,
|
382
362
|
)
|
383
363
|
|
384
364
|
_response_types_map: Dict[str, Optional[str]] = {
|
385
|
-
|
386
|
-
|
365
|
+
"200": "object",
|
366
|
+
"422": "HTTPValidationError",
|
387
367
|
}
|
388
|
-
response_data = self.api_client.call_api(
|
389
|
-
*_param,
|
390
|
-
_request_timeout=_request_timeout
|
368
|
+
response_data = await self.api_client.call_api(
|
369
|
+
*_param, _request_timeout=_request_timeout
|
391
370
|
)
|
392
|
-
response_data.read()
|
371
|
+
await response_data.read()
|
393
372
|
return self.api_client.response_deserialize(
|
394
373
|
response_data=response_data,
|
395
374
|
response_types_map=_response_types_map,
|
396
375
|
).data
|
397
376
|
|
398
|
-
|
399
377
|
@validate_call
|
400
|
-
def delete_bot_with_http_info(
|
378
|
+
async def delete_bot_with_http_info(
|
401
379
|
self,
|
402
380
|
id: StrictStr,
|
403
381
|
access_token: Optional[StrictStr] = None,
|
@@ -405,9 +383,8 @@ class BotsApi:
|
|
405
383
|
None,
|
406
384
|
Annotated[StrictFloat, Field(gt=0)],
|
407
385
|
Tuple[
|
408
|
-
Annotated[StrictFloat, Field(gt=0)],
|
409
|
-
|
410
|
-
]
|
386
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
387
|
+
],
|
411
388
|
] = None,
|
412
389
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
413
390
|
_content_type: Optional[StrictStr] = None,
|
@@ -416,6 +393,7 @@ class BotsApi:
|
|
416
393
|
) -> ApiResponse[object]:
|
417
394
|
"""Delete Bot
|
418
395
|
|
396
|
+
Soft deletes a bot by cancelling all orders and closing all positions.
|
419
397
|
|
420
398
|
:param id: (required)
|
421
399
|
:type id: str
|
@@ -441,7 +419,7 @@ class BotsApi:
|
|
441
419
|
in the spec for a single request.
|
442
420
|
:type _host_index: int, optional
|
443
421
|
:return: Returns the result object.
|
444
|
-
"""
|
422
|
+
""" # noqa: E501
|
445
423
|
|
446
424
|
_param = self._delete_bot_serialize(
|
447
425
|
id=id,
|
@@ -449,26 +427,24 @@ class BotsApi:
|
|
449
427
|
_request_auth=_request_auth,
|
450
428
|
_content_type=_content_type,
|
451
429
|
_headers=_headers,
|
452
|
-
_host_index=_host_index
|
430
|
+
_host_index=_host_index,
|
453
431
|
)
|
454
432
|
|
455
433
|
_response_types_map: Dict[str, Optional[str]] = {
|
456
|
-
|
457
|
-
|
434
|
+
"200": "object",
|
435
|
+
"422": "HTTPValidationError",
|
458
436
|
}
|
459
|
-
response_data = self.api_client.call_api(
|
460
|
-
*_param,
|
461
|
-
_request_timeout=_request_timeout
|
437
|
+
response_data = await self.api_client.call_api(
|
438
|
+
*_param, _request_timeout=_request_timeout
|
462
439
|
)
|
463
|
-
response_data.read()
|
440
|
+
await response_data.read()
|
464
441
|
return self.api_client.response_deserialize(
|
465
442
|
response_data=response_data,
|
466
443
|
response_types_map=_response_types_map,
|
467
444
|
)
|
468
445
|
|
469
|
-
|
470
446
|
@validate_call
|
471
|
-
def delete_bot_without_preload_content(
|
447
|
+
async def delete_bot_without_preload_content(
|
472
448
|
self,
|
473
449
|
id: StrictStr,
|
474
450
|
access_token: Optional[StrictStr] = None,
|
@@ -476,9 +452,8 @@ class BotsApi:
|
|
476
452
|
None,
|
477
453
|
Annotated[StrictFloat, Field(gt=0)],
|
478
454
|
Tuple[
|
479
|
-
Annotated[StrictFloat, Field(gt=0)],
|
480
|
-
|
481
|
-
]
|
455
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
456
|
+
],
|
482
457
|
] = None,
|
483
458
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
484
459
|
_content_type: Optional[StrictStr] = None,
|
@@ -487,6 +462,7 @@ class BotsApi:
|
|
487
462
|
) -> RESTResponseType:
|
488
463
|
"""Delete Bot
|
489
464
|
|
465
|
+
Soft deletes a bot by cancelling all orders and closing all positions.
|
490
466
|
|
491
467
|
:param id: (required)
|
492
468
|
:type id: str
|
@@ -512,7 +488,7 @@ class BotsApi:
|
|
512
488
|
in the spec for a single request.
|
513
489
|
:type _host_index: int, optional
|
514
490
|
:return: Returns the result object.
|
515
|
-
"""
|
491
|
+
""" # noqa: E501
|
516
492
|
|
517
493
|
_param = self._delete_bot_serialize(
|
518
494
|
id=id,
|
@@ -520,20 +496,18 @@ class BotsApi:
|
|
520
496
|
_request_auth=_request_auth,
|
521
497
|
_content_type=_content_type,
|
522
498
|
_headers=_headers,
|
523
|
-
_host_index=_host_index
|
499
|
+
_host_index=_host_index,
|
524
500
|
)
|
525
501
|
|
526
502
|
_response_types_map: Dict[str, Optional[str]] = {
|
527
|
-
|
528
|
-
|
503
|
+
"200": "object",
|
504
|
+
"422": "HTTPValidationError",
|
529
505
|
}
|
530
|
-
response_data = self.api_client.call_api(
|
531
|
-
*_param,
|
532
|
-
_request_timeout=_request_timeout
|
506
|
+
response_data = await self.api_client.call_api(
|
507
|
+
*_param, _request_timeout=_request_timeout
|
533
508
|
)
|
534
509
|
return response_data.response
|
535
510
|
|
536
|
-
|
537
511
|
def _delete_bot_serialize(
|
538
512
|
self,
|
539
513
|
id,
|
@@ -546,8 +520,7 @@ class BotsApi:
|
|
546
520
|
|
547
521
|
_host = None
|
548
522
|
|
549
|
-
_collection_formats: Dict[str, str] = {
|
550
|
-
}
|
523
|
+
_collection_formats: Dict[str, str] = {}
|
551
524
|
|
552
525
|
_path_params: Dict[str, str] = {}
|
553
526
|
_query_params: List[Tuple[str, str]] = []
|
@@ -560,30 +533,24 @@ class BotsApi:
|
|
560
533
|
|
561
534
|
# process the path parameters
|
562
535
|
if id is not None:
|
563
|
-
_path_params[
|
536
|
+
_path_params["id"] = id
|
564
537
|
# process the query parameters
|
565
538
|
# process the header parameters
|
566
539
|
# process the form parameters
|
567
540
|
# process the body parameter
|
568
541
|
|
569
|
-
|
570
542
|
# set the HTTP header `Accept`
|
571
|
-
if
|
572
|
-
_header_params[
|
573
|
-
[
|
574
|
-
'application/json'
|
575
|
-
]
|
543
|
+
if "Accept" not in _header_params:
|
544
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
545
|
+
["application/json"]
|
576
546
|
)
|
577
547
|
|
578
|
-
|
579
548
|
# authentication setting
|
580
|
-
_auth_settings: List[str] = [
|
581
|
-
'OAuth2PasswordBearer'
|
582
|
-
]
|
549
|
+
_auth_settings: List[str] = ["HTTPBearer"]
|
583
550
|
|
584
551
|
return self.api_client.param_serialize(
|
585
|
-
method=
|
586
|
-
resource_path=
|
552
|
+
method="DELETE",
|
553
|
+
resource_path="/bots/{id}",
|
587
554
|
path_params=_path_params,
|
588
555
|
query_params=_query_params,
|
589
556
|
header_params=_header_params,
|
@@ -593,14 +560,11 @@ class BotsApi:
|
|
593
560
|
auth_settings=_auth_settings,
|
594
561
|
collection_formats=_collection_formats,
|
595
562
|
_host=_host,
|
596
|
-
_request_auth=_request_auth
|
563
|
+
_request_auth=_request_auth,
|
597
564
|
)
|
598
565
|
|
599
|
-
|
600
|
-
|
601
|
-
|
602
566
|
@validate_call
|
603
|
-
def get_bots(
|
567
|
+
async def get_bots(
|
604
568
|
self,
|
605
569
|
include_deleted: Optional[StrictBool] = None,
|
606
570
|
limit: Optional[StrictInt] = None,
|
@@ -610,9 +574,8 @@ class BotsApi:
|
|
610
574
|
None,
|
611
575
|
Annotated[StrictFloat, Field(gt=0)],
|
612
576
|
Tuple[
|
613
|
-
Annotated[StrictFloat, Field(gt=0)],
|
614
|
-
|
615
|
-
]
|
577
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
578
|
+
],
|
616
579
|
] = None,
|
617
580
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
618
581
|
_content_type: Optional[StrictStr] = None,
|
@@ -650,7 +613,7 @@ class BotsApi:
|
|
650
613
|
in the spec for a single request.
|
651
614
|
:type _host_index: int, optional
|
652
615
|
:return: Returns the result object.
|
653
|
-
"""
|
616
|
+
""" # noqa: E501
|
654
617
|
|
655
618
|
_param = self._get_bots_serialize(
|
656
619
|
include_deleted=include_deleted,
|
@@ -660,26 +623,24 @@ class BotsApi:
|
|
660
623
|
_request_auth=_request_auth,
|
661
624
|
_content_type=_content_type,
|
662
625
|
_headers=_headers,
|
663
|
-
_host_index=_host_index
|
626
|
+
_host_index=_host_index,
|
664
627
|
)
|
665
628
|
|
666
629
|
_response_types_map: Dict[str, Optional[str]] = {
|
667
|
-
|
668
|
-
|
630
|
+
"200": "List[BotModel]",
|
631
|
+
"422": "HTTPValidationError",
|
669
632
|
}
|
670
|
-
response_data = self.api_client.call_api(
|
671
|
-
*_param,
|
672
|
-
_request_timeout=_request_timeout
|
633
|
+
response_data = await self.api_client.call_api(
|
634
|
+
*_param, _request_timeout=_request_timeout
|
673
635
|
)
|
674
|
-
response_data.read()
|
636
|
+
await response_data.read()
|
675
637
|
return self.api_client.response_deserialize(
|
676
638
|
response_data=response_data,
|
677
639
|
response_types_map=_response_types_map,
|
678
640
|
).data
|
679
641
|
|
680
|
-
|
681
642
|
@validate_call
|
682
|
-
def get_bots_with_http_info(
|
643
|
+
async def get_bots_with_http_info(
|
683
644
|
self,
|
684
645
|
include_deleted: Optional[StrictBool] = None,
|
685
646
|
limit: Optional[StrictInt] = None,
|
@@ -689,9 +650,8 @@ class BotsApi:
|
|
689
650
|
None,
|
690
651
|
Annotated[StrictFloat, Field(gt=0)],
|
691
652
|
Tuple[
|
692
|
-
Annotated[StrictFloat, Field(gt=0)],
|
693
|
-
|
694
|
-
]
|
653
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
654
|
+
],
|
695
655
|
] = None,
|
696
656
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
697
657
|
_content_type: Optional[StrictStr] = None,
|
@@ -729,7 +689,7 @@ class BotsApi:
|
|
729
689
|
in the spec for a single request.
|
730
690
|
:type _host_index: int, optional
|
731
691
|
:return: Returns the result object.
|
732
|
-
"""
|
692
|
+
""" # noqa: E501
|
733
693
|
|
734
694
|
_param = self._get_bots_serialize(
|
735
695
|
include_deleted=include_deleted,
|
@@ -739,26 +699,24 @@ class BotsApi:
|
|
739
699
|
_request_auth=_request_auth,
|
740
700
|
_content_type=_content_type,
|
741
701
|
_headers=_headers,
|
742
|
-
_host_index=_host_index
|
702
|
+
_host_index=_host_index,
|
743
703
|
)
|
744
704
|
|
745
705
|
_response_types_map: Dict[str, Optional[str]] = {
|
746
|
-
|
747
|
-
|
706
|
+
"200": "List[BotModel]",
|
707
|
+
"422": "HTTPValidationError",
|
748
708
|
}
|
749
|
-
response_data = self.api_client.call_api(
|
750
|
-
*_param,
|
751
|
-
_request_timeout=_request_timeout
|
709
|
+
response_data = await self.api_client.call_api(
|
710
|
+
*_param, _request_timeout=_request_timeout
|
752
711
|
)
|
753
|
-
response_data.read()
|
712
|
+
await response_data.read()
|
754
713
|
return self.api_client.response_deserialize(
|
755
714
|
response_data=response_data,
|
756
715
|
response_types_map=_response_types_map,
|
757
716
|
)
|
758
717
|
|
759
|
-
|
760
718
|
@validate_call
|
761
|
-
def get_bots_without_preload_content(
|
719
|
+
async def get_bots_without_preload_content(
|
762
720
|
self,
|
763
721
|
include_deleted: Optional[StrictBool] = None,
|
764
722
|
limit: Optional[StrictInt] = None,
|
@@ -768,9 +726,8 @@ class BotsApi:
|
|
768
726
|
None,
|
769
727
|
Annotated[StrictFloat, Field(gt=0)],
|
770
728
|
Tuple[
|
771
|
-
Annotated[StrictFloat, Field(gt=0)],
|
772
|
-
|
773
|
-
]
|
729
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
730
|
+
],
|
774
731
|
] = None,
|
775
732
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
776
733
|
_content_type: Optional[StrictStr] = None,
|
@@ -808,7 +765,7 @@ class BotsApi:
|
|
808
765
|
in the spec for a single request.
|
809
766
|
:type _host_index: int, optional
|
810
767
|
:return: Returns the result object.
|
811
|
-
"""
|
768
|
+
""" # noqa: E501
|
812
769
|
|
813
770
|
_param = self._get_bots_serialize(
|
814
771
|
include_deleted=include_deleted,
|
@@ -818,20 +775,18 @@ class BotsApi:
|
|
818
775
|
_request_auth=_request_auth,
|
819
776
|
_content_type=_content_type,
|
820
777
|
_headers=_headers,
|
821
|
-
_host_index=_host_index
|
778
|
+
_host_index=_host_index,
|
822
779
|
)
|
823
780
|
|
824
781
|
_response_types_map: Dict[str, Optional[str]] = {
|
825
|
-
|
826
|
-
|
782
|
+
"200": "List[BotModel]",
|
783
|
+
"422": "HTTPValidationError",
|
827
784
|
}
|
828
|
-
response_data = self.api_client.call_api(
|
829
|
-
*_param,
|
830
|
-
_request_timeout=_request_timeout
|
785
|
+
response_data = await self.api_client.call_api(
|
786
|
+
*_param, _request_timeout=_request_timeout
|
831
787
|
)
|
832
788
|
return response_data.response
|
833
789
|
|
834
|
-
|
835
790
|
def _get_bots_serialize(
|
836
791
|
self,
|
837
792
|
include_deleted,
|
@@ -846,8 +801,7 @@ class BotsApi:
|
|
846
801
|
|
847
802
|
_host = None
|
848
803
|
|
849
|
-
_collection_formats: Dict[str, str] = {
|
850
|
-
}
|
804
|
+
_collection_formats: Dict[str, str] = {}
|
851
805
|
|
852
806
|
_path_params: Dict[str, str] = {}
|
853
807
|
_query_params: List[Tuple[str, str]] = []
|
@@ -861,39 +815,33 @@ class BotsApi:
|
|
861
815
|
# process the path parameters
|
862
816
|
# process the query parameters
|
863
817
|
if include_deleted is not None:
|
864
|
-
|
865
|
-
_query_params.append((
|
866
|
-
|
818
|
+
|
819
|
+
_query_params.append(("include_deleted", include_deleted))
|
820
|
+
|
867
821
|
if limit is not None:
|
868
|
-
|
869
|
-
_query_params.append((
|
870
|
-
|
822
|
+
|
823
|
+
_query_params.append(("limit", limit))
|
824
|
+
|
871
825
|
if offset is not None:
|
872
|
-
|
873
|
-
_query_params.append((
|
874
|
-
|
826
|
+
|
827
|
+
_query_params.append(("offset", offset))
|
828
|
+
|
875
829
|
# process the header parameters
|
876
830
|
# process the form parameters
|
877
831
|
# process the body parameter
|
878
832
|
|
879
|
-
|
880
833
|
# set the HTTP header `Accept`
|
881
|
-
if
|
882
|
-
_header_params[
|
883
|
-
[
|
884
|
-
'application/json'
|
885
|
-
]
|
834
|
+
if "Accept" not in _header_params:
|
835
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
836
|
+
["application/json"]
|
886
837
|
)
|
887
838
|
|
888
|
-
|
889
839
|
# authentication setting
|
890
|
-
_auth_settings: List[str] = [
|
891
|
-
'OAuth2PasswordBearer'
|
892
|
-
]
|
840
|
+
_auth_settings: List[str] = ["HTTPBearer"]
|
893
841
|
|
894
842
|
return self.api_client.param_serialize(
|
895
|
-
method=
|
896
|
-
resource_path=
|
843
|
+
method="GET",
|
844
|
+
resource_path="/bots",
|
897
845
|
path_params=_path_params,
|
898
846
|
query_params=_query_params,
|
899
847
|
header_params=_header_params,
|
@@ -903,14 +851,11 @@ class BotsApi:
|
|
903
851
|
auth_settings=_auth_settings,
|
904
852
|
collection_formats=_collection_formats,
|
905
853
|
_host=_host,
|
906
|
-
_request_auth=_request_auth
|
854
|
+
_request_auth=_request_auth,
|
907
855
|
)
|
908
856
|
|
909
|
-
|
910
|
-
|
911
|
-
|
912
857
|
@validate_call
|
913
|
-
def update_bot(
|
858
|
+
async def update_bot(
|
914
859
|
self,
|
915
860
|
id: StrictStr,
|
916
861
|
bot_model: BotModel,
|
@@ -919,9 +864,8 @@ class BotsApi:
|
|
919
864
|
None,
|
920
865
|
Annotated[StrictFloat, Field(gt=0)],
|
921
866
|
Tuple[
|
922
|
-
Annotated[StrictFloat, Field(gt=0)],
|
923
|
-
|
924
|
-
]
|
867
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
868
|
+
],
|
925
869
|
] = None,
|
926
870
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
927
871
|
_content_type: Optional[StrictStr] = None,
|
@@ -930,6 +874,7 @@ class BotsApi:
|
|
930
874
|
) -> object:
|
931
875
|
"""Update Bot
|
932
876
|
|
877
|
+
Updates a bot.
|
933
878
|
|
934
879
|
:param id: (required)
|
935
880
|
:type id: str
|
@@ -957,7 +902,7 @@ class BotsApi:
|
|
957
902
|
in the spec for a single request.
|
958
903
|
:type _host_index: int, optional
|
959
904
|
:return: Returns the result object.
|
960
|
-
"""
|
905
|
+
""" # noqa: E501
|
961
906
|
|
962
907
|
_param = self._update_bot_serialize(
|
963
908
|
id=id,
|
@@ -966,26 +911,24 @@ class BotsApi:
|
|
966
911
|
_request_auth=_request_auth,
|
967
912
|
_content_type=_content_type,
|
968
913
|
_headers=_headers,
|
969
|
-
_host_index=_host_index
|
914
|
+
_host_index=_host_index,
|
970
915
|
)
|
971
916
|
|
972
917
|
_response_types_map: Dict[str, Optional[str]] = {
|
973
|
-
|
974
|
-
|
918
|
+
"200": "object",
|
919
|
+
"422": "HTTPValidationError",
|
975
920
|
}
|
976
|
-
response_data = self.api_client.call_api(
|
977
|
-
*_param,
|
978
|
-
_request_timeout=_request_timeout
|
921
|
+
response_data = await self.api_client.call_api(
|
922
|
+
*_param, _request_timeout=_request_timeout
|
979
923
|
)
|
980
|
-
response_data.read()
|
924
|
+
await response_data.read()
|
981
925
|
return self.api_client.response_deserialize(
|
982
926
|
response_data=response_data,
|
983
927
|
response_types_map=_response_types_map,
|
984
928
|
).data
|
985
929
|
|
986
|
-
|
987
930
|
@validate_call
|
988
|
-
def update_bot_with_http_info(
|
931
|
+
async def update_bot_with_http_info(
|
989
932
|
self,
|
990
933
|
id: StrictStr,
|
991
934
|
bot_model: BotModel,
|
@@ -994,9 +937,8 @@ class BotsApi:
|
|
994
937
|
None,
|
995
938
|
Annotated[StrictFloat, Field(gt=0)],
|
996
939
|
Tuple[
|
997
|
-
Annotated[StrictFloat, Field(gt=0)],
|
998
|
-
|
999
|
-
]
|
940
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
941
|
+
],
|
1000
942
|
] = None,
|
1001
943
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1002
944
|
_content_type: Optional[StrictStr] = None,
|
@@ -1005,6 +947,7 @@ class BotsApi:
|
|
1005
947
|
) -> ApiResponse[object]:
|
1006
948
|
"""Update Bot
|
1007
949
|
|
950
|
+
Updates a bot.
|
1008
951
|
|
1009
952
|
:param id: (required)
|
1010
953
|
:type id: str
|
@@ -1032,7 +975,7 @@ class BotsApi:
|
|
1032
975
|
in the spec for a single request.
|
1033
976
|
:type _host_index: int, optional
|
1034
977
|
:return: Returns the result object.
|
1035
|
-
"""
|
978
|
+
""" # noqa: E501
|
1036
979
|
|
1037
980
|
_param = self._update_bot_serialize(
|
1038
981
|
id=id,
|
@@ -1041,26 +984,24 @@ class BotsApi:
|
|
1041
984
|
_request_auth=_request_auth,
|
1042
985
|
_content_type=_content_type,
|
1043
986
|
_headers=_headers,
|
1044
|
-
_host_index=_host_index
|
987
|
+
_host_index=_host_index,
|
1045
988
|
)
|
1046
989
|
|
1047
990
|
_response_types_map: Dict[str, Optional[str]] = {
|
1048
|
-
|
1049
|
-
|
991
|
+
"200": "object",
|
992
|
+
"422": "HTTPValidationError",
|
1050
993
|
}
|
1051
|
-
response_data = self.api_client.call_api(
|
1052
|
-
*_param,
|
1053
|
-
_request_timeout=_request_timeout
|
994
|
+
response_data = await self.api_client.call_api(
|
995
|
+
*_param, _request_timeout=_request_timeout
|
1054
996
|
)
|
1055
|
-
response_data.read()
|
997
|
+
await response_data.read()
|
1056
998
|
return self.api_client.response_deserialize(
|
1057
999
|
response_data=response_data,
|
1058
1000
|
response_types_map=_response_types_map,
|
1059
1001
|
)
|
1060
1002
|
|
1061
|
-
|
1062
1003
|
@validate_call
|
1063
|
-
def update_bot_without_preload_content(
|
1004
|
+
async def update_bot_without_preload_content(
|
1064
1005
|
self,
|
1065
1006
|
id: StrictStr,
|
1066
1007
|
bot_model: BotModel,
|
@@ -1069,9 +1010,8 @@ class BotsApi:
|
|
1069
1010
|
None,
|
1070
1011
|
Annotated[StrictFloat, Field(gt=0)],
|
1071
1012
|
Tuple[
|
1072
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1073
|
-
|
1074
|
-
]
|
1013
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1014
|
+
],
|
1075
1015
|
] = None,
|
1076
1016
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1077
1017
|
_content_type: Optional[StrictStr] = None,
|
@@ -1080,6 +1020,7 @@ class BotsApi:
|
|
1080
1020
|
) -> RESTResponseType:
|
1081
1021
|
"""Update Bot
|
1082
1022
|
|
1023
|
+
Updates a bot.
|
1083
1024
|
|
1084
1025
|
:param id: (required)
|
1085
1026
|
:type id: str
|
@@ -1107,7 +1048,7 @@ class BotsApi:
|
|
1107
1048
|
in the spec for a single request.
|
1108
1049
|
:type _host_index: int, optional
|
1109
1050
|
:return: Returns the result object.
|
1110
|
-
"""
|
1051
|
+
""" # noqa: E501
|
1111
1052
|
|
1112
1053
|
_param = self._update_bot_serialize(
|
1113
1054
|
id=id,
|
@@ -1116,20 +1057,18 @@ class BotsApi:
|
|
1116
1057
|
_request_auth=_request_auth,
|
1117
1058
|
_content_type=_content_type,
|
1118
1059
|
_headers=_headers,
|
1119
|
-
_host_index=_host_index
|
1060
|
+
_host_index=_host_index,
|
1120
1061
|
)
|
1121
1062
|
|
1122
1063
|
_response_types_map: Dict[str, Optional[str]] = {
|
1123
|
-
|
1124
|
-
|
1064
|
+
"200": "object",
|
1065
|
+
"422": "HTTPValidationError",
|
1125
1066
|
}
|
1126
|
-
response_data = self.api_client.call_api(
|
1127
|
-
*_param,
|
1128
|
-
_request_timeout=_request_timeout
|
1067
|
+
response_data = await self.api_client.call_api(
|
1068
|
+
*_param, _request_timeout=_request_timeout
|
1129
1069
|
)
|
1130
1070
|
return response_data.response
|
1131
1071
|
|
1132
|
-
|
1133
1072
|
def _update_bot_serialize(
|
1134
1073
|
self,
|
1135
1074
|
id,
|
@@ -1143,8 +1082,7 @@ class BotsApi:
|
|
1143
1082
|
|
1144
1083
|
_host = None
|
1145
1084
|
|
1146
|
-
_collection_formats: Dict[str, str] = {
|
1147
|
-
}
|
1085
|
+
_collection_formats: Dict[str, str] = {}
|
1148
1086
|
|
1149
1087
|
_path_params: Dict[str, str] = {}
|
1150
1088
|
_query_params: List[Tuple[str, str]] = []
|
@@ -1157,7 +1095,7 @@ class BotsApi:
|
|
1157
1095
|
|
1158
1096
|
# process the path parameters
|
1159
1097
|
if id is not None:
|
1160
|
-
_path_params[
|
1098
|
+
_path_params["id"] = id
|
1161
1099
|
# process the query parameters
|
1162
1100
|
# process the header parameters
|
1163
1101
|
# process the form parameters
|
@@ -1165,37 +1103,28 @@ class BotsApi:
|
|
1165
1103
|
if bot_model is not None:
|
1166
1104
|
_body_params = bot_model
|
1167
1105
|
|
1168
|
-
|
1169
1106
|
# set the HTTP header `Accept`
|
1170
|
-
if
|
1171
|
-
_header_params[
|
1172
|
-
[
|
1173
|
-
'application/json'
|
1174
|
-
]
|
1107
|
+
if "Accept" not in _header_params:
|
1108
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1109
|
+
["application/json"]
|
1175
1110
|
)
|
1176
1111
|
|
1177
1112
|
# set the HTTP header `Content-Type`
|
1178
1113
|
if _content_type:
|
1179
|
-
_header_params[
|
1114
|
+
_header_params["Content-Type"] = _content_type
|
1180
1115
|
else:
|
1181
|
-
_default_content_type = (
|
1182
|
-
|
1183
|
-
[
|
1184
|
-
'application/json'
|
1185
|
-
]
|
1186
|
-
)
|
1116
|
+
_default_content_type = self.api_client.select_header_content_type(
|
1117
|
+
["application/json"]
|
1187
1118
|
)
|
1188
1119
|
if _default_content_type is not None:
|
1189
|
-
_header_params[
|
1120
|
+
_header_params["Content-Type"] = _default_content_type
|
1190
1121
|
|
1191
1122
|
# authentication setting
|
1192
|
-
_auth_settings: List[str] = [
|
1193
|
-
'OAuth2PasswordBearer'
|
1194
|
-
]
|
1123
|
+
_auth_settings: List[str] = ["HTTPBearer"]
|
1195
1124
|
|
1196
1125
|
return self.api_client.param_serialize(
|
1197
|
-
method=
|
1198
|
-
resource_path=
|
1126
|
+
method="PUT",
|
1127
|
+
resource_path="/bots/{id}",
|
1199
1128
|
path_params=_path_params,
|
1200
1129
|
query_params=_query_params,
|
1201
1130
|
header_params=_header_params,
|
@@ -1205,7 +1134,5 @@ class BotsApi:
|
|
1205
1134
|
auth_settings=_auth_settings,
|
1206
1135
|
collection_formats=_collection_formats,
|
1207
1136
|
_host=_host,
|
1208
|
-
_request_auth=_request_auth
|
1137
|
+
_request_auth=_request_auth,
|
1209
1138
|
)
|
1210
|
-
|
1211
|
-
|