chainstream-sdk 0.1.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.
- chainstream/__init__.py +46 -0
- chainstream/client.py +104 -0
- chainstream/openapi_client/__init__.py +156 -0
- chainstream/openapi_client/api/__init__.py +20 -0
- chainstream/openapi_client/api/blockchain_api.py +549 -0
- chainstream/openapi_client/api/defi_sol_moonshot_api.py +590 -0
- chainstream/openapi_client/api/defi_sol_pumpfun_api.py +314 -0
- chainstream/openapi_client/api/dex_api.py +1576 -0
- chainstream/openapi_client/api/dex_pool_api.py +645 -0
- chainstream/openapi_client/api/endpoint_api.py +1934 -0
- chainstream/openapi_client/api/ipfs_api.py +283 -0
- chainstream/openapi_client/api/jobs_api.py +562 -0
- chainstream/openapi_client/api/kyt_api.py +3743 -0
- chainstream/openapi_client/api/ranking_api.py +2067 -0
- chainstream/openapi_client/api/red_packet_api.py +2444 -0
- chainstream/openapi_client/api/token_api.py +9211 -0
- chainstream/openapi_client/api/trade_api.py +1352 -0
- chainstream/openapi_client/api/transaction_api.py +882 -0
- chainstream/openapi_client/api/wallet_api.py +1608 -0
- chainstream/openapi_client/api/watchlist_api.py +316 -0
- chainstream/openapi_client/api_client.py +801 -0
- chainstream/openapi_client/api_response.py +21 -0
- chainstream/openapi_client/configuration.py +572 -0
- chainstream/openapi_client/exceptions.py +217 -0
- chainstream/openapi_client/models/__init__.py +122 -0
- chainstream/openapi_client/models/address_exposure.py +94 -0
- chainstream/openapi_client/models/address_risk_response_dto.py +112 -0
- chainstream/openapi_client/models/alert_detail.py +100 -0
- chainstream/openapi_client/models/alterya_identification.py +106 -0
- chainstream/openapi_client/models/balance_change_type.py +38 -0
- chainstream/openapi_client/models/balance_token_type.py +38 -0
- chainstream/openapi_client/models/balance_update_dto.py +130 -0
- chainstream/openapi_client/models/balance_update_page.py +104 -0
- chainstream/openapi_client/models/blockchain_dto.py +94 -0
- chainstream/openapi_client/models/blockchain_latest_block_dto.py +90 -0
- chainstream/openapi_client/models/boolean_result_dto.py +88 -0
- chainstream/openapi_client/models/calculate_pnl_input.py +88 -0
- chainstream/openapi_client/models/candle.py +101 -0
- chainstream/openapi_client/models/chain.py +39 -0
- chainstream/openapi_client/models/chain_symbol.py +39 -0
- chainstream/openapi_client/models/chainalysis_address_identification.py +92 -0
- chainstream/openapi_client/models/claim_red_packet_input.py +103 -0
- chainstream/openapi_client/models/create_endpoint_input.py +102 -0
- chainstream/openapi_client/models/create_red_packet_input.py +112 -0
- chainstream/openapi_client/models/create_red_packet_reply.py +90 -0
- chainstream/openapi_client/models/create_token_input.py +110 -0
- chainstream/openapi_client/models/create_token_reply.py +90 -0
- chainstream/openapi_client/models/dev_token_dto.py +106 -0
- chainstream/openapi_client/models/dex_dto.py +94 -0
- chainstream/openapi_client/models/dex_page.py +106 -0
- chainstream/openapi_client/models/dex_pool_dto.py +161 -0
- chainstream/openapi_client/models/dex_pool_snapshot_dto.py +111 -0
- chainstream/openapi_client/models/dex_pool_snapshot_page.py +104 -0
- chainstream/openapi_client/models/dex_pool_token_liquidity.py +100 -0
- chainstream/openapi_client/models/dex_pool_token_snapshot_dto.py +100 -0
- chainstream/openapi_client/models/dex_quote_response.py +98 -0
- chainstream/openapi_client/models/direct_exposure_detail.py +90 -0
- chainstream/openapi_client/models/endpoint_list_response.py +102 -0
- chainstream/openapi_client/models/endpoint_operation_response.py +88 -0
- chainstream/openapi_client/models/endpoint_response.py +108 -0
- chainstream/openapi_client/models/endpoint_secret_response.py +88 -0
- chainstream/openapi_client/models/estimate_gas_limit_input.py +94 -0
- chainstream/openapi_client/models/estimate_gas_limit_response.py +90 -0
- chainstream/openapi_client/models/filter_condition.py +102 -0
- chainstream/openapi_client/models/gas_price_response.py +90 -0
- chainstream/openapi_client/models/job_dto.py +90 -0
- chainstream/openapi_client/models/job_streaming_dto.py +90 -0
- chainstream/openapi_client/models/kyt_register_transfer_request.py +108 -0
- chainstream/openapi_client/models/kyt_register_withdrawal_request.py +111 -0
- chainstream/openapi_client/models/link.py +97 -0
- chainstream/openapi_client/models/moonshot_create_token_input.py +145 -0
- chainstream/openapi_client/models/moonshot_create_token_reply.py +90 -0
- chainstream/openapi_client/models/moonshot_submit_create_token200_response.py +90 -0
- chainstream/openapi_client/models/moonshot_submit_create_token_input.py +90 -0
- chainstream/openapi_client/models/network_identification_org.py +88 -0
- chainstream/openapi_client/models/on_chain_activity.py +88 -0
- chainstream/openapi_client/models/pump_create_token_input.py +155 -0
- chainstream/openapi_client/models/pump_create_token_reply.py +90 -0
- chainstream/openapi_client/models/red_packet_claim_dto.py +103 -0
- chainstream/openapi_client/models/red_packet_claims_page.py +104 -0
- chainstream/openapi_client/models/red_packet_dto.py +121 -0
- chainstream/openapi_client/models/red_packet_reply.py +88 -0
- chainstream/openapi_client/models/red_packet_send_tx_input.py +88 -0
- chainstream/openapi_client/models/red_packet_send_tx_response.py +88 -0
- chainstream/openapi_client/models/red_packets_page.py +104 -0
- chainstream/openapi_client/models/register_address_request.py +88 -0
- chainstream/openapi_client/models/register_address_response_dto.py +88 -0
- chainstream/openapi_client/models/resolution.py +46 -0
- chainstream/openapi_client/models/send_tx_input.py +102 -0
- chainstream/openapi_client/models/send_tx_response.py +92 -0
- chainstream/openapi_client/models/swap_input.py +119 -0
- chainstream/openapi_client/models/swap_reply.py +90 -0
- chainstream/openapi_client/models/swap_route_input.py +127 -0
- chainstream/openapi_client/models/swap_route_response.py +98 -0
- chainstream/openapi_client/models/token.py +158 -0
- chainstream/openapi_client/models/token_creation_dto.py +107 -0
- chainstream/openapi_client/models/token_creation_page.py +106 -0
- chainstream/openapi_client/models/token_creators_dto.py +92 -0
- chainstream/openapi_client/models/token_extra_dto.py +128 -0
- chainstream/openapi_client/models/token_holder.py +94 -0
- chainstream/openapi_client/models/token_holder_page.py +106 -0
- chainstream/openapi_client/models/token_liquidity_snapshot_dto.py +106 -0
- chainstream/openapi_client/models/token_liquidity_snapshot_page.py +104 -0
- chainstream/openapi_client/models/token_list_page.py +106 -0
- chainstream/openapi_client/models/token_market_data.py +174 -0
- chainstream/openapi_client/models/token_metadata.py +132 -0
- chainstream/openapi_client/models/token_page.py +108 -0
- chainstream/openapi_client/models/token_price_dto.py +94 -0
- chainstream/openapi_client/models/token_price_page.py +106 -0
- chainstream/openapi_client/models/token_social_medias_dto.py +112 -0
- chainstream/openapi_client/models/token_stat.py +340 -0
- chainstream/openapi_client/models/token_trader.py +113 -0
- chainstream/openapi_client/models/token_trader_tag.py +45 -0
- chainstream/openapi_client/models/top_traders_dto.py +110 -0
- chainstream/openapi_client/models/top_traders_page.py +106 -0
- chainstream/openapi_client/models/trade_detail_dto.py +136 -0
- chainstream/openapi_client/models/trade_event.py +113 -0
- chainstream/openapi_client/models/trade_page.py +106 -0
- chainstream/openapi_client/models/trade_type.py +38 -0
- chainstream/openapi_client/models/transfer_alerts_response_dto.py +96 -0
- chainstream/openapi_client/models/transfer_base_response_dto.py +112 -0
- chainstream/openapi_client/models/transfer_direct_exposure_response_dto.py +92 -0
- chainstream/openapi_client/models/transfer_network_identifications_response_dto.py +98 -0
- chainstream/openapi_client/models/update_endpoint_input.py +104 -0
- chainstream/openapi_client/models/wallet_balance_detail_dto.py +136 -0
- chainstream/openapi_client/models/wallet_balances_dto.py +100 -0
- chainstream/openapi_client/models/wallet_pnl_dto.py +132 -0
- chainstream/openapi_client/models/withdrawal_address_identifications_response_dto.py +98 -0
- chainstream/openapi_client/models/withdrawal_base_response_dto.py +106 -0
- chainstream/openapi_client/models/withdrawal_fraud_assessment_response_dto.py +96 -0
- chainstream/openapi_client/rest.py +213 -0
- chainstream/openapi_client/test/__init__.py +0 -0
- chainstream/openapi_client/test/test_address_exposure.py +59 -0
- chainstream/openapi_client/test/test_address_risk_response_dto.py +81 -0
- chainstream/openapi_client/test/test_alert_detail.py +65 -0
- chainstream/openapi_client/test/test_alterya_identification.py +69 -0
- chainstream/openapi_client/test/test_balance_change_type.py +34 -0
- chainstream/openapi_client/test/test_balance_token_type.py +34 -0
- chainstream/openapi_client/test/test_balance_update_dto.py +93 -0
- chainstream/openapi_client/test/test_balance_update_page.py +105 -0
- chainstream/openapi_client/test/test_blockchain_api.py +46 -0
- chainstream/openapi_client/test/test_blockchain_dto.py +59 -0
- chainstream/openapi_client/test/test_blockchain_latest_block_dto.py +55 -0
- chainstream/openapi_client/test/test_boolean_result_dto.py +53 -0
- chainstream/openapi_client/test/test_calculate_pnl_input.py +52 -0
- chainstream/openapi_client/test/test_candle.py +65 -0
- chainstream/openapi_client/test/test_chain.py +34 -0
- chainstream/openapi_client/test/test_chain_symbol.py +34 -0
- chainstream/openapi_client/test/test_chainalysis_address_identification.py +57 -0
- chainstream/openapi_client/test/test_claim_red_packet_input.py +58 -0
- chainstream/openapi_client/test/test_create_endpoint_input.py +63 -0
- chainstream/openapi_client/test/test_create_red_packet_input.py +64 -0
- chainstream/openapi_client/test/test_create_red_packet_reply.py +55 -0
- chainstream/openapi_client/test/test_create_token_input.py +63 -0
- chainstream/openapi_client/test/test_create_token_reply.py +55 -0
- chainstream/openapi_client/test/test_defi_sol_moonshot_api.py +46 -0
- chainstream/openapi_client/test/test_defi_sol_pumpfun_api.py +39 -0
- chainstream/openapi_client/test/test_dev_token_dto.py +441 -0
- chainstream/openapi_client/test/test_dex_api.py +67 -0
- chainstream/openapi_client/test/test_dex_dto.py +56 -0
- chainstream/openapi_client/test/test_dex_page.py +70 -0
- chainstream/openapi_client/test/test_dex_pool_api.py +46 -0
- chainstream/openapi_client/test/test_dex_pool_dto.py +88 -0
- chainstream/openapi_client/test/test_dex_pool_snapshot_dto.py +96 -0
- chainstream/openapi_client/test/test_dex_pool_snapshot_page.py +81 -0
- chainstream/openapi_client/test/test_dex_pool_token_liquidity.py +65 -0
- chainstream/openapi_client/test/test_dex_pool_token_snapshot_dto.py +65 -0
- chainstream/openapi_client/test/test_dex_quote_response.py +57 -0
- chainstream/openapi_client/test/test_direct_exposure_detail.py +55 -0
- chainstream/openapi_client/test/test_endpoint_api.py +81 -0
- chainstream/openapi_client/test/test_endpoint_list_response.py +72 -0
- chainstream/openapi_client/test/test_endpoint_operation_response.py +52 -0
- chainstream/openapi_client/test/test_endpoint_response.py +66 -0
- chainstream/openapi_client/test/test_endpoint_secret_response.py +52 -0
- chainstream/openapi_client/test/test_estimate_gas_limit_input.py +58 -0
- chainstream/openapi_client/test/test_estimate_gas_limit_response.py +55 -0
- chainstream/openapi_client/test/test_filter_condition.py +54 -0
- chainstream/openapi_client/test/test_gas_price_response.py +55 -0
- chainstream/openapi_client/test/test_ipfs_api.py +39 -0
- chainstream/openapi_client/test/test_job_dto.py +55 -0
- chainstream/openapi_client/test/test_job_streaming_dto.py +55 -0
- chainstream/openapi_client/test/test_jobs_api.py +46 -0
- chainstream/openapi_client/test/test_kyt_api.py +130 -0
- chainstream/openapi_client/test/test_kyt_register_transfer_request.py +59 -0
- chainstream/openapi_client/test/test_kyt_register_withdrawal_request.py +65 -0
- chainstream/openapi_client/test/test_link.py +55 -0
- chainstream/openapi_client/test/test_moonshot_create_token_input.py +79 -0
- chainstream/openapi_client/test/test_moonshot_create_token_reply.py +55 -0
- chainstream/openapi_client/test/test_moonshot_submit_create_token200_response.py +53 -0
- chainstream/openapi_client/test/test_moonshot_submit_create_token_input.py +54 -0
- chainstream/openapi_client/test/test_network_identification_org.py +53 -0
- chainstream/openapi_client/test/test_on_chain_activity.py +53 -0
- chainstream/openapi_client/test/test_pump_create_token_input.py +71 -0
- chainstream/openapi_client/test/test_pump_create_token_reply.py +54 -0
- chainstream/openapi_client/test/test_ranking_api.py +67 -0
- chainstream/openapi_client/test/test_red_packet_api.py +88 -0
- chainstream/openapi_client/test/test_red_packet_claim_dto.py +67 -0
- chainstream/openapi_client/test/test_red_packet_claims_page.py +81 -0
- chainstream/openapi_client/test/test_red_packet_dto.py +85 -0
- chainstream/openapi_client/test/test_red_packet_reply.py +53 -0
- chainstream/openapi_client/test/test_red_packet_send_tx_input.py +53 -0
- chainstream/openapi_client/test/test_red_packet_send_tx_response.py +53 -0
- chainstream/openapi_client/test/test_red_packets_page.py +99 -0
- chainstream/openapi_client/test/test_register_address_request.py +53 -0
- chainstream/openapi_client/test/test_register_address_response_dto.py +53 -0
- chainstream/openapi_client/test/test_resolution.py +34 -0
- chainstream/openapi_client/test/test_send_tx_input.py +55 -0
- chainstream/openapi_client/test/test_send_tx_response.py +57 -0
- chainstream/openapi_client/test/test_swap_input.py +65 -0
- chainstream/openapi_client/test/test_swap_reply.py +55 -0
- chainstream/openapi_client/test/test_swap_route_input.py +69 -0
- chainstream/openapi_client/test/test_swap_route_response.py +85 -0
- chainstream/openapi_client/test/test_token.py +352 -0
- chainstream/openapi_client/test/test_token_api.py +193 -0
- chainstream/openapi_client/test/test_token_creation_dto.py +64 -0
- chainstream/openapi_client/test/test_token_creation_page.py +76 -0
- chainstream/openapi_client/test/test_token_creators_dto.py +54 -0
- chainstream/openapi_client/test/test_token_extra_dto.py +72 -0
- chainstream/openapi_client/test/test_token_holder.py +59 -0
- chainstream/openapi_client/test/test_token_holder_page.py +70 -0
- chainstream/openapi_client/test/test_token_liquidity_snapshot_dto.py +71 -0
- chainstream/openapi_client/test/test_token_liquidity_snapshot_page.py +83 -0
- chainstream/openapi_client/test/test_token_list_page.py +154 -0
- chainstream/openapi_client/test/test_token_market_data.py +101 -0
- chainstream/openapi_client/test/test_token_metadata.py +110 -0
- chainstream/openapi_client/test/test_token_page.py +155 -0
- chainstream/openapi_client/test/test_token_price_dto.py +59 -0
- chainstream/openapi_client/test/test_token_price_page.py +70 -0
- chainstream/openapi_client/test/test_token_social_medias_dto.py +64 -0
- chainstream/openapi_client/test/test_token_stat.py +257 -0
- chainstream/openapi_client/test/test_token_trader.py +65 -0
- chainstream/openapi_client/test/test_token_trader_tag.py +34 -0
- chainstream/openapi_client/test/test_top_traders_dto.py +75 -0
- chainstream/openapi_client/test/test_top_traders_page.py +86 -0
- chainstream/openapi_client/test/test_trade_api.py +53 -0
- chainstream/openapi_client/test/test_trade_detail_dto.py +101 -0
- chainstream/openapi_client/test/test_trade_event.py +77 -0
- chainstream/openapi_client/test/test_trade_page.py +112 -0
- chainstream/openapi_client/test/test_trade_type.py +34 -0
- chainstream/openapi_client/test/test_transaction_api.py +53 -0
- chainstream/openapi_client/test/test_transfer_alerts_response_dto.py +71 -0
- chainstream/openapi_client/test/test_transfer_base_response_dto.py +77 -0
- chainstream/openapi_client/test/test_transfer_direct_exposure_response_dto.py +57 -0
- chainstream/openapi_client/test/test_transfer_network_identifications_response_dto.py +61 -0
- chainstream/openapi_client/test/test_update_endpoint_input.py +64 -0
- chainstream/openapi_client/test/test_wallet_api.py +67 -0
- chainstream/openapi_client/test/test_wallet_balance_detail_dto.py +101 -0
- chainstream/openapi_client/test/test_wallet_balances_dto.py +111 -0
- chainstream/openapi_client/test/test_wallet_pnl_dto.py +97 -0
- chainstream/openapi_client/test/test_watchlist_api.py +39 -0
- chainstream/openapi_client/test/test_withdrawal_address_identifications_response_dto.py +65 -0
- chainstream/openapi_client/test/test_withdrawal_base_response_dto.py +71 -0
- chainstream/openapi_client/test/test_withdrawal_fraud_assessment_response_dto.py +73 -0
- chainstream/stream/__init__.py +74 -0
- chainstream/stream/client.py +761 -0
- chainstream/stream/fields.py +284 -0
- chainstream/stream/models.py +415 -0
- chainstream_sdk-0.1.0.dist-info/METADATA +80 -0
- chainstream_sdk-0.1.0.dist-info/RECORD +261 -0
- chainstream_sdk-0.1.0.dist-info/WHEEL +4 -0
- chainstream_sdk-0.1.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,2444 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Dex Aggregator API
|
|
5
|
+
|
|
6
|
+
Dex Aggregator API ⚡️
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: ai@sx.ai
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import Field, StrictStr, field_validator
|
|
21
|
+
from typing import Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from chainstream.openapi_client.models.chain_symbol import ChainSymbol
|
|
24
|
+
from chainstream.openapi_client.models.claim_red_packet_input import ClaimRedPacketInput
|
|
25
|
+
from chainstream.openapi_client.models.create_red_packet_input import CreateRedPacketInput
|
|
26
|
+
from chainstream.openapi_client.models.create_red_packet_reply import CreateRedPacketReply
|
|
27
|
+
from chainstream.openapi_client.models.red_packet_claims_page import RedPacketClaimsPage
|
|
28
|
+
from chainstream.openapi_client.models.red_packet_dto import RedPacketDTO
|
|
29
|
+
from chainstream.openapi_client.models.red_packet_reply import RedPacketReply
|
|
30
|
+
from chainstream.openapi_client.models.red_packet_send_tx_input import RedPacketSendTxInput
|
|
31
|
+
from chainstream.openapi_client.models.red_packet_send_tx_response import RedPacketSendTxResponse
|
|
32
|
+
from chainstream.openapi_client.models.red_packets_page import RedPacketsPage
|
|
33
|
+
|
|
34
|
+
from chainstream.openapi_client.api_client import ApiClient, RequestSerialized
|
|
35
|
+
from chainstream.openapi_client.api_response import ApiResponse
|
|
36
|
+
from chainstream.openapi_client.rest import RESTResponseType
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class RedPacketApi:
|
|
40
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
41
|
+
Ref: https://openapi-generator.tech
|
|
42
|
+
|
|
43
|
+
Do not edit the class manually.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
def __init__(self, api_client=None) -> None:
|
|
47
|
+
if api_client is None:
|
|
48
|
+
api_client = ApiClient.get_default()
|
|
49
|
+
self.api_client = api_client
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@validate_call
|
|
53
|
+
async def claim_redpacket(
|
|
54
|
+
self,
|
|
55
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
56
|
+
claim_red_packet_input: ClaimRedPacketInput,
|
|
57
|
+
_request_timeout: Union[
|
|
58
|
+
None,
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
60
|
+
Tuple[
|
|
61
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
63
|
+
]
|
|
64
|
+
] = None,
|
|
65
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_content_type: Optional[StrictStr] = None,
|
|
67
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
68
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
69
|
+
) -> RedPacketReply:
|
|
70
|
+
"""CONTROLLER.RED_PACKET.CLAIM.SUMMARY
|
|
71
|
+
|
|
72
|
+
CONTROLLER.RED_PACKET.CLAIM.DESCRIPTION
|
|
73
|
+
|
|
74
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
75
|
+
:type chain: ChainSymbol
|
|
76
|
+
:param claim_red_packet_input: (required)
|
|
77
|
+
:type claim_red_packet_input: ClaimRedPacketInput
|
|
78
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
79
|
+
number provided, it will be total request
|
|
80
|
+
timeout. It can also be a pair (tuple) of
|
|
81
|
+
(connection, read) timeouts.
|
|
82
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
83
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
84
|
+
request; this effectively ignores the
|
|
85
|
+
authentication in the spec for a single request.
|
|
86
|
+
:type _request_auth: dict, optional
|
|
87
|
+
:param _content_type: force content-type for the request.
|
|
88
|
+
:type _content_type: str, Optional
|
|
89
|
+
:param _headers: set to override the headers for a single
|
|
90
|
+
request; this effectively ignores the headers
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _headers: dict, optional
|
|
93
|
+
:param _host_index: set to override the host_index for a single
|
|
94
|
+
request; this effectively ignores the host_index
|
|
95
|
+
in the spec for a single request.
|
|
96
|
+
:type _host_index: int, optional
|
|
97
|
+
:return: Returns the result object.
|
|
98
|
+
""" # noqa: E501
|
|
99
|
+
|
|
100
|
+
_param = self._claim_redpacket_serialize(
|
|
101
|
+
chain=chain,
|
|
102
|
+
claim_red_packet_input=claim_red_packet_input,
|
|
103
|
+
_request_auth=_request_auth,
|
|
104
|
+
_content_type=_content_type,
|
|
105
|
+
_headers=_headers,
|
|
106
|
+
_host_index=_host_index
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
110
|
+
'200': "RedPacketReply",
|
|
111
|
+
}
|
|
112
|
+
response_data = await self.api_client.call_api(
|
|
113
|
+
*_param,
|
|
114
|
+
_request_timeout=_request_timeout
|
|
115
|
+
)
|
|
116
|
+
await response_data.read()
|
|
117
|
+
return self.api_client.response_deserialize(
|
|
118
|
+
response_data=response_data,
|
|
119
|
+
response_types_map=_response_types_map,
|
|
120
|
+
).data
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
@validate_call
|
|
124
|
+
async def claim_redpacket_with_http_info(
|
|
125
|
+
self,
|
|
126
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
127
|
+
claim_red_packet_input: ClaimRedPacketInput,
|
|
128
|
+
_request_timeout: Union[
|
|
129
|
+
None,
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Tuple[
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
133
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
134
|
+
]
|
|
135
|
+
] = None,
|
|
136
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_content_type: Optional[StrictStr] = None,
|
|
138
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
139
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
140
|
+
) -> ApiResponse[RedPacketReply]:
|
|
141
|
+
"""CONTROLLER.RED_PACKET.CLAIM.SUMMARY
|
|
142
|
+
|
|
143
|
+
CONTROLLER.RED_PACKET.CLAIM.DESCRIPTION
|
|
144
|
+
|
|
145
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
146
|
+
:type chain: ChainSymbol
|
|
147
|
+
:param claim_red_packet_input: (required)
|
|
148
|
+
:type claim_red_packet_input: ClaimRedPacketInput
|
|
149
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
150
|
+
number provided, it will be total request
|
|
151
|
+
timeout. It can also be a pair (tuple) of
|
|
152
|
+
(connection, read) timeouts.
|
|
153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
155
|
+
request; this effectively ignores the
|
|
156
|
+
authentication in the spec for a single request.
|
|
157
|
+
:type _request_auth: dict, optional
|
|
158
|
+
:param _content_type: force content-type for the request.
|
|
159
|
+
:type _content_type: str, Optional
|
|
160
|
+
:param _headers: set to override the headers for a single
|
|
161
|
+
request; this effectively ignores the headers
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _headers: dict, optional
|
|
164
|
+
:param _host_index: set to override the host_index for a single
|
|
165
|
+
request; this effectively ignores the host_index
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _host_index: int, optional
|
|
168
|
+
:return: Returns the result object.
|
|
169
|
+
""" # noqa: E501
|
|
170
|
+
|
|
171
|
+
_param = self._claim_redpacket_serialize(
|
|
172
|
+
chain=chain,
|
|
173
|
+
claim_red_packet_input=claim_red_packet_input,
|
|
174
|
+
_request_auth=_request_auth,
|
|
175
|
+
_content_type=_content_type,
|
|
176
|
+
_headers=_headers,
|
|
177
|
+
_host_index=_host_index
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
181
|
+
'200': "RedPacketReply",
|
|
182
|
+
}
|
|
183
|
+
response_data = await self.api_client.call_api(
|
|
184
|
+
*_param,
|
|
185
|
+
_request_timeout=_request_timeout
|
|
186
|
+
)
|
|
187
|
+
await response_data.read()
|
|
188
|
+
return self.api_client.response_deserialize(
|
|
189
|
+
response_data=response_data,
|
|
190
|
+
response_types_map=_response_types_map,
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
@validate_call
|
|
195
|
+
async def claim_redpacket_without_preload_content(
|
|
196
|
+
self,
|
|
197
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
198
|
+
claim_red_packet_input: ClaimRedPacketInput,
|
|
199
|
+
_request_timeout: Union[
|
|
200
|
+
None,
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
202
|
+
Tuple[
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
204
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
205
|
+
]
|
|
206
|
+
] = None,
|
|
207
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
208
|
+
_content_type: Optional[StrictStr] = None,
|
|
209
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
210
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
211
|
+
) -> RESTResponseType:
|
|
212
|
+
"""CONTROLLER.RED_PACKET.CLAIM.SUMMARY
|
|
213
|
+
|
|
214
|
+
CONTROLLER.RED_PACKET.CLAIM.DESCRIPTION
|
|
215
|
+
|
|
216
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
217
|
+
:type chain: ChainSymbol
|
|
218
|
+
:param claim_red_packet_input: (required)
|
|
219
|
+
:type claim_red_packet_input: ClaimRedPacketInput
|
|
220
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
221
|
+
number provided, it will be total request
|
|
222
|
+
timeout. It can also be a pair (tuple) of
|
|
223
|
+
(connection, read) timeouts.
|
|
224
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
225
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
226
|
+
request; this effectively ignores the
|
|
227
|
+
authentication in the spec for a single request.
|
|
228
|
+
:type _request_auth: dict, optional
|
|
229
|
+
:param _content_type: force content-type for the request.
|
|
230
|
+
:type _content_type: str, Optional
|
|
231
|
+
:param _headers: set to override the headers for a single
|
|
232
|
+
request; this effectively ignores the headers
|
|
233
|
+
in the spec for a single request.
|
|
234
|
+
:type _headers: dict, optional
|
|
235
|
+
:param _host_index: set to override the host_index for a single
|
|
236
|
+
request; this effectively ignores the host_index
|
|
237
|
+
in the spec for a single request.
|
|
238
|
+
:type _host_index: int, optional
|
|
239
|
+
:return: Returns the result object.
|
|
240
|
+
""" # noqa: E501
|
|
241
|
+
|
|
242
|
+
_param = self._claim_redpacket_serialize(
|
|
243
|
+
chain=chain,
|
|
244
|
+
claim_red_packet_input=claim_red_packet_input,
|
|
245
|
+
_request_auth=_request_auth,
|
|
246
|
+
_content_type=_content_type,
|
|
247
|
+
_headers=_headers,
|
|
248
|
+
_host_index=_host_index
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
252
|
+
'200': "RedPacketReply",
|
|
253
|
+
}
|
|
254
|
+
response_data = await self.api_client.call_api(
|
|
255
|
+
*_param,
|
|
256
|
+
_request_timeout=_request_timeout
|
|
257
|
+
)
|
|
258
|
+
return response_data.response
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def _claim_redpacket_serialize(
|
|
262
|
+
self,
|
|
263
|
+
chain,
|
|
264
|
+
claim_red_packet_input,
|
|
265
|
+
_request_auth,
|
|
266
|
+
_content_type,
|
|
267
|
+
_headers,
|
|
268
|
+
_host_index,
|
|
269
|
+
) -> RequestSerialized:
|
|
270
|
+
|
|
271
|
+
_host = None
|
|
272
|
+
|
|
273
|
+
_collection_formats: Dict[str, str] = {
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
_path_params: Dict[str, str] = {}
|
|
277
|
+
_query_params: List[Tuple[str, str]] = []
|
|
278
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
279
|
+
_form_params: List[Tuple[str, str]] = []
|
|
280
|
+
_files: Dict[
|
|
281
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
282
|
+
] = {}
|
|
283
|
+
_body_params: Optional[bytes] = None
|
|
284
|
+
|
|
285
|
+
# process the path parameters
|
|
286
|
+
if chain is not None:
|
|
287
|
+
_path_params['chain'] = chain.value
|
|
288
|
+
# process the query parameters
|
|
289
|
+
# process the header parameters
|
|
290
|
+
# process the form parameters
|
|
291
|
+
# process the body parameter
|
|
292
|
+
if claim_red_packet_input is not None:
|
|
293
|
+
_body_params = claim_red_packet_input
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
# set the HTTP header `Accept`
|
|
297
|
+
if 'Accept' not in _header_params:
|
|
298
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
299
|
+
[
|
|
300
|
+
'application/json'
|
|
301
|
+
]
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
# set the HTTP header `Content-Type`
|
|
305
|
+
if _content_type:
|
|
306
|
+
_header_params['Content-Type'] = _content_type
|
|
307
|
+
else:
|
|
308
|
+
_default_content_type = (
|
|
309
|
+
self.api_client.select_header_content_type(
|
|
310
|
+
[
|
|
311
|
+
'application/json'
|
|
312
|
+
]
|
|
313
|
+
)
|
|
314
|
+
)
|
|
315
|
+
if _default_content_type is not None:
|
|
316
|
+
_header_params['Content-Type'] = _default_content_type
|
|
317
|
+
|
|
318
|
+
# authentication setting
|
|
319
|
+
_auth_settings: List[str] = [
|
|
320
|
+
'bearer'
|
|
321
|
+
]
|
|
322
|
+
|
|
323
|
+
return self.api_client.param_serialize(
|
|
324
|
+
method='POST',
|
|
325
|
+
resource_path='/v1/redpacket/{chain}/claim',
|
|
326
|
+
path_params=_path_params,
|
|
327
|
+
query_params=_query_params,
|
|
328
|
+
header_params=_header_params,
|
|
329
|
+
body=_body_params,
|
|
330
|
+
post_params=_form_params,
|
|
331
|
+
files=_files,
|
|
332
|
+
auth_settings=_auth_settings,
|
|
333
|
+
collection_formats=_collection_formats,
|
|
334
|
+
_host=_host,
|
|
335
|
+
_request_auth=_request_auth
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
@validate_call
|
|
342
|
+
async def create_redpacket(
|
|
343
|
+
self,
|
|
344
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
345
|
+
create_red_packet_input: CreateRedPacketInput,
|
|
346
|
+
_request_timeout: Union[
|
|
347
|
+
None,
|
|
348
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
349
|
+
Tuple[
|
|
350
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
351
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
352
|
+
]
|
|
353
|
+
] = None,
|
|
354
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
355
|
+
_content_type: Optional[StrictStr] = None,
|
|
356
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
357
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
358
|
+
) -> CreateRedPacketReply:
|
|
359
|
+
"""CONTROLLER.RED_PACKET.CREATE.SUMMARY
|
|
360
|
+
|
|
361
|
+
CONTROLLER.RED_PACKET.CREATE.DESCRIPTION
|
|
362
|
+
|
|
363
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
364
|
+
:type chain: ChainSymbol
|
|
365
|
+
:param create_red_packet_input: (required)
|
|
366
|
+
:type create_red_packet_input: CreateRedPacketInput
|
|
367
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
368
|
+
number provided, it will be total request
|
|
369
|
+
timeout. It can also be a pair (tuple) of
|
|
370
|
+
(connection, read) timeouts.
|
|
371
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
372
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
373
|
+
request; this effectively ignores the
|
|
374
|
+
authentication in the spec for a single request.
|
|
375
|
+
:type _request_auth: dict, optional
|
|
376
|
+
:param _content_type: force content-type for the request.
|
|
377
|
+
:type _content_type: str, Optional
|
|
378
|
+
:param _headers: set to override the headers for a single
|
|
379
|
+
request; this effectively ignores the headers
|
|
380
|
+
in the spec for a single request.
|
|
381
|
+
:type _headers: dict, optional
|
|
382
|
+
:param _host_index: set to override the host_index for a single
|
|
383
|
+
request; this effectively ignores the host_index
|
|
384
|
+
in the spec for a single request.
|
|
385
|
+
:type _host_index: int, optional
|
|
386
|
+
:return: Returns the result object.
|
|
387
|
+
""" # noqa: E501
|
|
388
|
+
|
|
389
|
+
_param = self._create_redpacket_serialize(
|
|
390
|
+
chain=chain,
|
|
391
|
+
create_red_packet_input=create_red_packet_input,
|
|
392
|
+
_request_auth=_request_auth,
|
|
393
|
+
_content_type=_content_type,
|
|
394
|
+
_headers=_headers,
|
|
395
|
+
_host_index=_host_index
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
399
|
+
'200': "CreateRedPacketReply",
|
|
400
|
+
}
|
|
401
|
+
response_data = await self.api_client.call_api(
|
|
402
|
+
*_param,
|
|
403
|
+
_request_timeout=_request_timeout
|
|
404
|
+
)
|
|
405
|
+
await response_data.read()
|
|
406
|
+
return self.api_client.response_deserialize(
|
|
407
|
+
response_data=response_data,
|
|
408
|
+
response_types_map=_response_types_map,
|
|
409
|
+
).data
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
@validate_call
|
|
413
|
+
async def create_redpacket_with_http_info(
|
|
414
|
+
self,
|
|
415
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
416
|
+
create_red_packet_input: CreateRedPacketInput,
|
|
417
|
+
_request_timeout: Union[
|
|
418
|
+
None,
|
|
419
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
420
|
+
Tuple[
|
|
421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
422
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
423
|
+
]
|
|
424
|
+
] = None,
|
|
425
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
426
|
+
_content_type: Optional[StrictStr] = None,
|
|
427
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
428
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
429
|
+
) -> ApiResponse[CreateRedPacketReply]:
|
|
430
|
+
"""CONTROLLER.RED_PACKET.CREATE.SUMMARY
|
|
431
|
+
|
|
432
|
+
CONTROLLER.RED_PACKET.CREATE.DESCRIPTION
|
|
433
|
+
|
|
434
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
435
|
+
:type chain: ChainSymbol
|
|
436
|
+
:param create_red_packet_input: (required)
|
|
437
|
+
:type create_red_packet_input: CreateRedPacketInput
|
|
438
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
439
|
+
number provided, it will be total request
|
|
440
|
+
timeout. It can also be a pair (tuple) of
|
|
441
|
+
(connection, read) timeouts.
|
|
442
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
443
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
444
|
+
request; this effectively ignores the
|
|
445
|
+
authentication in the spec for a single request.
|
|
446
|
+
:type _request_auth: dict, optional
|
|
447
|
+
:param _content_type: force content-type for the request.
|
|
448
|
+
:type _content_type: str, Optional
|
|
449
|
+
:param _headers: set to override the headers for a single
|
|
450
|
+
request; this effectively ignores the headers
|
|
451
|
+
in the spec for a single request.
|
|
452
|
+
:type _headers: dict, optional
|
|
453
|
+
:param _host_index: set to override the host_index for a single
|
|
454
|
+
request; this effectively ignores the host_index
|
|
455
|
+
in the spec for a single request.
|
|
456
|
+
:type _host_index: int, optional
|
|
457
|
+
:return: Returns the result object.
|
|
458
|
+
""" # noqa: E501
|
|
459
|
+
|
|
460
|
+
_param = self._create_redpacket_serialize(
|
|
461
|
+
chain=chain,
|
|
462
|
+
create_red_packet_input=create_red_packet_input,
|
|
463
|
+
_request_auth=_request_auth,
|
|
464
|
+
_content_type=_content_type,
|
|
465
|
+
_headers=_headers,
|
|
466
|
+
_host_index=_host_index
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
470
|
+
'200': "CreateRedPacketReply",
|
|
471
|
+
}
|
|
472
|
+
response_data = await self.api_client.call_api(
|
|
473
|
+
*_param,
|
|
474
|
+
_request_timeout=_request_timeout
|
|
475
|
+
)
|
|
476
|
+
await response_data.read()
|
|
477
|
+
return self.api_client.response_deserialize(
|
|
478
|
+
response_data=response_data,
|
|
479
|
+
response_types_map=_response_types_map,
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
@validate_call
|
|
484
|
+
async def create_redpacket_without_preload_content(
|
|
485
|
+
self,
|
|
486
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
487
|
+
create_red_packet_input: CreateRedPacketInput,
|
|
488
|
+
_request_timeout: Union[
|
|
489
|
+
None,
|
|
490
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
491
|
+
Tuple[
|
|
492
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
493
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
494
|
+
]
|
|
495
|
+
] = None,
|
|
496
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
497
|
+
_content_type: Optional[StrictStr] = None,
|
|
498
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
499
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
500
|
+
) -> RESTResponseType:
|
|
501
|
+
"""CONTROLLER.RED_PACKET.CREATE.SUMMARY
|
|
502
|
+
|
|
503
|
+
CONTROLLER.RED_PACKET.CREATE.DESCRIPTION
|
|
504
|
+
|
|
505
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
506
|
+
:type chain: ChainSymbol
|
|
507
|
+
:param create_red_packet_input: (required)
|
|
508
|
+
:type create_red_packet_input: CreateRedPacketInput
|
|
509
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
510
|
+
number provided, it will be total request
|
|
511
|
+
timeout. It can also be a pair (tuple) of
|
|
512
|
+
(connection, read) timeouts.
|
|
513
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
514
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
515
|
+
request; this effectively ignores the
|
|
516
|
+
authentication in the spec for a single request.
|
|
517
|
+
:type _request_auth: dict, optional
|
|
518
|
+
:param _content_type: force content-type for the request.
|
|
519
|
+
:type _content_type: str, Optional
|
|
520
|
+
:param _headers: set to override the headers for a single
|
|
521
|
+
request; this effectively ignores the headers
|
|
522
|
+
in the spec for a single request.
|
|
523
|
+
:type _headers: dict, optional
|
|
524
|
+
:param _host_index: set to override the host_index for a single
|
|
525
|
+
request; this effectively ignores the host_index
|
|
526
|
+
in the spec for a single request.
|
|
527
|
+
:type _host_index: int, optional
|
|
528
|
+
:return: Returns the result object.
|
|
529
|
+
""" # noqa: E501
|
|
530
|
+
|
|
531
|
+
_param = self._create_redpacket_serialize(
|
|
532
|
+
chain=chain,
|
|
533
|
+
create_red_packet_input=create_red_packet_input,
|
|
534
|
+
_request_auth=_request_auth,
|
|
535
|
+
_content_type=_content_type,
|
|
536
|
+
_headers=_headers,
|
|
537
|
+
_host_index=_host_index
|
|
538
|
+
)
|
|
539
|
+
|
|
540
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
541
|
+
'200': "CreateRedPacketReply",
|
|
542
|
+
}
|
|
543
|
+
response_data = await self.api_client.call_api(
|
|
544
|
+
*_param,
|
|
545
|
+
_request_timeout=_request_timeout
|
|
546
|
+
)
|
|
547
|
+
return response_data.response
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
def _create_redpacket_serialize(
|
|
551
|
+
self,
|
|
552
|
+
chain,
|
|
553
|
+
create_red_packet_input,
|
|
554
|
+
_request_auth,
|
|
555
|
+
_content_type,
|
|
556
|
+
_headers,
|
|
557
|
+
_host_index,
|
|
558
|
+
) -> RequestSerialized:
|
|
559
|
+
|
|
560
|
+
_host = None
|
|
561
|
+
|
|
562
|
+
_collection_formats: Dict[str, str] = {
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
_path_params: Dict[str, str] = {}
|
|
566
|
+
_query_params: List[Tuple[str, str]] = []
|
|
567
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
568
|
+
_form_params: List[Tuple[str, str]] = []
|
|
569
|
+
_files: Dict[
|
|
570
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
571
|
+
] = {}
|
|
572
|
+
_body_params: Optional[bytes] = None
|
|
573
|
+
|
|
574
|
+
# process the path parameters
|
|
575
|
+
if chain is not None:
|
|
576
|
+
_path_params['chain'] = chain.value
|
|
577
|
+
# process the query parameters
|
|
578
|
+
# process the header parameters
|
|
579
|
+
# process the form parameters
|
|
580
|
+
# process the body parameter
|
|
581
|
+
if create_red_packet_input is not None:
|
|
582
|
+
_body_params = create_red_packet_input
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
# set the HTTP header `Accept`
|
|
586
|
+
if 'Accept' not in _header_params:
|
|
587
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
588
|
+
[
|
|
589
|
+
'application/json'
|
|
590
|
+
]
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
# set the HTTP header `Content-Type`
|
|
594
|
+
if _content_type:
|
|
595
|
+
_header_params['Content-Type'] = _content_type
|
|
596
|
+
else:
|
|
597
|
+
_default_content_type = (
|
|
598
|
+
self.api_client.select_header_content_type(
|
|
599
|
+
[
|
|
600
|
+
'application/json'
|
|
601
|
+
]
|
|
602
|
+
)
|
|
603
|
+
)
|
|
604
|
+
if _default_content_type is not None:
|
|
605
|
+
_header_params['Content-Type'] = _default_content_type
|
|
606
|
+
|
|
607
|
+
# authentication setting
|
|
608
|
+
_auth_settings: List[str] = [
|
|
609
|
+
'bearer'
|
|
610
|
+
]
|
|
611
|
+
|
|
612
|
+
return self.api_client.param_serialize(
|
|
613
|
+
method='POST',
|
|
614
|
+
resource_path='/v1/redpacket/{chain}/create',
|
|
615
|
+
path_params=_path_params,
|
|
616
|
+
query_params=_query_params,
|
|
617
|
+
header_params=_header_params,
|
|
618
|
+
body=_body_params,
|
|
619
|
+
post_params=_form_params,
|
|
620
|
+
files=_files,
|
|
621
|
+
auth_settings=_auth_settings,
|
|
622
|
+
collection_formats=_collection_formats,
|
|
623
|
+
_host=_host,
|
|
624
|
+
_request_auth=_request_auth
|
|
625
|
+
)
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
@validate_call
|
|
631
|
+
async def get_claims(
|
|
632
|
+
self,
|
|
633
|
+
id: Annotated[StrictStr, Field(description="DTO.RED_PACKET.ID")],
|
|
634
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
635
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
636
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
637
|
+
_request_timeout: Union[
|
|
638
|
+
None,
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Tuple[
|
|
641
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
642
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
643
|
+
]
|
|
644
|
+
] = None,
|
|
645
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_content_type: Optional[StrictStr] = None,
|
|
647
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
648
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
649
|
+
) -> RedPacketClaimsPage:
|
|
650
|
+
"""CONTROLLER.RED_PACKET.GET_CLAIMS.SUMMARY
|
|
651
|
+
|
|
652
|
+
CONTROLLER.RED_PACKET.GET_CLAIMS.DESCRIPTION
|
|
653
|
+
|
|
654
|
+
:param id: DTO.RED_PACKET.ID (required)
|
|
655
|
+
:type id: str
|
|
656
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
657
|
+
:type cursor: str
|
|
658
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
659
|
+
:type limit: int
|
|
660
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
661
|
+
:type direction: str
|
|
662
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
663
|
+
number provided, it will be total request
|
|
664
|
+
timeout. It can also be a pair (tuple) of
|
|
665
|
+
(connection, read) timeouts.
|
|
666
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
667
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
668
|
+
request; this effectively ignores the
|
|
669
|
+
authentication in the spec for a single request.
|
|
670
|
+
:type _request_auth: dict, optional
|
|
671
|
+
:param _content_type: force content-type for the request.
|
|
672
|
+
:type _content_type: str, Optional
|
|
673
|
+
:param _headers: set to override the headers for a single
|
|
674
|
+
request; this effectively ignores the headers
|
|
675
|
+
in the spec for a single request.
|
|
676
|
+
:type _headers: dict, optional
|
|
677
|
+
:param _host_index: set to override the host_index for a single
|
|
678
|
+
request; this effectively ignores the host_index
|
|
679
|
+
in the spec for a single request.
|
|
680
|
+
:type _host_index: int, optional
|
|
681
|
+
:return: Returns the result object.
|
|
682
|
+
""" # noqa: E501
|
|
683
|
+
|
|
684
|
+
_param = self._get_claims_serialize(
|
|
685
|
+
id=id,
|
|
686
|
+
cursor=cursor,
|
|
687
|
+
limit=limit,
|
|
688
|
+
direction=direction,
|
|
689
|
+
_request_auth=_request_auth,
|
|
690
|
+
_content_type=_content_type,
|
|
691
|
+
_headers=_headers,
|
|
692
|
+
_host_index=_host_index
|
|
693
|
+
)
|
|
694
|
+
|
|
695
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
696
|
+
'200': "RedPacketClaimsPage",
|
|
697
|
+
}
|
|
698
|
+
response_data = await self.api_client.call_api(
|
|
699
|
+
*_param,
|
|
700
|
+
_request_timeout=_request_timeout
|
|
701
|
+
)
|
|
702
|
+
await response_data.read()
|
|
703
|
+
return self.api_client.response_deserialize(
|
|
704
|
+
response_data=response_data,
|
|
705
|
+
response_types_map=_response_types_map,
|
|
706
|
+
).data
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
@validate_call
|
|
710
|
+
async def get_claims_with_http_info(
|
|
711
|
+
self,
|
|
712
|
+
id: Annotated[StrictStr, Field(description="DTO.RED_PACKET.ID")],
|
|
713
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
714
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
715
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
716
|
+
_request_timeout: Union[
|
|
717
|
+
None,
|
|
718
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
719
|
+
Tuple[
|
|
720
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
721
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
722
|
+
]
|
|
723
|
+
] = None,
|
|
724
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
725
|
+
_content_type: Optional[StrictStr] = None,
|
|
726
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
727
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
728
|
+
) -> ApiResponse[RedPacketClaimsPage]:
|
|
729
|
+
"""CONTROLLER.RED_PACKET.GET_CLAIMS.SUMMARY
|
|
730
|
+
|
|
731
|
+
CONTROLLER.RED_PACKET.GET_CLAIMS.DESCRIPTION
|
|
732
|
+
|
|
733
|
+
:param id: DTO.RED_PACKET.ID (required)
|
|
734
|
+
:type id: str
|
|
735
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
736
|
+
:type cursor: str
|
|
737
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
738
|
+
:type limit: int
|
|
739
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
740
|
+
:type direction: str
|
|
741
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
742
|
+
number provided, it will be total request
|
|
743
|
+
timeout. It can also be a pair (tuple) of
|
|
744
|
+
(connection, read) timeouts.
|
|
745
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
746
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
747
|
+
request; this effectively ignores the
|
|
748
|
+
authentication in the spec for a single request.
|
|
749
|
+
:type _request_auth: dict, optional
|
|
750
|
+
:param _content_type: force content-type for the request.
|
|
751
|
+
:type _content_type: str, Optional
|
|
752
|
+
:param _headers: set to override the headers for a single
|
|
753
|
+
request; this effectively ignores the headers
|
|
754
|
+
in the spec for a single request.
|
|
755
|
+
:type _headers: dict, optional
|
|
756
|
+
:param _host_index: set to override the host_index for a single
|
|
757
|
+
request; this effectively ignores the host_index
|
|
758
|
+
in the spec for a single request.
|
|
759
|
+
:type _host_index: int, optional
|
|
760
|
+
:return: Returns the result object.
|
|
761
|
+
""" # noqa: E501
|
|
762
|
+
|
|
763
|
+
_param = self._get_claims_serialize(
|
|
764
|
+
id=id,
|
|
765
|
+
cursor=cursor,
|
|
766
|
+
limit=limit,
|
|
767
|
+
direction=direction,
|
|
768
|
+
_request_auth=_request_auth,
|
|
769
|
+
_content_type=_content_type,
|
|
770
|
+
_headers=_headers,
|
|
771
|
+
_host_index=_host_index
|
|
772
|
+
)
|
|
773
|
+
|
|
774
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
775
|
+
'200': "RedPacketClaimsPage",
|
|
776
|
+
}
|
|
777
|
+
response_data = await self.api_client.call_api(
|
|
778
|
+
*_param,
|
|
779
|
+
_request_timeout=_request_timeout
|
|
780
|
+
)
|
|
781
|
+
await response_data.read()
|
|
782
|
+
return self.api_client.response_deserialize(
|
|
783
|
+
response_data=response_data,
|
|
784
|
+
response_types_map=_response_types_map,
|
|
785
|
+
)
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
@validate_call
|
|
789
|
+
async def get_claims_without_preload_content(
|
|
790
|
+
self,
|
|
791
|
+
id: Annotated[StrictStr, Field(description="DTO.RED_PACKET.ID")],
|
|
792
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
793
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
794
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
795
|
+
_request_timeout: Union[
|
|
796
|
+
None,
|
|
797
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
798
|
+
Tuple[
|
|
799
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
800
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
801
|
+
]
|
|
802
|
+
] = None,
|
|
803
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
804
|
+
_content_type: Optional[StrictStr] = None,
|
|
805
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
806
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
807
|
+
) -> RESTResponseType:
|
|
808
|
+
"""CONTROLLER.RED_PACKET.GET_CLAIMS.SUMMARY
|
|
809
|
+
|
|
810
|
+
CONTROLLER.RED_PACKET.GET_CLAIMS.DESCRIPTION
|
|
811
|
+
|
|
812
|
+
:param id: DTO.RED_PACKET.ID (required)
|
|
813
|
+
:type id: str
|
|
814
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
815
|
+
:type cursor: str
|
|
816
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
817
|
+
:type limit: int
|
|
818
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
819
|
+
:type direction: str
|
|
820
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
821
|
+
number provided, it will be total request
|
|
822
|
+
timeout. It can also be a pair (tuple) of
|
|
823
|
+
(connection, read) timeouts.
|
|
824
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
825
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
826
|
+
request; this effectively ignores the
|
|
827
|
+
authentication in the spec for a single request.
|
|
828
|
+
:type _request_auth: dict, optional
|
|
829
|
+
:param _content_type: force content-type for the request.
|
|
830
|
+
:type _content_type: str, Optional
|
|
831
|
+
:param _headers: set to override the headers for a single
|
|
832
|
+
request; this effectively ignores the headers
|
|
833
|
+
in the spec for a single request.
|
|
834
|
+
:type _headers: dict, optional
|
|
835
|
+
:param _host_index: set to override the host_index for a single
|
|
836
|
+
request; this effectively ignores the host_index
|
|
837
|
+
in the spec for a single request.
|
|
838
|
+
:type _host_index: int, optional
|
|
839
|
+
:return: Returns the result object.
|
|
840
|
+
""" # noqa: E501
|
|
841
|
+
|
|
842
|
+
_param = self._get_claims_serialize(
|
|
843
|
+
id=id,
|
|
844
|
+
cursor=cursor,
|
|
845
|
+
limit=limit,
|
|
846
|
+
direction=direction,
|
|
847
|
+
_request_auth=_request_auth,
|
|
848
|
+
_content_type=_content_type,
|
|
849
|
+
_headers=_headers,
|
|
850
|
+
_host_index=_host_index
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
854
|
+
'200': "RedPacketClaimsPage",
|
|
855
|
+
}
|
|
856
|
+
response_data = await self.api_client.call_api(
|
|
857
|
+
*_param,
|
|
858
|
+
_request_timeout=_request_timeout
|
|
859
|
+
)
|
|
860
|
+
return response_data.response
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
def _get_claims_serialize(
|
|
864
|
+
self,
|
|
865
|
+
id,
|
|
866
|
+
cursor,
|
|
867
|
+
limit,
|
|
868
|
+
direction,
|
|
869
|
+
_request_auth,
|
|
870
|
+
_content_type,
|
|
871
|
+
_headers,
|
|
872
|
+
_host_index,
|
|
873
|
+
) -> RequestSerialized:
|
|
874
|
+
|
|
875
|
+
_host = None
|
|
876
|
+
|
|
877
|
+
_collection_formats: Dict[str, str] = {
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
_path_params: Dict[str, str] = {}
|
|
881
|
+
_query_params: List[Tuple[str, str]] = []
|
|
882
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
883
|
+
_form_params: List[Tuple[str, str]] = []
|
|
884
|
+
_files: Dict[
|
|
885
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
886
|
+
] = {}
|
|
887
|
+
_body_params: Optional[bytes] = None
|
|
888
|
+
|
|
889
|
+
# process the path parameters
|
|
890
|
+
if id is not None:
|
|
891
|
+
_path_params['id'] = id
|
|
892
|
+
# process the query parameters
|
|
893
|
+
if cursor is not None:
|
|
894
|
+
|
|
895
|
+
_query_params.append(('cursor', cursor))
|
|
896
|
+
|
|
897
|
+
if limit is not None:
|
|
898
|
+
|
|
899
|
+
_query_params.append(('limit', limit))
|
|
900
|
+
|
|
901
|
+
if direction is not None:
|
|
902
|
+
|
|
903
|
+
_query_params.append(('direction', direction))
|
|
904
|
+
|
|
905
|
+
# process the header parameters
|
|
906
|
+
# process the form parameters
|
|
907
|
+
# process the body parameter
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
# set the HTTP header `Accept`
|
|
911
|
+
if 'Accept' not in _header_params:
|
|
912
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
913
|
+
[
|
|
914
|
+
'application/json'
|
|
915
|
+
]
|
|
916
|
+
)
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
# authentication setting
|
|
920
|
+
_auth_settings: List[str] = [
|
|
921
|
+
'bearer'
|
|
922
|
+
]
|
|
923
|
+
|
|
924
|
+
return self.api_client.param_serialize(
|
|
925
|
+
method='GET',
|
|
926
|
+
resource_path='/v1/redpacket/{id}/claims',
|
|
927
|
+
path_params=_path_params,
|
|
928
|
+
query_params=_query_params,
|
|
929
|
+
header_params=_header_params,
|
|
930
|
+
body=_body_params,
|
|
931
|
+
post_params=_form_params,
|
|
932
|
+
files=_files,
|
|
933
|
+
auth_settings=_auth_settings,
|
|
934
|
+
collection_formats=_collection_formats,
|
|
935
|
+
_host=_host,
|
|
936
|
+
_request_auth=_request_auth
|
|
937
|
+
)
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
@validate_call
|
|
943
|
+
async def get_claims_by_address(
|
|
944
|
+
self,
|
|
945
|
+
address: StrictStr,
|
|
946
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
947
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
948
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
949
|
+
_request_timeout: Union[
|
|
950
|
+
None,
|
|
951
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
952
|
+
Tuple[
|
|
953
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
954
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
955
|
+
]
|
|
956
|
+
] = None,
|
|
957
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
958
|
+
_content_type: Optional[StrictStr] = None,
|
|
959
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
960
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
961
|
+
) -> RedPacketClaimsPage:
|
|
962
|
+
"""CONTROLLER.RED_PACKET.GET_CLAIMS_BY_ADDRESS.SUMMARY
|
|
963
|
+
|
|
964
|
+
CONTROLLER.RED_PACKET.GET_CLAIMS_BY_ADDRESS.DESCRIPTION
|
|
965
|
+
|
|
966
|
+
:param address: (required)
|
|
967
|
+
:type address: str
|
|
968
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
969
|
+
:type cursor: str
|
|
970
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
971
|
+
:type limit: int
|
|
972
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
973
|
+
:type direction: str
|
|
974
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
975
|
+
number provided, it will be total request
|
|
976
|
+
timeout. It can also be a pair (tuple) of
|
|
977
|
+
(connection, read) timeouts.
|
|
978
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
979
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
980
|
+
request; this effectively ignores the
|
|
981
|
+
authentication in the spec for a single request.
|
|
982
|
+
:type _request_auth: dict, optional
|
|
983
|
+
:param _content_type: force content-type for the request.
|
|
984
|
+
:type _content_type: str, Optional
|
|
985
|
+
:param _headers: set to override the headers for a single
|
|
986
|
+
request; this effectively ignores the headers
|
|
987
|
+
in the spec for a single request.
|
|
988
|
+
:type _headers: dict, optional
|
|
989
|
+
:param _host_index: set to override the host_index for a single
|
|
990
|
+
request; this effectively ignores the host_index
|
|
991
|
+
in the spec for a single request.
|
|
992
|
+
:type _host_index: int, optional
|
|
993
|
+
:return: Returns the result object.
|
|
994
|
+
""" # noqa: E501
|
|
995
|
+
|
|
996
|
+
_param = self._get_claims_by_address_serialize(
|
|
997
|
+
address=address,
|
|
998
|
+
cursor=cursor,
|
|
999
|
+
limit=limit,
|
|
1000
|
+
direction=direction,
|
|
1001
|
+
_request_auth=_request_auth,
|
|
1002
|
+
_content_type=_content_type,
|
|
1003
|
+
_headers=_headers,
|
|
1004
|
+
_host_index=_host_index
|
|
1005
|
+
)
|
|
1006
|
+
|
|
1007
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1008
|
+
'200': "RedPacketClaimsPage",
|
|
1009
|
+
}
|
|
1010
|
+
response_data = await self.api_client.call_api(
|
|
1011
|
+
*_param,
|
|
1012
|
+
_request_timeout=_request_timeout
|
|
1013
|
+
)
|
|
1014
|
+
await response_data.read()
|
|
1015
|
+
return self.api_client.response_deserialize(
|
|
1016
|
+
response_data=response_data,
|
|
1017
|
+
response_types_map=_response_types_map,
|
|
1018
|
+
).data
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
@validate_call
|
|
1022
|
+
async def get_claims_by_address_with_http_info(
|
|
1023
|
+
self,
|
|
1024
|
+
address: StrictStr,
|
|
1025
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
1026
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
1027
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
1028
|
+
_request_timeout: Union[
|
|
1029
|
+
None,
|
|
1030
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1031
|
+
Tuple[
|
|
1032
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1033
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1034
|
+
]
|
|
1035
|
+
] = None,
|
|
1036
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1037
|
+
_content_type: Optional[StrictStr] = None,
|
|
1038
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1039
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1040
|
+
) -> ApiResponse[RedPacketClaimsPage]:
|
|
1041
|
+
"""CONTROLLER.RED_PACKET.GET_CLAIMS_BY_ADDRESS.SUMMARY
|
|
1042
|
+
|
|
1043
|
+
CONTROLLER.RED_PACKET.GET_CLAIMS_BY_ADDRESS.DESCRIPTION
|
|
1044
|
+
|
|
1045
|
+
:param address: (required)
|
|
1046
|
+
:type address: str
|
|
1047
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
1048
|
+
:type cursor: str
|
|
1049
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
1050
|
+
:type limit: int
|
|
1051
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
1052
|
+
:type direction: str
|
|
1053
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1054
|
+
number provided, it will be total request
|
|
1055
|
+
timeout. It can also be a pair (tuple) of
|
|
1056
|
+
(connection, read) timeouts.
|
|
1057
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1058
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1059
|
+
request; this effectively ignores the
|
|
1060
|
+
authentication in the spec for a single request.
|
|
1061
|
+
:type _request_auth: dict, optional
|
|
1062
|
+
:param _content_type: force content-type for the request.
|
|
1063
|
+
:type _content_type: str, Optional
|
|
1064
|
+
:param _headers: set to override the headers for a single
|
|
1065
|
+
request; this effectively ignores the headers
|
|
1066
|
+
in the spec for a single request.
|
|
1067
|
+
:type _headers: dict, optional
|
|
1068
|
+
:param _host_index: set to override the host_index for a single
|
|
1069
|
+
request; this effectively ignores the host_index
|
|
1070
|
+
in the spec for a single request.
|
|
1071
|
+
:type _host_index: int, optional
|
|
1072
|
+
:return: Returns the result object.
|
|
1073
|
+
""" # noqa: E501
|
|
1074
|
+
|
|
1075
|
+
_param = self._get_claims_by_address_serialize(
|
|
1076
|
+
address=address,
|
|
1077
|
+
cursor=cursor,
|
|
1078
|
+
limit=limit,
|
|
1079
|
+
direction=direction,
|
|
1080
|
+
_request_auth=_request_auth,
|
|
1081
|
+
_content_type=_content_type,
|
|
1082
|
+
_headers=_headers,
|
|
1083
|
+
_host_index=_host_index
|
|
1084
|
+
)
|
|
1085
|
+
|
|
1086
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1087
|
+
'200': "RedPacketClaimsPage",
|
|
1088
|
+
}
|
|
1089
|
+
response_data = await self.api_client.call_api(
|
|
1090
|
+
*_param,
|
|
1091
|
+
_request_timeout=_request_timeout
|
|
1092
|
+
)
|
|
1093
|
+
await response_data.read()
|
|
1094
|
+
return self.api_client.response_deserialize(
|
|
1095
|
+
response_data=response_data,
|
|
1096
|
+
response_types_map=_response_types_map,
|
|
1097
|
+
)
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
@validate_call
|
|
1101
|
+
async def get_claims_by_address_without_preload_content(
|
|
1102
|
+
self,
|
|
1103
|
+
address: StrictStr,
|
|
1104
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
1105
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
1106
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
1107
|
+
_request_timeout: Union[
|
|
1108
|
+
None,
|
|
1109
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1110
|
+
Tuple[
|
|
1111
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1112
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1113
|
+
]
|
|
1114
|
+
] = None,
|
|
1115
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1116
|
+
_content_type: Optional[StrictStr] = None,
|
|
1117
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1118
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1119
|
+
) -> RESTResponseType:
|
|
1120
|
+
"""CONTROLLER.RED_PACKET.GET_CLAIMS_BY_ADDRESS.SUMMARY
|
|
1121
|
+
|
|
1122
|
+
CONTROLLER.RED_PACKET.GET_CLAIMS_BY_ADDRESS.DESCRIPTION
|
|
1123
|
+
|
|
1124
|
+
:param address: (required)
|
|
1125
|
+
:type address: str
|
|
1126
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
1127
|
+
:type cursor: str
|
|
1128
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
1129
|
+
:type limit: int
|
|
1130
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
1131
|
+
:type direction: str
|
|
1132
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1133
|
+
number provided, it will be total request
|
|
1134
|
+
timeout. It can also be a pair (tuple) of
|
|
1135
|
+
(connection, read) timeouts.
|
|
1136
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1137
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1138
|
+
request; this effectively ignores the
|
|
1139
|
+
authentication in the spec for a single request.
|
|
1140
|
+
:type _request_auth: dict, optional
|
|
1141
|
+
:param _content_type: force content-type for the request.
|
|
1142
|
+
:type _content_type: str, Optional
|
|
1143
|
+
:param _headers: set to override the headers for a single
|
|
1144
|
+
request; this effectively ignores the headers
|
|
1145
|
+
in the spec for a single request.
|
|
1146
|
+
:type _headers: dict, optional
|
|
1147
|
+
:param _host_index: set to override the host_index for a single
|
|
1148
|
+
request; this effectively ignores the host_index
|
|
1149
|
+
in the spec for a single request.
|
|
1150
|
+
:type _host_index: int, optional
|
|
1151
|
+
:return: Returns the result object.
|
|
1152
|
+
""" # noqa: E501
|
|
1153
|
+
|
|
1154
|
+
_param = self._get_claims_by_address_serialize(
|
|
1155
|
+
address=address,
|
|
1156
|
+
cursor=cursor,
|
|
1157
|
+
limit=limit,
|
|
1158
|
+
direction=direction,
|
|
1159
|
+
_request_auth=_request_auth,
|
|
1160
|
+
_content_type=_content_type,
|
|
1161
|
+
_headers=_headers,
|
|
1162
|
+
_host_index=_host_index
|
|
1163
|
+
)
|
|
1164
|
+
|
|
1165
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1166
|
+
'200': "RedPacketClaimsPage",
|
|
1167
|
+
}
|
|
1168
|
+
response_data = await self.api_client.call_api(
|
|
1169
|
+
*_param,
|
|
1170
|
+
_request_timeout=_request_timeout
|
|
1171
|
+
)
|
|
1172
|
+
return response_data.response
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
def _get_claims_by_address_serialize(
|
|
1176
|
+
self,
|
|
1177
|
+
address,
|
|
1178
|
+
cursor,
|
|
1179
|
+
limit,
|
|
1180
|
+
direction,
|
|
1181
|
+
_request_auth,
|
|
1182
|
+
_content_type,
|
|
1183
|
+
_headers,
|
|
1184
|
+
_host_index,
|
|
1185
|
+
) -> RequestSerialized:
|
|
1186
|
+
|
|
1187
|
+
_host = None
|
|
1188
|
+
|
|
1189
|
+
_collection_formats: Dict[str, str] = {
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
_path_params: Dict[str, str] = {}
|
|
1193
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1194
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1195
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1196
|
+
_files: Dict[
|
|
1197
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1198
|
+
] = {}
|
|
1199
|
+
_body_params: Optional[bytes] = None
|
|
1200
|
+
|
|
1201
|
+
# process the path parameters
|
|
1202
|
+
if address is not None:
|
|
1203
|
+
_path_params['address'] = address
|
|
1204
|
+
# process the query parameters
|
|
1205
|
+
if cursor is not None:
|
|
1206
|
+
|
|
1207
|
+
_query_params.append(('cursor', cursor))
|
|
1208
|
+
|
|
1209
|
+
if limit is not None:
|
|
1210
|
+
|
|
1211
|
+
_query_params.append(('limit', limit))
|
|
1212
|
+
|
|
1213
|
+
if direction is not None:
|
|
1214
|
+
|
|
1215
|
+
_query_params.append(('direction', direction))
|
|
1216
|
+
|
|
1217
|
+
# process the header parameters
|
|
1218
|
+
# process the form parameters
|
|
1219
|
+
# process the body parameter
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
# set the HTTP header `Accept`
|
|
1223
|
+
if 'Accept' not in _header_params:
|
|
1224
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1225
|
+
[
|
|
1226
|
+
'application/json'
|
|
1227
|
+
]
|
|
1228
|
+
)
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
# authentication setting
|
|
1232
|
+
_auth_settings: List[str] = [
|
|
1233
|
+
'bearer'
|
|
1234
|
+
]
|
|
1235
|
+
|
|
1236
|
+
return self.api_client.param_serialize(
|
|
1237
|
+
method='GET',
|
|
1238
|
+
resource_path='/v1/redpacket/wallet/{address}/claims',
|
|
1239
|
+
path_params=_path_params,
|
|
1240
|
+
query_params=_query_params,
|
|
1241
|
+
header_params=_header_params,
|
|
1242
|
+
body=_body_params,
|
|
1243
|
+
post_params=_form_params,
|
|
1244
|
+
files=_files,
|
|
1245
|
+
auth_settings=_auth_settings,
|
|
1246
|
+
collection_formats=_collection_formats,
|
|
1247
|
+
_host=_host,
|
|
1248
|
+
_request_auth=_request_auth
|
|
1249
|
+
)
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
@validate_call
|
|
1255
|
+
async def get_redpacket(
|
|
1256
|
+
self,
|
|
1257
|
+
id: Annotated[StrictStr, Field(description="DTO.RED_PACKET.ID")],
|
|
1258
|
+
_request_timeout: Union[
|
|
1259
|
+
None,
|
|
1260
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1261
|
+
Tuple[
|
|
1262
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1263
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1264
|
+
]
|
|
1265
|
+
] = None,
|
|
1266
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1267
|
+
_content_type: Optional[StrictStr] = None,
|
|
1268
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1269
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1270
|
+
) -> RedPacketDTO:
|
|
1271
|
+
"""CONTROLLER.RED_PACKET.GET.SUMMARY
|
|
1272
|
+
|
|
1273
|
+
CONTROLLER.RED_PACKET.GET.DESCRIPTION
|
|
1274
|
+
|
|
1275
|
+
:param id: DTO.RED_PACKET.ID (required)
|
|
1276
|
+
:type id: str
|
|
1277
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1278
|
+
number provided, it will be total request
|
|
1279
|
+
timeout. It can also be a pair (tuple) of
|
|
1280
|
+
(connection, read) timeouts.
|
|
1281
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1282
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1283
|
+
request; this effectively ignores the
|
|
1284
|
+
authentication in the spec for a single request.
|
|
1285
|
+
:type _request_auth: dict, optional
|
|
1286
|
+
:param _content_type: force content-type for the request.
|
|
1287
|
+
:type _content_type: str, Optional
|
|
1288
|
+
:param _headers: set to override the headers for a single
|
|
1289
|
+
request; this effectively ignores the headers
|
|
1290
|
+
in the spec for a single request.
|
|
1291
|
+
:type _headers: dict, optional
|
|
1292
|
+
:param _host_index: set to override the host_index for a single
|
|
1293
|
+
request; this effectively ignores the host_index
|
|
1294
|
+
in the spec for a single request.
|
|
1295
|
+
:type _host_index: int, optional
|
|
1296
|
+
:return: Returns the result object.
|
|
1297
|
+
""" # noqa: E501
|
|
1298
|
+
|
|
1299
|
+
_param = self._get_redpacket_serialize(
|
|
1300
|
+
id=id,
|
|
1301
|
+
_request_auth=_request_auth,
|
|
1302
|
+
_content_type=_content_type,
|
|
1303
|
+
_headers=_headers,
|
|
1304
|
+
_host_index=_host_index
|
|
1305
|
+
)
|
|
1306
|
+
|
|
1307
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1308
|
+
'200': "RedPacketDTO",
|
|
1309
|
+
}
|
|
1310
|
+
response_data = await self.api_client.call_api(
|
|
1311
|
+
*_param,
|
|
1312
|
+
_request_timeout=_request_timeout
|
|
1313
|
+
)
|
|
1314
|
+
await response_data.read()
|
|
1315
|
+
return self.api_client.response_deserialize(
|
|
1316
|
+
response_data=response_data,
|
|
1317
|
+
response_types_map=_response_types_map,
|
|
1318
|
+
).data
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
@validate_call
|
|
1322
|
+
async def get_redpacket_with_http_info(
|
|
1323
|
+
self,
|
|
1324
|
+
id: Annotated[StrictStr, Field(description="DTO.RED_PACKET.ID")],
|
|
1325
|
+
_request_timeout: Union[
|
|
1326
|
+
None,
|
|
1327
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1328
|
+
Tuple[
|
|
1329
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1330
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1331
|
+
]
|
|
1332
|
+
] = None,
|
|
1333
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1334
|
+
_content_type: Optional[StrictStr] = None,
|
|
1335
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1336
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1337
|
+
) -> ApiResponse[RedPacketDTO]:
|
|
1338
|
+
"""CONTROLLER.RED_PACKET.GET.SUMMARY
|
|
1339
|
+
|
|
1340
|
+
CONTROLLER.RED_PACKET.GET.DESCRIPTION
|
|
1341
|
+
|
|
1342
|
+
:param id: DTO.RED_PACKET.ID (required)
|
|
1343
|
+
:type id: str
|
|
1344
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1345
|
+
number provided, it will be total request
|
|
1346
|
+
timeout. It can also be a pair (tuple) of
|
|
1347
|
+
(connection, read) timeouts.
|
|
1348
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1349
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1350
|
+
request; this effectively ignores the
|
|
1351
|
+
authentication in the spec for a single request.
|
|
1352
|
+
:type _request_auth: dict, optional
|
|
1353
|
+
:param _content_type: force content-type for the request.
|
|
1354
|
+
:type _content_type: str, Optional
|
|
1355
|
+
:param _headers: set to override the headers for a single
|
|
1356
|
+
request; this effectively ignores the headers
|
|
1357
|
+
in the spec for a single request.
|
|
1358
|
+
:type _headers: dict, optional
|
|
1359
|
+
:param _host_index: set to override the host_index for a single
|
|
1360
|
+
request; this effectively ignores the host_index
|
|
1361
|
+
in the spec for a single request.
|
|
1362
|
+
:type _host_index: int, optional
|
|
1363
|
+
:return: Returns the result object.
|
|
1364
|
+
""" # noqa: E501
|
|
1365
|
+
|
|
1366
|
+
_param = self._get_redpacket_serialize(
|
|
1367
|
+
id=id,
|
|
1368
|
+
_request_auth=_request_auth,
|
|
1369
|
+
_content_type=_content_type,
|
|
1370
|
+
_headers=_headers,
|
|
1371
|
+
_host_index=_host_index
|
|
1372
|
+
)
|
|
1373
|
+
|
|
1374
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1375
|
+
'200': "RedPacketDTO",
|
|
1376
|
+
}
|
|
1377
|
+
response_data = await self.api_client.call_api(
|
|
1378
|
+
*_param,
|
|
1379
|
+
_request_timeout=_request_timeout
|
|
1380
|
+
)
|
|
1381
|
+
await response_data.read()
|
|
1382
|
+
return self.api_client.response_deserialize(
|
|
1383
|
+
response_data=response_data,
|
|
1384
|
+
response_types_map=_response_types_map,
|
|
1385
|
+
)
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
@validate_call
|
|
1389
|
+
async def get_redpacket_without_preload_content(
|
|
1390
|
+
self,
|
|
1391
|
+
id: Annotated[StrictStr, Field(description="DTO.RED_PACKET.ID")],
|
|
1392
|
+
_request_timeout: Union[
|
|
1393
|
+
None,
|
|
1394
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1395
|
+
Tuple[
|
|
1396
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1397
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1398
|
+
]
|
|
1399
|
+
] = None,
|
|
1400
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1401
|
+
_content_type: Optional[StrictStr] = None,
|
|
1402
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1403
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1404
|
+
) -> RESTResponseType:
|
|
1405
|
+
"""CONTROLLER.RED_PACKET.GET.SUMMARY
|
|
1406
|
+
|
|
1407
|
+
CONTROLLER.RED_PACKET.GET.DESCRIPTION
|
|
1408
|
+
|
|
1409
|
+
:param id: DTO.RED_PACKET.ID (required)
|
|
1410
|
+
:type id: str
|
|
1411
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1412
|
+
number provided, it will be total request
|
|
1413
|
+
timeout. It can also be a pair (tuple) of
|
|
1414
|
+
(connection, read) timeouts.
|
|
1415
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1416
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1417
|
+
request; this effectively ignores the
|
|
1418
|
+
authentication in the spec for a single request.
|
|
1419
|
+
:type _request_auth: dict, optional
|
|
1420
|
+
:param _content_type: force content-type for the request.
|
|
1421
|
+
:type _content_type: str, Optional
|
|
1422
|
+
:param _headers: set to override the headers for a single
|
|
1423
|
+
request; this effectively ignores the headers
|
|
1424
|
+
in the spec for a single request.
|
|
1425
|
+
:type _headers: dict, optional
|
|
1426
|
+
:param _host_index: set to override the host_index for a single
|
|
1427
|
+
request; this effectively ignores the host_index
|
|
1428
|
+
in the spec for a single request.
|
|
1429
|
+
:type _host_index: int, optional
|
|
1430
|
+
:return: Returns the result object.
|
|
1431
|
+
""" # noqa: E501
|
|
1432
|
+
|
|
1433
|
+
_param = self._get_redpacket_serialize(
|
|
1434
|
+
id=id,
|
|
1435
|
+
_request_auth=_request_auth,
|
|
1436
|
+
_content_type=_content_type,
|
|
1437
|
+
_headers=_headers,
|
|
1438
|
+
_host_index=_host_index
|
|
1439
|
+
)
|
|
1440
|
+
|
|
1441
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1442
|
+
'200': "RedPacketDTO",
|
|
1443
|
+
}
|
|
1444
|
+
response_data = await self.api_client.call_api(
|
|
1445
|
+
*_param,
|
|
1446
|
+
_request_timeout=_request_timeout
|
|
1447
|
+
)
|
|
1448
|
+
return response_data.response
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
def _get_redpacket_serialize(
|
|
1452
|
+
self,
|
|
1453
|
+
id,
|
|
1454
|
+
_request_auth,
|
|
1455
|
+
_content_type,
|
|
1456
|
+
_headers,
|
|
1457
|
+
_host_index,
|
|
1458
|
+
) -> RequestSerialized:
|
|
1459
|
+
|
|
1460
|
+
_host = None
|
|
1461
|
+
|
|
1462
|
+
_collection_formats: Dict[str, str] = {
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
_path_params: Dict[str, str] = {}
|
|
1466
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1467
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1468
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1469
|
+
_files: Dict[
|
|
1470
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1471
|
+
] = {}
|
|
1472
|
+
_body_params: Optional[bytes] = None
|
|
1473
|
+
|
|
1474
|
+
# process the path parameters
|
|
1475
|
+
if id is not None:
|
|
1476
|
+
_path_params['id'] = id
|
|
1477
|
+
# process the query parameters
|
|
1478
|
+
# process the header parameters
|
|
1479
|
+
# process the form parameters
|
|
1480
|
+
# process the body parameter
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
# set the HTTP header `Accept`
|
|
1484
|
+
if 'Accept' not in _header_params:
|
|
1485
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1486
|
+
[
|
|
1487
|
+
'application/json'
|
|
1488
|
+
]
|
|
1489
|
+
)
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
# authentication setting
|
|
1493
|
+
_auth_settings: List[str] = [
|
|
1494
|
+
'bearer'
|
|
1495
|
+
]
|
|
1496
|
+
|
|
1497
|
+
return self.api_client.param_serialize(
|
|
1498
|
+
method='GET',
|
|
1499
|
+
resource_path='/v1/redpacket/{id}',
|
|
1500
|
+
path_params=_path_params,
|
|
1501
|
+
query_params=_query_params,
|
|
1502
|
+
header_params=_header_params,
|
|
1503
|
+
body=_body_params,
|
|
1504
|
+
post_params=_form_params,
|
|
1505
|
+
files=_files,
|
|
1506
|
+
auth_settings=_auth_settings,
|
|
1507
|
+
collection_formats=_collection_formats,
|
|
1508
|
+
_host=_host,
|
|
1509
|
+
_request_auth=_request_auth
|
|
1510
|
+
)
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
@validate_call
|
|
1516
|
+
async def get_redpackets(
|
|
1517
|
+
self,
|
|
1518
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
1519
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
1520
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
1521
|
+
creator: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CREATOR")] = None,
|
|
1522
|
+
chain: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CHAIN")] = None,
|
|
1523
|
+
_request_timeout: Union[
|
|
1524
|
+
None,
|
|
1525
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1526
|
+
Tuple[
|
|
1527
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1528
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1529
|
+
]
|
|
1530
|
+
] = None,
|
|
1531
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1532
|
+
_content_type: Optional[StrictStr] = None,
|
|
1533
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1534
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1535
|
+
) -> RedPacketsPage:
|
|
1536
|
+
"""CONTROLLER.RED_PACKET.GET_REDPACKETS.SUMMARY
|
|
1537
|
+
|
|
1538
|
+
CONTROLLER.RED_PACKET.GET_REDPACKETS.DESCRIPTION
|
|
1539
|
+
|
|
1540
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
1541
|
+
:type cursor: str
|
|
1542
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
1543
|
+
:type limit: int
|
|
1544
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
1545
|
+
:type direction: str
|
|
1546
|
+
:param creator: DTO.RED_PACKET.CREATOR
|
|
1547
|
+
:type creator: str
|
|
1548
|
+
:param chain: DTO.RED_PACKET.CHAIN
|
|
1549
|
+
:type chain: str
|
|
1550
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1551
|
+
number provided, it will be total request
|
|
1552
|
+
timeout. It can also be a pair (tuple) of
|
|
1553
|
+
(connection, read) timeouts.
|
|
1554
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1555
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1556
|
+
request; this effectively ignores the
|
|
1557
|
+
authentication in the spec for a single request.
|
|
1558
|
+
:type _request_auth: dict, optional
|
|
1559
|
+
:param _content_type: force content-type for the request.
|
|
1560
|
+
:type _content_type: str, Optional
|
|
1561
|
+
:param _headers: set to override the headers for a single
|
|
1562
|
+
request; this effectively ignores the headers
|
|
1563
|
+
in the spec for a single request.
|
|
1564
|
+
:type _headers: dict, optional
|
|
1565
|
+
:param _host_index: set to override the host_index for a single
|
|
1566
|
+
request; this effectively ignores the host_index
|
|
1567
|
+
in the spec for a single request.
|
|
1568
|
+
:type _host_index: int, optional
|
|
1569
|
+
:return: Returns the result object.
|
|
1570
|
+
""" # noqa: E501
|
|
1571
|
+
|
|
1572
|
+
_param = self._get_redpackets_serialize(
|
|
1573
|
+
cursor=cursor,
|
|
1574
|
+
limit=limit,
|
|
1575
|
+
direction=direction,
|
|
1576
|
+
creator=creator,
|
|
1577
|
+
chain=chain,
|
|
1578
|
+
_request_auth=_request_auth,
|
|
1579
|
+
_content_type=_content_type,
|
|
1580
|
+
_headers=_headers,
|
|
1581
|
+
_host_index=_host_index
|
|
1582
|
+
)
|
|
1583
|
+
|
|
1584
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1585
|
+
'200': "RedPacketsPage",
|
|
1586
|
+
}
|
|
1587
|
+
response_data = await self.api_client.call_api(
|
|
1588
|
+
*_param,
|
|
1589
|
+
_request_timeout=_request_timeout
|
|
1590
|
+
)
|
|
1591
|
+
await response_data.read()
|
|
1592
|
+
return self.api_client.response_deserialize(
|
|
1593
|
+
response_data=response_data,
|
|
1594
|
+
response_types_map=_response_types_map,
|
|
1595
|
+
).data
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
@validate_call
|
|
1599
|
+
async def get_redpackets_with_http_info(
|
|
1600
|
+
self,
|
|
1601
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
1602
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
1603
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
1604
|
+
creator: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CREATOR")] = None,
|
|
1605
|
+
chain: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CHAIN")] = None,
|
|
1606
|
+
_request_timeout: Union[
|
|
1607
|
+
None,
|
|
1608
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1609
|
+
Tuple[
|
|
1610
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1611
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1612
|
+
]
|
|
1613
|
+
] = None,
|
|
1614
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1615
|
+
_content_type: Optional[StrictStr] = None,
|
|
1616
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1617
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1618
|
+
) -> ApiResponse[RedPacketsPage]:
|
|
1619
|
+
"""CONTROLLER.RED_PACKET.GET_REDPACKETS.SUMMARY
|
|
1620
|
+
|
|
1621
|
+
CONTROLLER.RED_PACKET.GET_REDPACKETS.DESCRIPTION
|
|
1622
|
+
|
|
1623
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
1624
|
+
:type cursor: str
|
|
1625
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
1626
|
+
:type limit: int
|
|
1627
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
1628
|
+
:type direction: str
|
|
1629
|
+
:param creator: DTO.RED_PACKET.CREATOR
|
|
1630
|
+
:type creator: str
|
|
1631
|
+
:param chain: DTO.RED_PACKET.CHAIN
|
|
1632
|
+
:type chain: str
|
|
1633
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1634
|
+
number provided, it will be total request
|
|
1635
|
+
timeout. It can also be a pair (tuple) of
|
|
1636
|
+
(connection, read) timeouts.
|
|
1637
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1638
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1639
|
+
request; this effectively ignores the
|
|
1640
|
+
authentication in the spec for a single request.
|
|
1641
|
+
:type _request_auth: dict, optional
|
|
1642
|
+
:param _content_type: force content-type for the request.
|
|
1643
|
+
:type _content_type: str, Optional
|
|
1644
|
+
:param _headers: set to override the headers for a single
|
|
1645
|
+
request; this effectively ignores the headers
|
|
1646
|
+
in the spec for a single request.
|
|
1647
|
+
:type _headers: dict, optional
|
|
1648
|
+
:param _host_index: set to override the host_index for a single
|
|
1649
|
+
request; this effectively ignores the host_index
|
|
1650
|
+
in the spec for a single request.
|
|
1651
|
+
:type _host_index: int, optional
|
|
1652
|
+
:return: Returns the result object.
|
|
1653
|
+
""" # noqa: E501
|
|
1654
|
+
|
|
1655
|
+
_param = self._get_redpackets_serialize(
|
|
1656
|
+
cursor=cursor,
|
|
1657
|
+
limit=limit,
|
|
1658
|
+
direction=direction,
|
|
1659
|
+
creator=creator,
|
|
1660
|
+
chain=chain,
|
|
1661
|
+
_request_auth=_request_auth,
|
|
1662
|
+
_content_type=_content_type,
|
|
1663
|
+
_headers=_headers,
|
|
1664
|
+
_host_index=_host_index
|
|
1665
|
+
)
|
|
1666
|
+
|
|
1667
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1668
|
+
'200': "RedPacketsPage",
|
|
1669
|
+
}
|
|
1670
|
+
response_data = await self.api_client.call_api(
|
|
1671
|
+
*_param,
|
|
1672
|
+
_request_timeout=_request_timeout
|
|
1673
|
+
)
|
|
1674
|
+
await response_data.read()
|
|
1675
|
+
return self.api_client.response_deserialize(
|
|
1676
|
+
response_data=response_data,
|
|
1677
|
+
response_types_map=_response_types_map,
|
|
1678
|
+
)
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
@validate_call
|
|
1682
|
+
async def get_redpackets_without_preload_content(
|
|
1683
|
+
self,
|
|
1684
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
1685
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
1686
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
1687
|
+
creator: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CREATOR")] = None,
|
|
1688
|
+
chain: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CHAIN")] = None,
|
|
1689
|
+
_request_timeout: Union[
|
|
1690
|
+
None,
|
|
1691
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1692
|
+
Tuple[
|
|
1693
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1694
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1695
|
+
]
|
|
1696
|
+
] = None,
|
|
1697
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1698
|
+
_content_type: Optional[StrictStr] = None,
|
|
1699
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1700
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1701
|
+
) -> RESTResponseType:
|
|
1702
|
+
"""CONTROLLER.RED_PACKET.GET_REDPACKETS.SUMMARY
|
|
1703
|
+
|
|
1704
|
+
CONTROLLER.RED_PACKET.GET_REDPACKETS.DESCRIPTION
|
|
1705
|
+
|
|
1706
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
1707
|
+
:type cursor: str
|
|
1708
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
1709
|
+
:type limit: int
|
|
1710
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
1711
|
+
:type direction: str
|
|
1712
|
+
:param creator: DTO.RED_PACKET.CREATOR
|
|
1713
|
+
:type creator: str
|
|
1714
|
+
:param chain: DTO.RED_PACKET.CHAIN
|
|
1715
|
+
:type chain: str
|
|
1716
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1717
|
+
number provided, it will be total request
|
|
1718
|
+
timeout. It can also be a pair (tuple) of
|
|
1719
|
+
(connection, read) timeouts.
|
|
1720
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1721
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1722
|
+
request; this effectively ignores the
|
|
1723
|
+
authentication in the spec for a single request.
|
|
1724
|
+
:type _request_auth: dict, optional
|
|
1725
|
+
:param _content_type: force content-type for the request.
|
|
1726
|
+
:type _content_type: str, Optional
|
|
1727
|
+
:param _headers: set to override the headers for a single
|
|
1728
|
+
request; this effectively ignores the headers
|
|
1729
|
+
in the spec for a single request.
|
|
1730
|
+
:type _headers: dict, optional
|
|
1731
|
+
:param _host_index: set to override the host_index for a single
|
|
1732
|
+
request; this effectively ignores the host_index
|
|
1733
|
+
in the spec for a single request.
|
|
1734
|
+
:type _host_index: int, optional
|
|
1735
|
+
:return: Returns the result object.
|
|
1736
|
+
""" # noqa: E501
|
|
1737
|
+
|
|
1738
|
+
_param = self._get_redpackets_serialize(
|
|
1739
|
+
cursor=cursor,
|
|
1740
|
+
limit=limit,
|
|
1741
|
+
direction=direction,
|
|
1742
|
+
creator=creator,
|
|
1743
|
+
chain=chain,
|
|
1744
|
+
_request_auth=_request_auth,
|
|
1745
|
+
_content_type=_content_type,
|
|
1746
|
+
_headers=_headers,
|
|
1747
|
+
_host_index=_host_index
|
|
1748
|
+
)
|
|
1749
|
+
|
|
1750
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1751
|
+
'200': "RedPacketsPage",
|
|
1752
|
+
}
|
|
1753
|
+
response_data = await self.api_client.call_api(
|
|
1754
|
+
*_param,
|
|
1755
|
+
_request_timeout=_request_timeout
|
|
1756
|
+
)
|
|
1757
|
+
return response_data.response
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
def _get_redpackets_serialize(
|
|
1761
|
+
self,
|
|
1762
|
+
cursor,
|
|
1763
|
+
limit,
|
|
1764
|
+
direction,
|
|
1765
|
+
creator,
|
|
1766
|
+
chain,
|
|
1767
|
+
_request_auth,
|
|
1768
|
+
_content_type,
|
|
1769
|
+
_headers,
|
|
1770
|
+
_host_index,
|
|
1771
|
+
) -> RequestSerialized:
|
|
1772
|
+
|
|
1773
|
+
_host = None
|
|
1774
|
+
|
|
1775
|
+
_collection_formats: Dict[str, str] = {
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
_path_params: Dict[str, str] = {}
|
|
1779
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1780
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1781
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1782
|
+
_files: Dict[
|
|
1783
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1784
|
+
] = {}
|
|
1785
|
+
_body_params: Optional[bytes] = None
|
|
1786
|
+
|
|
1787
|
+
# process the path parameters
|
|
1788
|
+
# process the query parameters
|
|
1789
|
+
if cursor is not None:
|
|
1790
|
+
|
|
1791
|
+
_query_params.append(('cursor', cursor))
|
|
1792
|
+
|
|
1793
|
+
if limit is not None:
|
|
1794
|
+
|
|
1795
|
+
_query_params.append(('limit', limit))
|
|
1796
|
+
|
|
1797
|
+
if direction is not None:
|
|
1798
|
+
|
|
1799
|
+
_query_params.append(('direction', direction))
|
|
1800
|
+
|
|
1801
|
+
if creator is not None:
|
|
1802
|
+
|
|
1803
|
+
_query_params.append(('creator', creator))
|
|
1804
|
+
|
|
1805
|
+
if chain is not None:
|
|
1806
|
+
|
|
1807
|
+
_query_params.append(('chain', chain))
|
|
1808
|
+
|
|
1809
|
+
# process the header parameters
|
|
1810
|
+
# process the form parameters
|
|
1811
|
+
# process the body parameter
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
# set the HTTP header `Accept`
|
|
1815
|
+
if 'Accept' not in _header_params:
|
|
1816
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1817
|
+
[
|
|
1818
|
+
'application/json'
|
|
1819
|
+
]
|
|
1820
|
+
)
|
|
1821
|
+
|
|
1822
|
+
|
|
1823
|
+
# authentication setting
|
|
1824
|
+
_auth_settings: List[str] = [
|
|
1825
|
+
'bearer'
|
|
1826
|
+
]
|
|
1827
|
+
|
|
1828
|
+
return self.api_client.param_serialize(
|
|
1829
|
+
method='GET',
|
|
1830
|
+
resource_path='/v1/redpacket',
|
|
1831
|
+
path_params=_path_params,
|
|
1832
|
+
query_params=_query_params,
|
|
1833
|
+
header_params=_header_params,
|
|
1834
|
+
body=_body_params,
|
|
1835
|
+
post_params=_form_params,
|
|
1836
|
+
files=_files,
|
|
1837
|
+
auth_settings=_auth_settings,
|
|
1838
|
+
collection_formats=_collection_formats,
|
|
1839
|
+
_host=_host,
|
|
1840
|
+
_request_auth=_request_auth
|
|
1841
|
+
)
|
|
1842
|
+
|
|
1843
|
+
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
@validate_call
|
|
1847
|
+
async def get_redpackets_by_address(
|
|
1848
|
+
self,
|
|
1849
|
+
address: StrictStr,
|
|
1850
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
1851
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
1852
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
1853
|
+
_request_timeout: Union[
|
|
1854
|
+
None,
|
|
1855
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1856
|
+
Tuple[
|
|
1857
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1858
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1859
|
+
]
|
|
1860
|
+
] = None,
|
|
1861
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1862
|
+
_content_type: Optional[StrictStr] = None,
|
|
1863
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1864
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1865
|
+
) -> RedPacketsPage:
|
|
1866
|
+
"""CONTROLLER.RED_PACKET.GET_REDPACKETS_BY_ADDRESS.SUMMARY
|
|
1867
|
+
|
|
1868
|
+
CONTROLLER.RED_PACKET.GET_REDPACKETS_BY_ADDRESS.DESCRIPTION
|
|
1869
|
+
|
|
1870
|
+
:param address: (required)
|
|
1871
|
+
:type address: str
|
|
1872
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
1873
|
+
:type cursor: str
|
|
1874
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
1875
|
+
:type limit: int
|
|
1876
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
1877
|
+
:type direction: str
|
|
1878
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1879
|
+
number provided, it will be total request
|
|
1880
|
+
timeout. It can also be a pair (tuple) of
|
|
1881
|
+
(connection, read) timeouts.
|
|
1882
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1883
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1884
|
+
request; this effectively ignores the
|
|
1885
|
+
authentication in the spec for a single request.
|
|
1886
|
+
:type _request_auth: dict, optional
|
|
1887
|
+
:param _content_type: force content-type for the request.
|
|
1888
|
+
:type _content_type: str, Optional
|
|
1889
|
+
:param _headers: set to override the headers for a single
|
|
1890
|
+
request; this effectively ignores the headers
|
|
1891
|
+
in the spec for a single request.
|
|
1892
|
+
:type _headers: dict, optional
|
|
1893
|
+
:param _host_index: set to override the host_index for a single
|
|
1894
|
+
request; this effectively ignores the host_index
|
|
1895
|
+
in the spec for a single request.
|
|
1896
|
+
:type _host_index: int, optional
|
|
1897
|
+
:return: Returns the result object.
|
|
1898
|
+
""" # noqa: E501
|
|
1899
|
+
|
|
1900
|
+
_param = self._get_redpackets_by_address_serialize(
|
|
1901
|
+
address=address,
|
|
1902
|
+
cursor=cursor,
|
|
1903
|
+
limit=limit,
|
|
1904
|
+
direction=direction,
|
|
1905
|
+
_request_auth=_request_auth,
|
|
1906
|
+
_content_type=_content_type,
|
|
1907
|
+
_headers=_headers,
|
|
1908
|
+
_host_index=_host_index
|
|
1909
|
+
)
|
|
1910
|
+
|
|
1911
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1912
|
+
'200': "RedPacketsPage",
|
|
1913
|
+
}
|
|
1914
|
+
response_data = await self.api_client.call_api(
|
|
1915
|
+
*_param,
|
|
1916
|
+
_request_timeout=_request_timeout
|
|
1917
|
+
)
|
|
1918
|
+
await response_data.read()
|
|
1919
|
+
return self.api_client.response_deserialize(
|
|
1920
|
+
response_data=response_data,
|
|
1921
|
+
response_types_map=_response_types_map,
|
|
1922
|
+
).data
|
|
1923
|
+
|
|
1924
|
+
|
|
1925
|
+
@validate_call
|
|
1926
|
+
async def get_redpackets_by_address_with_http_info(
|
|
1927
|
+
self,
|
|
1928
|
+
address: StrictStr,
|
|
1929
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
1930
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
1931
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
1932
|
+
_request_timeout: Union[
|
|
1933
|
+
None,
|
|
1934
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1935
|
+
Tuple[
|
|
1936
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1937
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1938
|
+
]
|
|
1939
|
+
] = None,
|
|
1940
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1941
|
+
_content_type: Optional[StrictStr] = None,
|
|
1942
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1943
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1944
|
+
) -> ApiResponse[RedPacketsPage]:
|
|
1945
|
+
"""CONTROLLER.RED_PACKET.GET_REDPACKETS_BY_ADDRESS.SUMMARY
|
|
1946
|
+
|
|
1947
|
+
CONTROLLER.RED_PACKET.GET_REDPACKETS_BY_ADDRESS.DESCRIPTION
|
|
1948
|
+
|
|
1949
|
+
:param address: (required)
|
|
1950
|
+
:type address: str
|
|
1951
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
1952
|
+
:type cursor: str
|
|
1953
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
1954
|
+
:type limit: int
|
|
1955
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
1956
|
+
:type direction: str
|
|
1957
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1958
|
+
number provided, it will be total request
|
|
1959
|
+
timeout. It can also be a pair (tuple) of
|
|
1960
|
+
(connection, read) timeouts.
|
|
1961
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1962
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1963
|
+
request; this effectively ignores the
|
|
1964
|
+
authentication in the spec for a single request.
|
|
1965
|
+
:type _request_auth: dict, optional
|
|
1966
|
+
:param _content_type: force content-type for the request.
|
|
1967
|
+
:type _content_type: str, Optional
|
|
1968
|
+
:param _headers: set to override the headers for a single
|
|
1969
|
+
request; this effectively ignores the headers
|
|
1970
|
+
in the spec for a single request.
|
|
1971
|
+
:type _headers: dict, optional
|
|
1972
|
+
:param _host_index: set to override the host_index for a single
|
|
1973
|
+
request; this effectively ignores the host_index
|
|
1974
|
+
in the spec for a single request.
|
|
1975
|
+
:type _host_index: int, optional
|
|
1976
|
+
:return: Returns the result object.
|
|
1977
|
+
""" # noqa: E501
|
|
1978
|
+
|
|
1979
|
+
_param = self._get_redpackets_by_address_serialize(
|
|
1980
|
+
address=address,
|
|
1981
|
+
cursor=cursor,
|
|
1982
|
+
limit=limit,
|
|
1983
|
+
direction=direction,
|
|
1984
|
+
_request_auth=_request_auth,
|
|
1985
|
+
_content_type=_content_type,
|
|
1986
|
+
_headers=_headers,
|
|
1987
|
+
_host_index=_host_index
|
|
1988
|
+
)
|
|
1989
|
+
|
|
1990
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1991
|
+
'200': "RedPacketsPage",
|
|
1992
|
+
}
|
|
1993
|
+
response_data = await self.api_client.call_api(
|
|
1994
|
+
*_param,
|
|
1995
|
+
_request_timeout=_request_timeout
|
|
1996
|
+
)
|
|
1997
|
+
await response_data.read()
|
|
1998
|
+
return self.api_client.response_deserialize(
|
|
1999
|
+
response_data=response_data,
|
|
2000
|
+
response_types_map=_response_types_map,
|
|
2001
|
+
)
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
@validate_call
|
|
2005
|
+
async def get_redpackets_by_address_without_preload_content(
|
|
2006
|
+
self,
|
|
2007
|
+
address: StrictStr,
|
|
2008
|
+
cursor: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.CURSOR")] = None,
|
|
2009
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.RED_PACKET.LIMIT")] = None,
|
|
2010
|
+
direction: Annotated[Optional[StrictStr], Field(description="DTO.RED_PACKET.DIRECTION")] = None,
|
|
2011
|
+
_request_timeout: Union[
|
|
2012
|
+
None,
|
|
2013
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2014
|
+
Tuple[
|
|
2015
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2016
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2017
|
+
]
|
|
2018
|
+
] = None,
|
|
2019
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2020
|
+
_content_type: Optional[StrictStr] = None,
|
|
2021
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2022
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2023
|
+
) -> RESTResponseType:
|
|
2024
|
+
"""CONTROLLER.RED_PACKET.GET_REDPACKETS_BY_ADDRESS.SUMMARY
|
|
2025
|
+
|
|
2026
|
+
CONTROLLER.RED_PACKET.GET_REDPACKETS_BY_ADDRESS.DESCRIPTION
|
|
2027
|
+
|
|
2028
|
+
:param address: (required)
|
|
2029
|
+
:type address: str
|
|
2030
|
+
:param cursor: DTO.RED_PACKET.CURSOR
|
|
2031
|
+
:type cursor: str
|
|
2032
|
+
:param limit: DTO.RED_PACKET.LIMIT
|
|
2033
|
+
:type limit: int
|
|
2034
|
+
:param direction: DTO.RED_PACKET.DIRECTION
|
|
2035
|
+
:type direction: str
|
|
2036
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2037
|
+
number provided, it will be total request
|
|
2038
|
+
timeout. It can also be a pair (tuple) of
|
|
2039
|
+
(connection, read) timeouts.
|
|
2040
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2041
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2042
|
+
request; this effectively ignores the
|
|
2043
|
+
authentication in the spec for a single request.
|
|
2044
|
+
:type _request_auth: dict, optional
|
|
2045
|
+
:param _content_type: force content-type for the request.
|
|
2046
|
+
:type _content_type: str, Optional
|
|
2047
|
+
:param _headers: set to override the headers for a single
|
|
2048
|
+
request; this effectively ignores the headers
|
|
2049
|
+
in the spec for a single request.
|
|
2050
|
+
:type _headers: dict, optional
|
|
2051
|
+
:param _host_index: set to override the host_index for a single
|
|
2052
|
+
request; this effectively ignores the host_index
|
|
2053
|
+
in the spec for a single request.
|
|
2054
|
+
:type _host_index: int, optional
|
|
2055
|
+
:return: Returns the result object.
|
|
2056
|
+
""" # noqa: E501
|
|
2057
|
+
|
|
2058
|
+
_param = self._get_redpackets_by_address_serialize(
|
|
2059
|
+
address=address,
|
|
2060
|
+
cursor=cursor,
|
|
2061
|
+
limit=limit,
|
|
2062
|
+
direction=direction,
|
|
2063
|
+
_request_auth=_request_auth,
|
|
2064
|
+
_content_type=_content_type,
|
|
2065
|
+
_headers=_headers,
|
|
2066
|
+
_host_index=_host_index
|
|
2067
|
+
)
|
|
2068
|
+
|
|
2069
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2070
|
+
'200': "RedPacketsPage",
|
|
2071
|
+
}
|
|
2072
|
+
response_data = await self.api_client.call_api(
|
|
2073
|
+
*_param,
|
|
2074
|
+
_request_timeout=_request_timeout
|
|
2075
|
+
)
|
|
2076
|
+
return response_data.response
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
def _get_redpackets_by_address_serialize(
|
|
2080
|
+
self,
|
|
2081
|
+
address,
|
|
2082
|
+
cursor,
|
|
2083
|
+
limit,
|
|
2084
|
+
direction,
|
|
2085
|
+
_request_auth,
|
|
2086
|
+
_content_type,
|
|
2087
|
+
_headers,
|
|
2088
|
+
_host_index,
|
|
2089
|
+
) -> RequestSerialized:
|
|
2090
|
+
|
|
2091
|
+
_host = None
|
|
2092
|
+
|
|
2093
|
+
_collection_formats: Dict[str, str] = {
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
_path_params: Dict[str, str] = {}
|
|
2097
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2098
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2099
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2100
|
+
_files: Dict[
|
|
2101
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2102
|
+
] = {}
|
|
2103
|
+
_body_params: Optional[bytes] = None
|
|
2104
|
+
|
|
2105
|
+
# process the path parameters
|
|
2106
|
+
if address is not None:
|
|
2107
|
+
_path_params['address'] = address
|
|
2108
|
+
# process the query parameters
|
|
2109
|
+
if cursor is not None:
|
|
2110
|
+
|
|
2111
|
+
_query_params.append(('cursor', cursor))
|
|
2112
|
+
|
|
2113
|
+
if limit is not None:
|
|
2114
|
+
|
|
2115
|
+
_query_params.append(('limit', limit))
|
|
2116
|
+
|
|
2117
|
+
if direction is not None:
|
|
2118
|
+
|
|
2119
|
+
_query_params.append(('direction', direction))
|
|
2120
|
+
|
|
2121
|
+
# process the header parameters
|
|
2122
|
+
# process the form parameters
|
|
2123
|
+
# process the body parameter
|
|
2124
|
+
|
|
2125
|
+
|
|
2126
|
+
# set the HTTP header `Accept`
|
|
2127
|
+
if 'Accept' not in _header_params:
|
|
2128
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2129
|
+
[
|
|
2130
|
+
'application/json'
|
|
2131
|
+
]
|
|
2132
|
+
)
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
# authentication setting
|
|
2136
|
+
_auth_settings: List[str] = [
|
|
2137
|
+
'bearer'
|
|
2138
|
+
]
|
|
2139
|
+
|
|
2140
|
+
return self.api_client.param_serialize(
|
|
2141
|
+
method='GET',
|
|
2142
|
+
resource_path='/v1/redpacket/wallet/{address}/redpackets',
|
|
2143
|
+
path_params=_path_params,
|
|
2144
|
+
query_params=_query_params,
|
|
2145
|
+
header_params=_header_params,
|
|
2146
|
+
body=_body_params,
|
|
2147
|
+
post_params=_form_params,
|
|
2148
|
+
files=_files,
|
|
2149
|
+
auth_settings=_auth_settings,
|
|
2150
|
+
collection_formats=_collection_formats,
|
|
2151
|
+
_host=_host,
|
|
2152
|
+
_request_auth=_request_auth
|
|
2153
|
+
)
|
|
2154
|
+
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
@validate_call
|
|
2159
|
+
async def redpacket_send(
|
|
2160
|
+
self,
|
|
2161
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
2162
|
+
red_packet_send_tx_input: RedPacketSendTxInput,
|
|
2163
|
+
_request_timeout: Union[
|
|
2164
|
+
None,
|
|
2165
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2166
|
+
Tuple[
|
|
2167
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2168
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2169
|
+
]
|
|
2170
|
+
] = None,
|
|
2171
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2172
|
+
_content_type: Optional[StrictStr] = None,
|
|
2173
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2174
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2175
|
+
) -> RedPacketSendTxResponse:
|
|
2176
|
+
"""CONTROLLER.RED_PACKET.SEND.SUMMARY
|
|
2177
|
+
|
|
2178
|
+
CONTROLLER.RED_PACKET.SEND.DESCRIPTION
|
|
2179
|
+
|
|
2180
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
2181
|
+
:type chain: ChainSymbol
|
|
2182
|
+
:param red_packet_send_tx_input: (required)
|
|
2183
|
+
:type red_packet_send_tx_input: RedPacketSendTxInput
|
|
2184
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2185
|
+
number provided, it will be total request
|
|
2186
|
+
timeout. It can also be a pair (tuple) of
|
|
2187
|
+
(connection, read) timeouts.
|
|
2188
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2189
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2190
|
+
request; this effectively ignores the
|
|
2191
|
+
authentication in the spec for a single request.
|
|
2192
|
+
:type _request_auth: dict, optional
|
|
2193
|
+
:param _content_type: force content-type for the request.
|
|
2194
|
+
:type _content_type: str, Optional
|
|
2195
|
+
:param _headers: set to override the headers for a single
|
|
2196
|
+
request; this effectively ignores the headers
|
|
2197
|
+
in the spec for a single request.
|
|
2198
|
+
:type _headers: dict, optional
|
|
2199
|
+
:param _host_index: set to override the host_index for a single
|
|
2200
|
+
request; this effectively ignores the host_index
|
|
2201
|
+
in the spec for a single request.
|
|
2202
|
+
:type _host_index: int, optional
|
|
2203
|
+
:return: Returns the result object.
|
|
2204
|
+
""" # noqa: E501
|
|
2205
|
+
|
|
2206
|
+
_param = self._redpacket_send_serialize(
|
|
2207
|
+
chain=chain,
|
|
2208
|
+
red_packet_send_tx_input=red_packet_send_tx_input,
|
|
2209
|
+
_request_auth=_request_auth,
|
|
2210
|
+
_content_type=_content_type,
|
|
2211
|
+
_headers=_headers,
|
|
2212
|
+
_host_index=_host_index
|
|
2213
|
+
)
|
|
2214
|
+
|
|
2215
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2216
|
+
'200': "RedPacketSendTxResponse",
|
|
2217
|
+
}
|
|
2218
|
+
response_data = await self.api_client.call_api(
|
|
2219
|
+
*_param,
|
|
2220
|
+
_request_timeout=_request_timeout
|
|
2221
|
+
)
|
|
2222
|
+
await response_data.read()
|
|
2223
|
+
return self.api_client.response_deserialize(
|
|
2224
|
+
response_data=response_data,
|
|
2225
|
+
response_types_map=_response_types_map,
|
|
2226
|
+
).data
|
|
2227
|
+
|
|
2228
|
+
|
|
2229
|
+
@validate_call
|
|
2230
|
+
async def redpacket_send_with_http_info(
|
|
2231
|
+
self,
|
|
2232
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
2233
|
+
red_packet_send_tx_input: RedPacketSendTxInput,
|
|
2234
|
+
_request_timeout: Union[
|
|
2235
|
+
None,
|
|
2236
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2237
|
+
Tuple[
|
|
2238
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2239
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2240
|
+
]
|
|
2241
|
+
] = None,
|
|
2242
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2243
|
+
_content_type: Optional[StrictStr] = None,
|
|
2244
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2245
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2246
|
+
) -> ApiResponse[RedPacketSendTxResponse]:
|
|
2247
|
+
"""CONTROLLER.RED_PACKET.SEND.SUMMARY
|
|
2248
|
+
|
|
2249
|
+
CONTROLLER.RED_PACKET.SEND.DESCRIPTION
|
|
2250
|
+
|
|
2251
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
2252
|
+
:type chain: ChainSymbol
|
|
2253
|
+
:param red_packet_send_tx_input: (required)
|
|
2254
|
+
:type red_packet_send_tx_input: RedPacketSendTxInput
|
|
2255
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2256
|
+
number provided, it will be total request
|
|
2257
|
+
timeout. It can also be a pair (tuple) of
|
|
2258
|
+
(connection, read) timeouts.
|
|
2259
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2260
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2261
|
+
request; this effectively ignores the
|
|
2262
|
+
authentication in the spec for a single request.
|
|
2263
|
+
:type _request_auth: dict, optional
|
|
2264
|
+
:param _content_type: force content-type for the request.
|
|
2265
|
+
:type _content_type: str, Optional
|
|
2266
|
+
:param _headers: set to override the headers for a single
|
|
2267
|
+
request; this effectively ignores the headers
|
|
2268
|
+
in the spec for a single request.
|
|
2269
|
+
:type _headers: dict, optional
|
|
2270
|
+
:param _host_index: set to override the host_index for a single
|
|
2271
|
+
request; this effectively ignores the host_index
|
|
2272
|
+
in the spec for a single request.
|
|
2273
|
+
:type _host_index: int, optional
|
|
2274
|
+
:return: Returns the result object.
|
|
2275
|
+
""" # noqa: E501
|
|
2276
|
+
|
|
2277
|
+
_param = self._redpacket_send_serialize(
|
|
2278
|
+
chain=chain,
|
|
2279
|
+
red_packet_send_tx_input=red_packet_send_tx_input,
|
|
2280
|
+
_request_auth=_request_auth,
|
|
2281
|
+
_content_type=_content_type,
|
|
2282
|
+
_headers=_headers,
|
|
2283
|
+
_host_index=_host_index
|
|
2284
|
+
)
|
|
2285
|
+
|
|
2286
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2287
|
+
'200': "RedPacketSendTxResponse",
|
|
2288
|
+
}
|
|
2289
|
+
response_data = await self.api_client.call_api(
|
|
2290
|
+
*_param,
|
|
2291
|
+
_request_timeout=_request_timeout
|
|
2292
|
+
)
|
|
2293
|
+
await response_data.read()
|
|
2294
|
+
return self.api_client.response_deserialize(
|
|
2295
|
+
response_data=response_data,
|
|
2296
|
+
response_types_map=_response_types_map,
|
|
2297
|
+
)
|
|
2298
|
+
|
|
2299
|
+
|
|
2300
|
+
@validate_call
|
|
2301
|
+
async def redpacket_send_without_preload_content(
|
|
2302
|
+
self,
|
|
2303
|
+
chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
|
|
2304
|
+
red_packet_send_tx_input: RedPacketSendTxInput,
|
|
2305
|
+
_request_timeout: Union[
|
|
2306
|
+
None,
|
|
2307
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2308
|
+
Tuple[
|
|
2309
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2310
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2311
|
+
]
|
|
2312
|
+
] = None,
|
|
2313
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2314
|
+
_content_type: Optional[StrictStr] = None,
|
|
2315
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2316
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2317
|
+
) -> RESTResponseType:
|
|
2318
|
+
"""CONTROLLER.RED_PACKET.SEND.SUMMARY
|
|
2319
|
+
|
|
2320
|
+
CONTROLLER.RED_PACKET.SEND.DESCRIPTION
|
|
2321
|
+
|
|
2322
|
+
:param chain: GLOBAL.CHAIN.DESCRIPTION (required)
|
|
2323
|
+
:type chain: ChainSymbol
|
|
2324
|
+
:param red_packet_send_tx_input: (required)
|
|
2325
|
+
:type red_packet_send_tx_input: RedPacketSendTxInput
|
|
2326
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2327
|
+
number provided, it will be total request
|
|
2328
|
+
timeout. It can also be a pair (tuple) of
|
|
2329
|
+
(connection, read) timeouts.
|
|
2330
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2331
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2332
|
+
request; this effectively ignores the
|
|
2333
|
+
authentication in the spec for a single request.
|
|
2334
|
+
:type _request_auth: dict, optional
|
|
2335
|
+
:param _content_type: force content-type for the request.
|
|
2336
|
+
:type _content_type: str, Optional
|
|
2337
|
+
:param _headers: set to override the headers for a single
|
|
2338
|
+
request; this effectively ignores the headers
|
|
2339
|
+
in the spec for a single request.
|
|
2340
|
+
:type _headers: dict, optional
|
|
2341
|
+
:param _host_index: set to override the host_index for a single
|
|
2342
|
+
request; this effectively ignores the host_index
|
|
2343
|
+
in the spec for a single request.
|
|
2344
|
+
:type _host_index: int, optional
|
|
2345
|
+
:return: Returns the result object.
|
|
2346
|
+
""" # noqa: E501
|
|
2347
|
+
|
|
2348
|
+
_param = self._redpacket_send_serialize(
|
|
2349
|
+
chain=chain,
|
|
2350
|
+
red_packet_send_tx_input=red_packet_send_tx_input,
|
|
2351
|
+
_request_auth=_request_auth,
|
|
2352
|
+
_content_type=_content_type,
|
|
2353
|
+
_headers=_headers,
|
|
2354
|
+
_host_index=_host_index
|
|
2355
|
+
)
|
|
2356
|
+
|
|
2357
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2358
|
+
'200': "RedPacketSendTxResponse",
|
|
2359
|
+
}
|
|
2360
|
+
response_data = await self.api_client.call_api(
|
|
2361
|
+
*_param,
|
|
2362
|
+
_request_timeout=_request_timeout
|
|
2363
|
+
)
|
|
2364
|
+
return response_data.response
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
def _redpacket_send_serialize(
|
|
2368
|
+
self,
|
|
2369
|
+
chain,
|
|
2370
|
+
red_packet_send_tx_input,
|
|
2371
|
+
_request_auth,
|
|
2372
|
+
_content_type,
|
|
2373
|
+
_headers,
|
|
2374
|
+
_host_index,
|
|
2375
|
+
) -> RequestSerialized:
|
|
2376
|
+
|
|
2377
|
+
_host = None
|
|
2378
|
+
|
|
2379
|
+
_collection_formats: Dict[str, str] = {
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
_path_params: Dict[str, str] = {}
|
|
2383
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2384
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2385
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2386
|
+
_files: Dict[
|
|
2387
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2388
|
+
] = {}
|
|
2389
|
+
_body_params: Optional[bytes] = None
|
|
2390
|
+
|
|
2391
|
+
# process the path parameters
|
|
2392
|
+
if chain is not None:
|
|
2393
|
+
_path_params['chain'] = chain.value
|
|
2394
|
+
# process the query parameters
|
|
2395
|
+
# process the header parameters
|
|
2396
|
+
# process the form parameters
|
|
2397
|
+
# process the body parameter
|
|
2398
|
+
if red_packet_send_tx_input is not None:
|
|
2399
|
+
_body_params = red_packet_send_tx_input
|
|
2400
|
+
|
|
2401
|
+
|
|
2402
|
+
# set the HTTP header `Accept`
|
|
2403
|
+
if 'Accept' not in _header_params:
|
|
2404
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2405
|
+
[
|
|
2406
|
+
'application/json'
|
|
2407
|
+
]
|
|
2408
|
+
)
|
|
2409
|
+
|
|
2410
|
+
# set the HTTP header `Content-Type`
|
|
2411
|
+
if _content_type:
|
|
2412
|
+
_header_params['Content-Type'] = _content_type
|
|
2413
|
+
else:
|
|
2414
|
+
_default_content_type = (
|
|
2415
|
+
self.api_client.select_header_content_type(
|
|
2416
|
+
[
|
|
2417
|
+
'application/json'
|
|
2418
|
+
]
|
|
2419
|
+
)
|
|
2420
|
+
)
|
|
2421
|
+
if _default_content_type is not None:
|
|
2422
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2423
|
+
|
|
2424
|
+
# authentication setting
|
|
2425
|
+
_auth_settings: List[str] = [
|
|
2426
|
+
'bearer'
|
|
2427
|
+
]
|
|
2428
|
+
|
|
2429
|
+
return self.api_client.param_serialize(
|
|
2430
|
+
method='POST',
|
|
2431
|
+
resource_path='/v1/redpacket/{chain}/send',
|
|
2432
|
+
path_params=_path_params,
|
|
2433
|
+
query_params=_query_params,
|
|
2434
|
+
header_params=_header_params,
|
|
2435
|
+
body=_body_params,
|
|
2436
|
+
post_params=_form_params,
|
|
2437
|
+
files=_files,
|
|
2438
|
+
auth_settings=_auth_settings,
|
|
2439
|
+
collection_formats=_collection_formats,
|
|
2440
|
+
_host=_host,
|
|
2441
|
+
_request_auth=_request_auth
|
|
2442
|
+
)
|
|
2443
|
+
|
|
2444
|
+
|