Skip to content

Commit 5fdd8f2

Browse files
committed
Update client code for 9a0889d267c9b4441fb8cb41280f3695902935a5
1 parent 4104400 commit 5fdd8f2

31 files changed

+5149
-0
lines changed

swagger_client/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@
2525
from swagger_client.api.defi_controller_api import DefiControllerApi
2626
from swagger_client.api.lock_controller_api import LockControllerApi
2727
from swagger_client.api.nft_controller_api import NftControllerApi
28+
from swagger_client.api.sec_ware_open_controller_api import SecWareOpenControllerApi
2829
from swagger_client.api.token_controller_api import TokenControllerApi
2930
from swagger_client.api.token_controller_v_1_api import TokenControllerV1Api
31+
from swagger_client.api.transaction_security_controller_api import TransactionSecurityControllerApi
3032
from swagger_client.api.website_controller_api import WebsiteControllerApi
3133
# import ApiClient
3234
from swagger_client.api_client import ApiClient
3335
from swagger_client.configuration import Configuration
3436
# import models into sdk package
3537
from swagger_client.models.abi_address_info import AbiAddressInfo
3638
from swagger_client.models.abi_param_info import AbiParamInfo
39+
from swagger_client.models.address_info import AddressInfo
40+
from swagger_client.models.allowance_change import AllowanceChange
3741
from swagger_client.models.approve_address_info import ApproveAddressInfo
3842
from swagger_client.models.approve_erc1155_result import ApproveErc1155Result
3943
from swagger_client.models.approve_nft1155_list_response import ApproveNFT1155ListResponse
@@ -46,15 +50,24 @@
4650
from swagger_client.models.contracts import Contracts
4751
from swagger_client.models.contracts_security import ContractsSecurity
4852
from swagger_client.models.dapp_contract_security_response import DappContractSecurityResponse
53+
from swagger_client.models.erc20_balance_change import ERC20BalanceChange
54+
from swagger_client.models.erc20_change import ERC20Change
55+
from swagger_client.models.erc721_balance_change import ERC721BalanceChange
56+
from swagger_client.models.erc721_change import ERC721Change
57+
from swagger_client.models.flag import Flag
4958
from swagger_client.models.get_access_token_request import GetAccessTokenRequest
5059
from swagger_client.models.get_access_token_response import GetAccessTokenResponse
5160
from swagger_client.models.get_defi_info_response import GetDefiInfoResponse
5261
from swagger_client.models.get_defi_info_response_result import GetDefiInfoResponseResult
5362
from swagger_client.models.get_defi_info_response_result_owner import GetDefiInfoResponseResultOwner
5463
from swagger_client.models.json_object import JSONObject
64+
from swagger_client.models.log_entry import LogEntry
5565
from swagger_client.models.map_string_string import MapStringString
66+
from swagger_client.models.native_balance_change import NativeBalanceChange
67+
from swagger_client.models.native_change import NativeChange
5668
from swagger_client.models.new_allowance import NewAllowance
5769
from swagger_client.models.nft_locker_response import NftLockerResponse
70+
from swagger_client.models.open_scan_address_resp import OpenScanAddressResp
5871
from swagger_client.models.parse_abi_data_request import ParseAbiDataRequest
5972
from swagger_client.models.parse_abi_data_response import ParseAbiDataResponse
6073
from swagger_client.models.response_wrapper_address_contract import ResponseWrapperAddressContract
@@ -69,6 +82,17 @@
6982
from swagger_client.models.response_wrapper_get_nft_info_result_same_nfts import ResponseWrapperGetNftInfoResultSameNfts
7083
from swagger_client.models.response_wrapper_get_nft_info_result_self_destruct import ResponseWrapperGetNftInfoResultSelfDestruct
7184
from swagger_client.models.response_wrapper_get_nft_info_result_transfer_without_approval import ResponseWrapperGetNftInfoResultTransferWithoutApproval
85+
from swagger_client.models.response_wrapper_get_scan_result import ResponseWrapperGetScanResult
86+
from swagger_client.models.response_wrapper_get_scan_result_result import ResponseWrapperGetScanResultResult
87+
from swagger_client.models.response_wrapper_get_scan_result_result_address_poisoned import ResponseWrapperGetScanResultResultAddressPoisoned
88+
from swagger_client.models.response_wrapper_get_scan_result_result_address_poisoned_risk_detail import ResponseWrapperGetScanResultResultAddressPoisonedRiskDetail
89+
from swagger_client.models.response_wrapper_get_scan_result_result_approval_risk import ResponseWrapperGetScanResultResultApprovalRisk
90+
from swagger_client.models.response_wrapper_get_scan_result_result_approval_risk_erc20_risk import ResponseWrapperGetScanResultResultApprovalRiskErc20Risk
91+
from swagger_client.models.response_wrapper_get_scan_result_result_approval_risk_risk_detail import ResponseWrapperGetScanResultResultApprovalRiskRiskDetail
92+
from swagger_client.models.response_wrapper_get_scan_result_result_stablecoin_depeg import ResponseWrapperGetScanResultResultStablecoinDepeg
93+
from swagger_client.models.response_wrapper_get_scan_result_result_stablecoin_depeg_risk_detail import ResponseWrapperGetScanResultResultStablecoinDepegRiskDetail
94+
from swagger_client.models.response_wrapper_get_scan_result_result_token_attention import ResponseWrapperGetScanResultResultTokenAttention
95+
from swagger_client.models.response_wrapper_get_scan_result_result_token_attention_risk_detail import ResponseWrapperGetScanResultResultTokenAttentionRiskDetail
7296
from swagger_client.models.response_wrapper_json_object import ResponseWrapperJSONObject
7397
from swagger_client.models.response_wrapper_list_approve_nft1155_list_response import ResponseWrapperListApproveNFT1155ListResponse
7498
from swagger_client.models.response_wrapper_list_approve_nft_list_response import ResponseWrapperListApproveNFTListResponse
@@ -78,6 +102,7 @@
78102
from swagger_client.models.response_wrapper_list_json_object import ResponseWrapperListJSONObject
79103
from swagger_client.models.response_wrapper_map_string_string import ResponseWrapperMapStringString
80104
from swagger_client.models.response_wrapper_nft_locker_response import ResponseWrapperNftLockerResponse
105+
from swagger_client.models.response_wrapper_open_scan_address_resp import ResponseWrapperOpenScanAddressResp
81106
from swagger_client.models.response_wrapper_parse_abi_data_response import ResponseWrapperParseAbiDataResponse
82107
from swagger_client.models.response_wrapper_phishing_site import ResponseWrapperPhishingSite
83108
from swagger_client.models.response_wrapper_phishing_site_result import ResponseWrapperPhishingSiteResult
@@ -127,6 +152,7 @@
127152
from swagger_client.models.response_wrapper_token_security_lp_holders import ResponseWrapperTokenSecurityLpHolders
128153
from swagger_client.models.response_wrapper_token_security_nft_list import ResponseWrapperTokenSecurityNFTList
129154
from swagger_client.models.response_wrapper_token_security_result import ResponseWrapperTokenSecurityResult
155+
from swagger_client.models.response_wrapper_transaction_security_response import ResponseWrapperTransactionSecurityResponse
130156
from swagger_client.models.response_wrapperobject import ResponseWrapperobject
131157
from swagger_client.models.solana_allowance_upgrade import SolanaAllowanceUpgrade
132158
from swagger_client.models.solana_ownership_change import SolanaOwnershipChange
@@ -140,3 +166,5 @@
140166
from swagger_client.models.ta_token_locker_lock_infoobject import TaTokenLockerLockInfoobject
141167
from swagger_client.models.ta_token_security_response import TaTokenSecurityResponse
142168
from swagger_client.models.token_locker_response import TokenLockerResponse
169+
from swagger_client.models.transaction_security_request import TransactionSecurityRequest
170+
from swagger_client.models.transaction_security_response import TransactionSecurityResponse

swagger_client/api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
from swagger_client.api.defi_controller_api import DefiControllerApi
1414
from swagger_client.api.lock_controller_api import LockControllerApi
1515
from swagger_client.api.nft_controller_api import NftControllerApi
16+
from swagger_client.api.sec_ware_open_controller_api import SecWareOpenControllerApi
1617
from swagger_client.api.token_controller_api import TokenControllerApi
1718
from swagger_client.api.token_controller_v_1_api import TokenControllerV1Api
19+
from swagger_client.api.transaction_security_controller_api import TransactionSecurityControllerApi
1820
from swagger_client.api.website_controller_api import WebsiteControllerApi
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
# coding: utf-8
2+
3+
"""
4+
GoPlus Security API Document
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: 1.0
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
from __future__ import absolute_import
14+
15+
import re # noqa: F401
16+
17+
# python 2 and python 3 compatibility library
18+
import six
19+
20+
from swagger_client.api_client import ApiClient
21+
22+
23+
class SecWareOpenControllerApi(object):
24+
"""NOTE: This class is auto generated by the swagger code generator program.
25+
26+
Do not edit the class manually.
27+
Ref: https://github.com/swagger-api/swagger-codegen
28+
"""
29+
30+
def __init__(self, api_client=None):
31+
if api_client is None:
32+
api_client = ApiClient()
33+
self.api_client = api_client
34+
35+
def get_scan_result_using_get(self, request_id, **kwargs): # noqa: E501
36+
"""Get address scan result # noqa: E501
37+
38+
This method makes a synchronous HTTP request by default. To make an
39+
asynchronous HTTP request, please pass async_req=True
40+
>>> thread = api.get_scan_result_using_get(request_id, async_req=True)
41+
>>> result = thread.get()
42+
43+
:param async_req bool
44+
:param str request_id: request_id (required)
45+
:param str authorization: Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...)
46+
:return: ResponseWrapperGetScanResult
47+
If the method is called asynchronously,
48+
returns the request thread.
49+
"""
50+
kwargs['_return_http_data_only'] = True
51+
if kwargs.get('async_req'):
52+
return self.get_scan_result_using_get_with_http_info(request_id, **kwargs) # noqa: E501
53+
else:
54+
(data) = self.get_scan_result_using_get_with_http_info(request_id, **kwargs) # noqa: E501
55+
return data
56+
57+
def get_scan_result_using_get_with_http_info(self, request_id, **kwargs): # noqa: E501
58+
"""Get address scan result # noqa: E501
59+
60+
This method makes a synchronous HTTP request by default. To make an
61+
asynchronous HTTP request, please pass async_req=True
62+
>>> thread = api.get_scan_result_using_get_with_http_info(request_id, async_req=True)
63+
>>> result = thread.get()
64+
65+
:param async_req bool
66+
:param str request_id: request_id (required)
67+
:param str authorization: Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...)
68+
:return: ResponseWrapperGetScanResult
69+
If the method is called asynchronously,
70+
returns the request thread.
71+
"""
72+
73+
all_params = ['request_id', 'authorization'] # noqa: E501
74+
all_params.append('async_req')
75+
all_params.append('_return_http_data_only')
76+
all_params.append('_preload_content')
77+
all_params.append('_request_timeout')
78+
79+
params = locals()
80+
for key, val in six.iteritems(params['kwargs']):
81+
if key not in all_params:
82+
raise TypeError(
83+
"Got an unexpected keyword argument '%s'"
84+
" to method get_scan_result_using_get" % key
85+
)
86+
params[key] = val
87+
del params['kwargs']
88+
# verify the required parameter 'request_id' is set
89+
if ('request_id' not in params or
90+
params['request_id'] is None):
91+
raise ValueError("Missing the required parameter `request_id` when calling `get_scan_result_using_get`") # noqa: E501
92+
93+
collection_formats = {}
94+
95+
path_params = {}
96+
97+
query_params = []
98+
if 'request_id' in params:
99+
query_params.append(('request_id', params['request_id'])) # noqa: E501
100+
101+
header_params = {}
102+
if 'authorization' in params:
103+
header_params['Authorization'] = params['authorization'] # noqa: E501
104+
105+
form_params = []
106+
local_var_files = {}
107+
108+
body_params = None
109+
# HTTP header `Accept`
110+
header_params['Accept'] = self.api_client.select_header_accept(
111+
['*/*']) # noqa: E501
112+
113+
# Authentication setting
114+
auth_settings = [] # noqa: E501
115+
116+
return self.api_client.call_api(
117+
'/api/v1/address/result', 'GET',
118+
path_params,
119+
query_params,
120+
header_params,
121+
body=body_params,
122+
post_params=form_params,
123+
files=local_var_files,
124+
response_type='ResponseWrapperGetScanResult', # noqa: E501
125+
auth_settings=auth_settings,
126+
async_req=params.get('async_req'),
127+
_return_http_data_only=params.get('_return_http_data_only'),
128+
_preload_content=params.get('_preload_content', True),
129+
_request_timeout=params.get('_request_timeout'),
130+
collection_formats=collection_formats)
131+
132+
def scan_address_using_get(self, address, chain_id, **kwargs): # noqa: E501
133+
"""Start address security scan # noqa: E501
134+
135+
This method makes a synchronous HTTP request by default. To make an
136+
asynchronous HTTP request, please pass async_req=True
137+
>>> thread = api.scan_address_using_get(address, chain_id, async_req=True)
138+
>>> result = thread.get()
139+
140+
:param async_req bool
141+
:param str address: address (required)
142+
:param str chain_id: chain_id (required)
143+
:param str authorization: Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...)
144+
:return: ResponseWrapperOpenScanAddressResp
145+
If the method is called asynchronously,
146+
returns the request thread.
147+
"""
148+
kwargs['_return_http_data_only'] = True
149+
if kwargs.get('async_req'):
150+
return self.scan_address_using_get_with_http_info(address, chain_id, **kwargs) # noqa: E501
151+
else:
152+
(data) = self.scan_address_using_get_with_http_info(address, chain_id, **kwargs) # noqa: E501
153+
return data
154+
155+
def scan_address_using_get_with_http_info(self, address, chain_id, **kwargs): # noqa: E501
156+
"""Start address security scan # noqa: E501
157+
158+
This method makes a synchronous HTTP request by default. To make an
159+
asynchronous HTTP request, please pass async_req=True
160+
>>> thread = api.scan_address_using_get_with_http_info(address, chain_id, async_req=True)
161+
>>> result = thread.get()
162+
163+
:param async_req bool
164+
:param str address: address (required)
165+
:param str chain_id: chain_id (required)
166+
:param str authorization: Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...)
167+
:return: ResponseWrapperOpenScanAddressResp
168+
If the method is called asynchronously,
169+
returns the request thread.
170+
"""
171+
172+
all_params = ['address', 'chain_id', 'authorization'] # noqa: E501
173+
all_params.append('async_req')
174+
all_params.append('_return_http_data_only')
175+
all_params.append('_preload_content')
176+
all_params.append('_request_timeout')
177+
178+
params = locals()
179+
for key, val in six.iteritems(params['kwargs']):
180+
if key not in all_params:
181+
raise TypeError(
182+
"Got an unexpected keyword argument '%s'"
183+
" to method scan_address_using_get" % key
184+
)
185+
params[key] = val
186+
del params['kwargs']
187+
# verify the required parameter 'address' is set
188+
if ('address' not in params or
189+
params['address'] is None):
190+
raise ValueError("Missing the required parameter `address` when calling `scan_address_using_get`") # noqa: E501
191+
# verify the required parameter 'chain_id' is set
192+
if ('chain_id' not in params or
193+
params['chain_id'] is None):
194+
raise ValueError("Missing the required parameter `chain_id` when calling `scan_address_using_get`") # noqa: E501
195+
196+
collection_formats = {}
197+
198+
path_params = {}
199+
if 'chain_id' in params:
200+
path_params['chain_id'] = params['chain_id'] # noqa: E501
201+
202+
query_params = []
203+
if 'address' in params:
204+
query_params.append(('address', params['address'])) # noqa: E501
205+
206+
header_params = {}
207+
if 'authorization' in params:
208+
header_params['Authorization'] = params['authorization'] # noqa: E501
209+
210+
form_params = []
211+
local_var_files = {}
212+
213+
body_params = None
214+
# HTTP header `Accept`
215+
header_params['Accept'] = self.api_client.select_header_accept(
216+
['*/*']) # noqa: E501
217+
218+
# Authentication setting
219+
auth_settings = [] # noqa: E501
220+
221+
return self.api_client.call_api(
222+
'/api/v1/address/scan/{chain_id}', 'GET',
223+
path_params,
224+
query_params,
225+
header_params,
226+
body=body_params,
227+
post_params=form_params,
228+
files=local_var_files,
229+
response_type='ResponseWrapperOpenScanAddressResp', # noqa: E501
230+
auth_settings=auth_settings,
231+
async_req=params.get('async_req'),
232+
_return_http_data_only=params.get('_return_http_data_only'),
233+
_preload_content=params.get('_preload_content', True),
234+
_request_timeout=params.get('_request_timeout'),
235+
collection_formats=collection_formats)

0 commit comments

Comments
 (0)