From c4911dc24f63cad96a7d26e1d85b1100bd681189 Mon Sep 17 00:00:00 2001 From: ausias-armesto <29434949+ausias-armesto@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:58:50 +0000 Subject: [PATCH] Update SDK Python to version 2.2.0-rc.1 --- .swagger-codegen/VERSION | 2 +- README.md | 37 +- docs/AccountApi.md | 10 +- docs/AliasApi.md | 84 +++-- docs/AliasDestinationBodyRequest.md | 11 + docs/ChannelsApi.md | 16 +- docs/ChecksApi.md | 48 ++- docs/ConfigurationApi.md | 2 - docs/GraphExportQuery.md | 11 + ...liasPeerIdBodyRequest.md => IpProtocol.md} | 4 +- docs/MessagesApi.md | 14 +- docs/NetworkApi.md | 51 ++- docs/NodeApi.md | 73 +++- docs/NodeInfoResponse.md | 6 + docs/NodeVersionResponse.md | 1 + docs/OpenChannelBodyRequest.md | 3 +- docs/PeersApi.md | 24 +- docs/RoutingOptions.md | 8 + docs/SendMessageBodyRequest.md | 5 +- docs/SessionApi.md | 175 +++++++++ docs/SessionCapability.md | 8 + docs/SessionClientRequest.md | 13 + docs/SessionClientResponse.md | 13 + docs/SessionTargetSpec.md | 8 + docs/TicketProbabilityResponse.md | 9 + docs/TicketsApi.md | 54 ++- docs/WithdrawResponse.md | 9 + hoprd_sdk/__init__.py | 14 +- hoprd_sdk/api/__init__.py | 1 + hoprd_sdk/api/account_api.py | 20 +- hoprd_sdk/api/alias_api.py | 115 +++++- hoprd_sdk/api/channels_api.py | 24 +- hoprd_sdk/api/checks_api.py | 89 ++++- hoprd_sdk/api/configuration_api.py | 4 +- hoprd_sdk/api/messages_api.py | 26 +- hoprd_sdk/api/network_api.py | 89 ++++- hoprd_sdk/api/node_api.py | 115 +++++- hoprd_sdk/api/peers_api.py | 72 ++-- hoprd_sdk/api/session_api.py | 344 ++++++++++++++++++ hoprd_sdk/api/tickets_api.py | 95 ++++- hoprd_sdk/api_client.py | 4 +- hoprd_sdk/api_client.py.orig | 4 +- hoprd_sdk/configuration.py | 6 +- hoprd_sdk/models/__init__.py | 13 +- .../models/account_addresses_response.py | 2 +- hoprd_sdk/models/account_balances_response.py | 2 +- ...t.py => alias_destination_body_request.py} | 59 ++- hoprd_sdk/models/announced_peer.py | 2 +- hoprd_sdk/models/api_error.py | 2 +- hoprd_sdk/models/channel_info_response.py | 2 +- hoprd_sdk/models/channel_ticket.py | 2 +- hoprd_sdk/models/channels_query_request.py | 2 +- hoprd_sdk/models/close_channel_response.py | 2 +- hoprd_sdk/models/entry_node.py | 2 +- hoprd_sdk/models/fund_body_request.py | 2 +- hoprd_sdk/models/get_message_body_request.py | 2 +- hoprd_sdk/models/graph_export_query.py | 168 +++++++++ hoprd_sdk/models/heartbeat_info.py | 2 +- hoprd_sdk/models/ip_protocol.py | 90 +++++ hoprd_sdk/models/message_pop_all_response.py | 2 +- hoprd_sdk/models/message_pop_response.py | 2 +- hoprd_sdk/models/node_channel.py | 2 +- hoprd_sdk/models/node_channels_response.py | 2 +- hoprd_sdk/models/node_info_response.py | 170 ++++++++- hoprd_sdk/models/node_peer_info_response.py | 2 +- hoprd_sdk/models/node_peers_query_request.py | 2 +- hoprd_sdk/models/node_peers_response.py | 2 +- .../models/node_ticket_statistics_response.py | 2 +- hoprd_sdk/models/node_version_response.py | 31 +- hoprd_sdk/models/open_channel_body_request.py | 41 ++- hoprd_sdk/models/open_channel_response.py | 2 +- hoprd_sdk/models/peer_id_response.py | 2 +- hoprd_sdk/models/peer_info.py | 2 +- hoprd_sdk/models/ping_response.py | 2 +- hoprd_sdk/models/routing_options.py | 84 +++++ hoprd_sdk/models/send_message_body_request.py | 45 ++- hoprd_sdk/models/send_message_response.py | 2 +- hoprd_sdk/models/session_capability.py | 92 +++++ hoprd_sdk/models/session_client_request.py | 223 ++++++++++++ hoprd_sdk/models/session_client_response.py | 219 +++++++++++ hoprd_sdk/models/session_target_spec.py | 84 +++++ hoprd_sdk/models/size_response.py | 2 +- hoprd_sdk/models/tag_query_request.py | 2 +- hoprd_sdk/models/ticket_price_response.py | 2 +- .../models/ticket_probability_response.py | 113 ++++++ hoprd_sdk/models/withdraw_body_request.py | 2 +- hoprd_sdk/models/withdraw_response.py | 111 ++++++ hoprd_sdk/rest.py | 2 +- setup.py | 4 +- test/test_account_addresses_response.py | 2 +- test/test_account_api.py | 2 +- test/test_account_balances_response.py | 2 +- test/test_alias_api.py | 17 +- test/test_alias_destination_body_request.py | 39 ++ test/test_announced_peer.py | 2 +- test/test_api_error.py | 2 +- test/test_channel_info_response.py | 2 +- test/test_channel_ticket.py | 2 +- test/test_channels_api.py | 2 +- test/test_channels_query_request.py | 2 +- test/test_checks_api.py | 9 +- test/test_close_channel_response.py | 2 +- test/test_configuration_api.py | 2 +- test/test_entry_node.py | 2 +- test/test_fund_body_request.py | 2 +- test/test_get_message_body_request.py | 2 +- ..._request.py => test_graph_export_query.py} | 14 +- test/test_heartbeat_info.py | 2 +- test/test_ip_protocol.py | 39 ++ test/test_message_pop_all_response.py | 2 +- test/test_message_pop_response.py | 2 +- test/test_messages_api.py | 2 +- test/test_network_api.py | 9 +- test/test_node_api.py | 11 +- test/test_node_channel.py | 2 +- test/test_node_channels_response.py | 2 +- test/test_node_info_response.py | 2 +- test/test_node_peer_info_response.py | 2 +- test/test_node_peers_query_request.py | 2 +- test/test_node_peers_response.py | 2 +- test/test_node_ticket_statistics_response.py | 2 +- test/test_node_version_response.py | 2 +- test/test_open_channel_body_request.py | 2 +- test/test_open_channel_response.py | 2 +- test/test_peer_id_response.py | 2 +- test/test_peer_info.py | 2 +- test/test_peers_api.py | 2 +- test/test_ping_response.py | 2 +- test/test_routing_options.py | 39 ++ test/test_send_message_body_request.py | 2 +- test/test_send_message_response.py | 2 +- test/test_session_api.py | 54 +++ test/test_session_capability.py | 39 ++ test/test_session_client_request.py | 39 ++ test/test_session_client_response.py | 39 ++ test/test_session_target_spec.py | 39 ++ test/test_size_response.py | 2 +- test/test_tag_query_request.py | 2 +- test/test_ticket_price_response.py | 2 +- test/test_ticket_probability_response.py | 39 ++ test/test_tickets_api.py | 9 +- test/test_withdraw_body_request.py | 2 +- test/test_withdraw_response.py | 39 ++ 143 files changed, 3504 insertions(+), 374 deletions(-) create mode 100644 docs/AliasDestinationBodyRequest.md create mode 100644 docs/GraphExportQuery.md rename docs/{AliasPeerIdBodyRequest.md => IpProtocol.md} (77%) create mode 100644 docs/RoutingOptions.md create mode 100644 docs/SessionApi.md create mode 100644 docs/SessionCapability.md create mode 100644 docs/SessionClientRequest.md create mode 100644 docs/SessionClientResponse.md create mode 100644 docs/SessionTargetSpec.md create mode 100644 docs/TicketProbabilityResponse.md create mode 100644 docs/WithdrawResponse.md create mode 100644 hoprd_sdk/api/session_api.py rename hoprd_sdk/models/{alias_peer_id_body_request.py => alias_destination_body_request.py} (62%) create mode 100644 hoprd_sdk/models/graph_export_query.py create mode 100644 hoprd_sdk/models/ip_protocol.py create mode 100644 hoprd_sdk/models/routing_options.py create mode 100644 hoprd_sdk/models/session_capability.py create mode 100644 hoprd_sdk/models/session_client_request.py create mode 100644 hoprd_sdk/models/session_client_response.py create mode 100644 hoprd_sdk/models/session_target_spec.py create mode 100644 hoprd_sdk/models/ticket_probability_response.py create mode 100644 hoprd_sdk/models/withdraw_response.py create mode 100644 test/test_alias_destination_body_request.py rename test/{test_alias_peer_id_body_request.py => test_graph_export_query.py} (58%) create mode 100644 test/test_ip_protocol.py create mode 100644 test/test_routing_options.py create mode 100644 test/test_session_api.py create mode 100644 test/test_session_capability.py create mode 100644 test/test_session_client_request.py create mode 100644 test/test_session_client_response.py create mode 100644 test/test_session_target_spec.py create mode 100644 test/test_ticket_probability_response.py create mode 100644 test/test_withdraw_response.py diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION index 248908e..75c4a80 100644 --- a/.swagger-codegen/VERSION +++ b/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.54 \ No newline at end of file +3.0.62 \ No newline at end of file diff --git a/README.md b/README.md index 52d1ad6..a4ebae2 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ This Rest API enables developers to interact with a hoprd node programatically t This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 3.1.0 -- Package version: 2.1.0 +- API version: 3.10.0 +- Package version: 2.2.0-rc.1 - Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen ## Requirements. @@ -110,10 +110,11 @@ Class | Method | HTTP request | Description *AccountApi* | [**addresses**](docs/AccountApi.md#addresses) | **GET** /api/v3/account/addresses | Get node's HOPR and native addresses. *AccountApi* | [**balances**](docs/AccountApi.md#balances) | **GET** /api/v3/account/balances | Get node's and associated Safe's HOPR and native balances as the allowance for HOPR *AccountApi* | [**withdraw**](docs/AccountApi.md#withdraw) | **POST** /api/v3/account/withdraw | Withdraw funds from this node to the ethereum wallet address. -*AliasApi* | [**aliases**](docs/AliasApi.md#aliases) | **GET** /api/v3/aliases | Get each previously set alias and its corresponding PeerId. -*AliasApi* | [**delete_alias**](docs/AliasApi.md#delete_alias) | **DELETE** /api/v3/aliases/{alias} | Delete an alias. -*AliasApi* | [**get_alias**](docs/AliasApi.md#get_alias) | **GET** /api/v3/aliases/{alias} | Get alias for the PeerId (Hopr address) that have this alias assigned to it. -*AliasApi* | [**set_alias**](docs/AliasApi.md#set_alias) | **POST** /api/v3/aliases | Set alias for a peer with a specific PeerId. +*AliasApi* | [**aliases**](docs/AliasApi.md#aliases) | **GET** /api/v3/aliases | (deprecated, will be removed in v3.0) Get each previously set alias and its corresponding PeerId as a hashmap. +*AliasApi* | [**clear_aliases**](docs/AliasApi.md#clear_aliases) | **DELETE** /api/v3/aliases | (deprecated, will be removed in v3.0) Clear all aliases. +*AliasApi* | [**delete_alias**](docs/AliasApi.md#delete_alias) | **DELETE** /api/v3/aliases/{alias} | (deprecated, will be removed in v3.0) Delete an alias. +*AliasApi* | [**get_alias**](docs/AliasApi.md#get_alias) | **GET** /api/v3/aliases/{alias} | (deprecated, will be removed in v3.0) Get alias for the PeerId (Hopr address) that have this alias assigned to it. +*AliasApi* | [**set_alias**](docs/AliasApi.md#set_alias) | **POST** /api/v3/aliases | (deprecated, will be removed in v3.0) Set alias for a peer with a specific PeerId. *ChannelsApi* | [**aggregate_tickets_in_channel**](docs/ChannelsApi.md#aggregate_tickets_in_channel) | **POST** /api/v3/channels/{channelId}/tickets/aggregate | Starts aggregation of tickets in the given channel. *ChannelsApi* | [**close_channel**](docs/ChannelsApi.md#close_channel) | **DELETE** /api/v3/channels/{channelId} | Closes the given channel. *ChannelsApi* | [**fund_channel**](docs/ChannelsApi.md#fund_channel) | **POST** /api/v3/channels/{channelId}/fund | Funds the given channel with the given amount of HOPR tokens. @@ -122,6 +123,7 @@ Class | Method | HTTP request | Description *ChannelsApi* | [**redeem_tickets_in_channel**](docs/ChannelsApi.md#redeem_tickets_in_channel) | **POST** /api/v3/channels/{channelId}/tickets/redeem | Starts redeeming all tickets in the given channel. *ChannelsApi* | [**show_channel**](docs/ChannelsApi.md#show_channel) | **GET** /api/v3/channels/{channelId} | Returns information about the given channel. *ChannelsApi* | [**show_channel_tickets**](docs/ChannelsApi.md#show_channel_tickets) | **GET** /api/v3/channels/{channelId}/tickets | Lists all tickets for the given channel ID. +*ChecksApi* | [**eligiblez**](docs/ChecksApi.md#eligiblez) | **GET** /eligiblez | Check whether the node is eligible in the network. *ChecksApi* | [**healthyz**](docs/ChecksApi.md#healthyz) | **GET** /healthyz | Check whether the node is healthy. *ChecksApi* | [**readyz**](docs/ChecksApi.md#readyz) | **GET** /readyz | Check whether the node is ready to accept connections. *ChecksApi* | [**startedz**](docs/ChecksApi.md#startedz) | **GET** /startedz | Check whether the node is started. @@ -134,14 +136,20 @@ Class | Method | HTTP request | Description *MessagesApi* | [**send_message**](docs/MessagesApi.md#send_message) | **POST** /api/v3/messages | Send a message to another peer using the given path. *MessagesApi* | [**size**](docs/MessagesApi.md#size) | **GET** /api/v3/messages/size | Get size of filtered message inbox for a specific tag *NetworkApi* | [**price**](docs/NetworkApi.md#price) | **GET** /api/v3/network/price | Obtains the current ticket price. +*NetworkApi* | [**probability**](docs/NetworkApi.md#probability) | **GET** /api/v3/network/probability | Gets the current minimum incoming ticket winning probability defined by the network. +*NodeApi* | [**channel_graph**](docs/NodeApi.md#channel_graph) | **GET** /api/v3/node/graph | Retrieve node's channel graph in DOT or JSON format. *NodeApi* | [**entry_nodes**](docs/NodeApi.md#entry_nodes) | **GET** /api/v3/node/entryNodes | List all known entry nodes with multiaddrs and eligibility. *NodeApi* | [**info**](docs/NodeApi.md#info) | **GET** /api/v3/node/info | Get information about this HOPR Node. *NodeApi* | [**metrics**](docs/NodeApi.md#metrics) | **GET** /api/v3/node/metrics | Retrieve Prometheus metrics from the running node. *NodeApi* | [**peers**](docs/NodeApi.md#peers) | **GET** /api/v3/node/peers | Lists information for `connected peers` and `announced peers`. -*NodeApi* | [**version**](docs/NodeApi.md#version) | **GET** /api/v3/node/version | Get release version of the running node. -*PeersApi* | [**ping_peer**](docs/PeersApi.md#ping_peer) | **POST** /api/v3/peers/{peerId}/ping | Directly pings the given peer. -*PeersApi* | [**show_peer_info**](docs/PeersApi.md#show_peer_info) | **GET** /api/v3/peers/{peerId} | Returns transport-related information about the given peer. +*NodeApi* | [**version**](docs/NodeApi.md#version) | **GET** /api/v3/node/version | Get the release version of the running node. +*PeersApi* | [**ping_peer**](docs/PeersApi.md#ping_peer) | **POST** /api/v3/peers/{destination}/ping | Directly pings the given peer. +*PeersApi* | [**show_peer_info**](docs/PeersApi.md#show_peer_info) | **GET** /api/v3/peers/{destination} | Returns transport-related information about the given peer. +*SessionApi* | [**close_client**](docs/SessionApi.md#close_client) | **DELETE** /api/v3/session/{protocol}/{ip}/{port} | Closes an existing Session listener. +*SessionApi* | [**create_client**](docs/SessionApi.md#create_client) | **POST** /api/v3/session/{protocol} | Creates a new client session returning the given session listening host and port over TCP or UDP. +*SessionApi* | [**list_clients**](docs/SessionApi.md#list_clients) | **GET** /api/v3/session/{protocol} | Lists existing Session listeners for the given IP protocol. *TicketsApi* | [**redeem_all_tickets**](docs/TicketsApi.md#redeem_all_tickets) | **POST** /api/v3/tickets/redeem | Starts redeeming of all tickets in all channels. +*TicketsApi* | [**reset_ticket_statistics**](docs/TicketsApi.md#reset_ticket_statistics) | **DELETE** /api/v3/tickets/statistics | Resets the ticket metrics. *TicketsApi* | [**show_all_tickets**](docs/TicketsApi.md#show_all_tickets) | **GET** /api/v3/tickets | Endpoint is deprecated and will be removed in the future. Returns an empty array. *TicketsApi* | [**show_ticket_statistics**](docs/TicketsApi.md#show_ticket_statistics) | **GET** /api/v3/tickets/statistics | Returns current complete statistics on tickets. @@ -149,7 +157,7 @@ Class | Method | HTTP request | Description - [AccountAddressesResponse](docs/AccountAddressesResponse.md) - [AccountBalancesResponse](docs/AccountBalancesResponse.md) - - [AliasPeerIdBodyRequest](docs/AliasPeerIdBodyRequest.md) + - [AliasDestinationBodyRequest](docs/AliasDestinationBodyRequest.md) - [AnnouncedPeer](docs/AnnouncedPeer.md) - [ApiError](docs/ApiError.md) - [ChannelInfoResponse](docs/ChannelInfoResponse.md) @@ -159,7 +167,9 @@ Class | Method | HTTP request | Description - [EntryNode](docs/EntryNode.md) - [FundBodyRequest](docs/FundBodyRequest.md) - [GetMessageBodyRequest](docs/GetMessageBodyRequest.md) + - [GraphExportQuery](docs/GraphExportQuery.md) - [HeartbeatInfo](docs/HeartbeatInfo.md) + - [IpProtocol](docs/IpProtocol.md) - [MessagePopAllResponse](docs/MessagePopAllResponse.md) - [MessagePopResponse](docs/MessagePopResponse.md) - [NodeChannel](docs/NodeChannel.md) @@ -175,12 +185,19 @@ Class | Method | HTTP request | Description - [PeerIdResponse](docs/PeerIdResponse.md) - [PeerInfo](docs/PeerInfo.md) - [PingResponse](docs/PingResponse.md) + - [RoutingOptions](docs/RoutingOptions.md) - [SendMessageBodyRequest](docs/SendMessageBodyRequest.md) - [SendMessageResponse](docs/SendMessageResponse.md) + - [SessionCapability](docs/SessionCapability.md) + - [SessionClientRequest](docs/SessionClientRequest.md) + - [SessionClientResponse](docs/SessionClientResponse.md) + - [SessionTargetSpec](docs/SessionTargetSpec.md) - [SizeResponse](docs/SizeResponse.md) - [TagQueryRequest](docs/TagQueryRequest.md) - [TicketPriceResponse](docs/TicketPriceResponse.md) + - [TicketProbabilityResponse](docs/TicketProbabilityResponse.md) - [WithdrawBodyRequest](docs/WithdrawBodyRequest.md) + - [WithdrawResponse](docs/WithdrawResponse.md) ## Documentation For Authorization diff --git a/docs/AccountApi.md b/docs/AccountApi.md index 6079d35..a80b6e0 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description Get node's HOPR and native addresses. -Get node's HOPR and native addresses. HOPR address is represented by the P2P PeerId and can be used by other node owner to interact with this node. +HOPR address is represented by the P2P PeerId and can be used by other node owner to interact with this node. ### Example ```python @@ -63,7 +63,7 @@ This endpoint does not need any parameter. Get node's and associated Safe's HOPR and native balances as the allowance for HOPR -Get node's and associated Safe's HOPR and native balances as the allowance for HOPR tokens to be drawn by HoprChannels from Safe. HOPR tokens from the Safe balance are used to fund the payment channels between this node and other nodes on the network. NATIVE balance of the Node is used to pay for the gas fees for the blockchain. +tokens to be drawn by HoprChannels from Safe. HOPR tokens from the Safe balance are used to fund the payment channels between this node and other nodes on the network. NATIVE balance of the Node is used to pay for the gas fees for the blockchain. ### Example ```python @@ -109,11 +109,11 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **withdraw** -> AccountBalancesResponse withdraw(body) +> WithdrawResponse withdraw(body) Withdraw funds from this node to the ethereum wallet address. -Withdraw funds from this node to the ethereum wallet address. Both NATIVE or HOPR can be withdrawn using this method. +Both Native or HOPR can be withdrawn using this method. ### Example ```python @@ -149,7 +149,7 @@ Name | Type | Description | Notes ### Return type -[**AccountBalancesResponse**](AccountBalancesResponse.md) +[**WithdrawResponse**](WithdrawResponse.md) ### Authorization diff --git a/docs/AliasApi.md b/docs/AliasApi.md index 50cc95f..695eb99 100644 --- a/docs/AliasApi.md +++ b/docs/AliasApi.md @@ -4,17 +4,16 @@ All URIs are relative to */* Method | HTTP request | Description ------------- | ------------- | ------------- -[**aliases**](AliasApi.md#aliases) | **GET** /api/v3/aliases | Get each previously set alias and its corresponding PeerId. -[**delete_alias**](AliasApi.md#delete_alias) | **DELETE** /api/v3/aliases/{alias} | Delete an alias. -[**get_alias**](AliasApi.md#get_alias) | **GET** /api/v3/aliases/{alias} | Get alias for the PeerId (Hopr address) that have this alias assigned to it. -[**set_alias**](AliasApi.md#set_alias) | **POST** /api/v3/aliases | Set alias for a peer with a specific PeerId. +[**aliases**](AliasApi.md#aliases) | **GET** /api/v3/aliases | (deprecated, will be removed in v3.0) Get each previously set alias and its corresponding PeerId as a hashmap. +[**clear_aliases**](AliasApi.md#clear_aliases) | **DELETE** /api/v3/aliases | (deprecated, will be removed in v3.0) Clear all aliases. +[**delete_alias**](AliasApi.md#delete_alias) | **DELETE** /api/v3/aliases/{alias} | (deprecated, will be removed in v3.0) Delete an alias. +[**get_alias**](AliasApi.md#get_alias) | **GET** /api/v3/aliases/{alias} | (deprecated, will be removed in v3.0) Get alias for the PeerId (Hopr address) that have this alias assigned to it. +[**set_alias**](AliasApi.md#set_alias) | **POST** /api/v3/aliases | (deprecated, will be removed in v3.0) Set alias for a peer with a specific PeerId. # **aliases** > dict(str, str) aliases() -Get each previously set alias and its corresponding PeerId. - -Get each previously set alias and its corresponding PeerId. +(deprecated, will be removed in v3.0) Get each previously set alias and its corresponding PeerId as a hashmap. ### Example ```python @@ -34,7 +33,7 @@ configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' api_instance = hoprd_sdk.AliasApi(hoprd_sdk.ApiClient(configuration)) try: - # Get each previously set alias and its corresponding PeerId. + # (deprecated, will be removed in v3.0) Get each previously set alias and its corresponding PeerId as a hashmap. api_response = api_instance.aliases() pprint(api_response) except ApiException as e: @@ -59,12 +58,57 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **clear_aliases** +> clear_aliases() + +(deprecated, will be removed in v3.0) Clear all aliases. + +### Example +```python +from __future__ import print_function +import time +import hoprd_sdk +from hoprd_sdk.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_token +configuration = hoprd_sdk.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = hoprd_sdk.AliasApi(hoprd_sdk.ApiClient(configuration)) + +try: + # (deprecated, will be removed in v3.0) Clear all aliases. + api_instance.clear_aliases() +except ApiException as e: + print("Exception when calling AliasApi->clear_aliases: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[api_token](../README.md#api_token), [bearer_token](../README.md#bearer_token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_alias** > delete_alias(alias) -Delete an alias. - -Delete an alias. +(deprecated, will be removed in v3.0) Delete an alias. ### Example ```python @@ -85,7 +129,7 @@ api_instance = hoprd_sdk.AliasApi(hoprd_sdk.ApiClient(configuration)) alias = 'alias_example' # str | Alias to be shown try: - # Delete an alias. + # (deprecated, will be removed in v3.0) Delete an alias. api_instance.delete_alias(alias) except ApiException as e: print("Exception when calling AliasApi->delete_alias: %s\n" % e) @@ -115,9 +159,7 @@ void (empty response body) # **get_alias** > PeerIdResponse get_alias(alias) -Get alias for the PeerId (Hopr address) that have this alias assigned to it. - -Get alias for the PeerId (Hopr address) that have this alias assigned to it. +(deprecated, will be removed in v3.0) Get alias for the PeerId (Hopr address) that have this alias assigned to it. ### Example ```python @@ -138,7 +180,7 @@ api_instance = hoprd_sdk.AliasApi(hoprd_sdk.ApiClient(configuration)) alias = 'alias_example' # str | Alias to be shown try: - # Get alias for the PeerId (Hopr address) that have this alias assigned to it. + # (deprecated, will be removed in v3.0) Get alias for the PeerId (Hopr address) that have this alias assigned to it. api_response = api_instance.get_alias(alias) pprint(api_response) except ApiException as e: @@ -169,9 +211,7 @@ Name | Type | Description | Notes # **set_alias** > PeerIdResponse set_alias(body) -Set alias for a peer with a specific PeerId. - -Set alias for a peer with a specific PeerId. +(deprecated, will be removed in v3.0) Set alias for a peer with a specific PeerId. ### Example ```python @@ -189,10 +229,10 @@ configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = hoprd_sdk.AliasApi(hoprd_sdk.ApiClient(configuration)) -body = hoprd_sdk.AliasPeerIdBodyRequest() # AliasPeerIdBodyRequest | Alias name along with the PeerId to be aliased +body = hoprd_sdk.AliasDestinationBodyRequest() # AliasDestinationBodyRequest | Alias name along with the PeerId to be aliased try: - # Set alias for a peer with a specific PeerId. + # (deprecated, will be removed in v3.0) Set alias for a peer with a specific PeerId. api_response = api_instance.set_alias(body) pprint(api_response) except ApiException as e: @@ -203,7 +243,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**AliasPeerIdBodyRequest**](AliasPeerIdBodyRequest.md)| Alias name along with the PeerId to be aliased | + **body** | [**AliasDestinationBodyRequest**](AliasDestinationBodyRequest.md)| Alias name along with the PeerId to be aliased | ### Return type diff --git a/docs/AliasDestinationBodyRequest.md b/docs/AliasDestinationBodyRequest.md new file mode 100644 index 0000000..b00cd70 --- /dev/null +++ b/docs/AliasDestinationBodyRequest.md @@ -0,0 +1,11 @@ +# AliasDestinationBodyRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alias** | **str** | | +**destination** | **str** | | [optional] +**peer_id** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ChannelsApi.md b/docs/ChannelsApi.md index 4f45fa3..424b34f 100644 --- a/docs/ChannelsApi.md +++ b/docs/ChannelsApi.md @@ -18,8 +18,6 @@ Method | HTTP request | Description Starts aggregation of tickets in the given channel. -Starts aggregation of tickets in the given channel. - ### Example ```python from __future__ import print_function @@ -71,7 +69,7 @@ void (empty response body) Closes the given channel. -Closes the given channel. If the channel is currently `Open`, it will transition it to `PendingToClose`. If the channels is in `PendingToClose` and the channel closure period has elapsed, it will transition it to `Closed`. +If the channel is currently `Open`, it will transition it to `PendingToClose`. If the channels is in `PendingToClose` and the channel closure period has elapsed, it will transition it to `Closed`. ### Example ```python @@ -125,8 +123,6 @@ Name | Type | Description | Notes Funds the given channel with the given amount of HOPR tokens. -Funds the given channel with the given amount of HOPR tokens. - ### Example ```python from __future__ import print_function @@ -181,7 +177,7 @@ Name | Type | Description | Notes Lists channels opened to/from this node. Alternatively, it can print all -Lists channels opened to/from this node. Alternatively, it can print all the channels in the network as this node sees them. +the channels in the network as this node sees them. ### Example ```python @@ -237,8 +233,6 @@ Name | Type | Description | Notes Opens a channel to the given on-chain address with the given initial stake of HOPR tokens. -Opens a channel to the given on-chain address with the given initial stake of HOPR tokens. - ### Example ```python from __future__ import print_function @@ -291,7 +285,7 @@ Name | Type | Description | Notes Starts redeeming all tickets in the given channel. -Starts redeeming all tickets in the given channel. **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. +**WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. ### Example ```python @@ -344,8 +338,6 @@ void (empty response body) Returns information about the given channel. -Returns information about the given channel. - ### Example ```python from __future__ import print_function @@ -398,8 +390,6 @@ Name | Type | Description | Notes Lists all tickets for the given channel ID. -Lists all tickets for the given channel ID. - ### Example ```python from __future__ import print_function diff --git a/docs/ChecksApi.md b/docs/ChecksApi.md index a02eaa6..007249e 100644 --- a/docs/ChecksApi.md +++ b/docs/ChecksApi.md @@ -4,17 +4,57 @@ All URIs are relative to */* Method | HTTP request | Description ------------- | ------------- | ------------- +[**eligiblez**](ChecksApi.md#eligiblez) | **GET** /eligiblez | Check whether the node is eligible in the network. [**healthyz**](ChecksApi.md#healthyz) | **GET** /healthyz | Check whether the node is healthy. [**readyz**](ChecksApi.md#readyz) | **GET** /readyz | Check whether the node is ready to accept connections. [**startedz**](ChecksApi.md#startedz) | **GET** /startedz | Check whether the node is started. +# **eligiblez** +> eligiblez() + +Check whether the node is eligible in the network. + +### Example +```python +from __future__ import print_function +import time +import hoprd_sdk +from hoprd_sdk.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = hoprd_sdk.ChecksApi() + +try: + # Check whether the node is eligible in the network. + api_instance.eligiblez() +except ApiException as e: + print("Exception when calling ChecksApi->eligiblez: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **healthyz** > healthyz() Check whether the node is healthy. -Check whether the node is healthy. - ### Example ```python from __future__ import print_function @@ -56,8 +96,6 @@ No authorization required Check whether the node is ready to accept connections. -Check whether the node is ready to accept connections. - ### Example ```python from __future__ import print_function @@ -99,8 +137,6 @@ No authorization required Check whether the node is started. -Check whether the node is started. - ### Example ```python from __future__ import print_function diff --git a/docs/ConfigurationApi.md b/docs/ConfigurationApi.md index 6d9b9e3..6f4fe2a 100644 --- a/docs/ConfigurationApi.md +++ b/docs/ConfigurationApi.md @@ -11,8 +11,6 @@ Method | HTTP request | Description Get the configuration of the running node. -Get the configuration of the running node. - ### Example ```python from __future__ import print_function diff --git a/docs/GraphExportQuery.md b/docs/GraphExportQuery.md new file mode 100644 index 0000000..b891382 --- /dev/null +++ b/docs/GraphExportQuery.md @@ -0,0 +1,11 @@ +# GraphExportQuery + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ignore_disconnected_components** | **bool** | If set, nodes that are not connected to this node (via open channels) will not be exported. This setting automatically implies `ignore_non_opened_channels`. | [optional] [default to False] +**ignore_non_opened_channels** | **bool** | Do not export channels that are not in the `Open` state. | [optional] [default to False] +**raw_graph** | **bool** | Export the entire graph in raw JSON format, that can be later used to load the graph into e.g. a unit test. Note that `ignore_disconnected_components` and `ignore_non_opened_channels` are ignored. | [optional] [default to False] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AliasPeerIdBodyRequest.md b/docs/IpProtocol.md similarity index 77% rename from docs/AliasPeerIdBodyRequest.md rename to docs/IpProtocol.md index c5299fe..0029a4d 100644 --- a/docs/AliasPeerIdBodyRequest.md +++ b/docs/IpProtocol.md @@ -1,10 +1,8 @@ -# AliasPeerIdBodyRequest +# IpProtocol ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**alias** | **str** | | -**peer_id** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 9abd005..dd09a94 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -17,8 +17,6 @@ Method | HTTP request | Description Delete messages from nodes message inbox. -Delete messages from nodes message inbox. - ### Example ```python from __future__ import print_function @@ -70,7 +68,7 @@ void (empty response body) Peek the oldest message currently present in the nodes message inbox. -Peek the oldest message currently present in the nodes message inbox. The message is not removed from the inbox. +The message is not removed from the inbox. ### Example ```python @@ -124,7 +122,7 @@ Name | Type | Description | Notes Peek the list of messages currently present in the nodes message inbox, filtered by tag, -Peek the list of messages currently present in the nodes message inbox, filtered by tag, and optionally by timestamp (epoch in milliseconds). The messages are not removed from the inbox. +and optionally by timestamp (epoch in milliseconds). The messages are not removed from the inbox. ### Example ```python @@ -178,7 +176,7 @@ Name | Type | Description | Notes Get the oldest message currently present in the nodes message inbox. -Get the oldest message currently present in the nodes message inbox. The message is removed from the inbox. +The message is removed from the inbox. ### Example ```python @@ -232,7 +230,7 @@ Name | Type | Description | Notes Get the list of messages currently present in the nodes message inbox. -Get the list of messages currently present in the nodes message inbox. The messages are removed from the inbox. +The messages are removed from the inbox. ### Example ```python @@ -286,7 +284,7 @@ Name | Type | Description | Notes Send a message to another peer using the given path. -Send a message to another peer using the given path. The message can be sent either over a specified path or using a specified number of HOPS, if no path is given. +The message can be sent either over a specified path or using a specified number of HOPS, if no path is given. ### Example ```python @@ -340,8 +338,6 @@ Name | Type | Description | Notes Get size of filtered message inbox for a specific tag -Get size of filtered message inbox for a specific tag - ### Example ```python from __future__ import print_function diff --git a/docs/NetworkApi.md b/docs/NetworkApi.md index a238e4c..8bbf627 100644 --- a/docs/NetworkApi.md +++ b/docs/NetworkApi.md @@ -5,14 +5,13 @@ All URIs are relative to */* Method | HTTP request | Description ------------- | ------------- | ------------- [**price**](NetworkApi.md#price) | **GET** /api/v3/network/price | Obtains the current ticket price. +[**probability**](NetworkApi.md#probability) | **GET** /api/v3/network/probability | Gets the current minimum incoming ticket winning probability defined by the network. # **price** > TicketPriceResponse price() Obtains the current ticket price. -Obtains the current ticket price. - ### Example ```python from __future__ import print_function @@ -56,3 +55,51 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **probability** +> TicketProbabilityResponse probability() + +Gets the current minimum incoming ticket winning probability defined by the network. + +### Example +```python +from __future__ import print_function +import time +import hoprd_sdk +from hoprd_sdk.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_token +configuration = hoprd_sdk.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = hoprd_sdk.NetworkApi(hoprd_sdk.ApiClient(configuration)) + +try: + # Gets the current minimum incoming ticket winning probability defined by the network. + api_response = api_instance.probability() + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworkApi->probability: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TicketProbabilityResponse**](TicketProbabilityResponse.md) + +### Authorization + +[api_token](../README.md#api_token), [bearer_token](../README.md#bearer_token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/NodeApi.md b/docs/NodeApi.md index 9590e7d..90bc3fa 100644 --- a/docs/NodeApi.md +++ b/docs/NodeApi.md @@ -4,19 +4,74 @@ All URIs are relative to */* Method | HTTP request | Description ------------- | ------------- | ------------- +[**channel_graph**](NodeApi.md#channel_graph) | **GET** /api/v3/node/graph | Retrieve node's channel graph in DOT or JSON format. [**entry_nodes**](NodeApi.md#entry_nodes) | **GET** /api/v3/node/entryNodes | List all known entry nodes with multiaddrs and eligibility. [**info**](NodeApi.md#info) | **GET** /api/v3/node/info | Get information about this HOPR Node. [**metrics**](NodeApi.md#metrics) | **GET** /api/v3/node/metrics | Retrieve Prometheus metrics from the running node. [**peers**](NodeApi.md#peers) | **GET** /api/v3/node/peers | Lists information for `connected peers` and `announced peers`. -[**version**](NodeApi.md#version) | **GET** /api/v3/node/version | Get release version of the running node. +[**version**](NodeApi.md#version) | **GET** /api/v3/node/version | Get the release version of the running node. + +# **channel_graph** +> str channel_graph(ignore_disconnected_components=ignore_disconnected_components, ignore_non_opened_channels=ignore_non_opened_channels, raw_graph=raw_graph) + +Retrieve node's channel graph in DOT or JSON format. + +### Example +```python +from __future__ import print_function +import time +import hoprd_sdk +from hoprd_sdk.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_token +configuration = hoprd_sdk.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = hoprd_sdk.NodeApi(hoprd_sdk.ApiClient(configuration)) +ignore_disconnected_components = true # bool | If set, nodes that are not connected to this node (via open channels) will not be exported. This setting automatically implies `ignore_non_opened_channels`. (optional) +ignore_non_opened_channels = true # bool | Do not export channels that are not in the `Open` state. (optional) +raw_graph = true # bool | Export the entire graph in raw JSON format, that can be later used to load the graph into e.g. a unit test. Note that `ignore_disconnected_components` and `ignore_non_opened_channels` are ignored. (optional) + +try: + # Retrieve node's channel graph in DOT or JSON format. + api_response = api_instance.channel_graph(ignore_disconnected_components=ignore_disconnected_components, ignore_non_opened_channels=ignore_non_opened_channels, raw_graph=raw_graph) + pprint(api_response) +except ApiException as e: + print("Exception when calling NodeApi->channel_graph: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ignore_disconnected_components** | **bool**| If set, nodes that are not connected to this node (via open channels) will not be exported. This setting automatically implies `ignore_non_opened_channels`. | [optional] + **ignore_non_opened_channels** | **bool**| Do not export channels that are not in the `Open` state. | [optional] + **raw_graph** | **bool**| Export the entire graph in raw JSON format, that can be later used to load the graph into e.g. a unit test. Note that `ignore_disconnected_components` and `ignore_non_opened_channels` are ignored. | [optional] + +### Return type + +**str** + +### Authorization + +[api_token](../README.md#api_token), [bearer_token](../README.md#bearer_token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **entry_nodes** > dict(str, EntryNode) entry_nodes() List all known entry nodes with multiaddrs and eligibility. -List all known entry nodes with multiaddrs and eligibility. - ### Example ```python from __future__ import print_function @@ -65,8 +120,6 @@ This endpoint does not need any parameter. Get information about this HOPR Node. -Get information about this HOPR Node. - ### Example ```python from __future__ import print_function @@ -115,8 +168,6 @@ This endpoint does not need any parameter. Retrieve Prometheus metrics from the running node. -Retrieve Prometheus metrics from the running node. - ### Example ```python from __future__ import print_function @@ -165,7 +216,7 @@ This endpoint does not need any parameter. Lists information for `connected peers` and `announced peers`. -Lists information for `connected peers` and `announced peers`. Connected peers are nodes which are connected to the node while announced peers are nodes which have announced to the network. Optionally pass `quality` parameter to get only peers with higher or equal quality to the specified value. +Connected peers are nodes which are connected to the node while announced peers are nodes which have announced to the network. Optionally pass `quality` parameter to get only peers with higher or equal quality to the specified value. ### Example ```python @@ -217,9 +268,7 @@ Name | Type | Description | Notes # **version** > NodeVersionResponse version() -Get release version of the running node. - -Get release version of the running node. +Get the release version of the running node. ### Example ```python @@ -239,7 +288,7 @@ configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' api_instance = hoprd_sdk.NodeApi(hoprd_sdk.ApiClient(configuration)) try: - # Get release version of the running node. + # Get the release version of the running node. api_response = api_instance.version() pprint(api_response) except ApiException as e: diff --git a/docs/NodeInfoResponse.md b/docs/NodeInfoResponse.md index d267cf5..a4f192e 100644 --- a/docs/NodeInfoResponse.md +++ b/docs/NodeInfoResponse.md @@ -13,9 +13,15 @@ Name | Type | Description | Notes **hopr_node_safe** | **str** | | **hopr_node_safe_registry** | **str** | | **hopr_token** | **str** | | +**index_block_prev_checksum** | **int** | | +**indexer_block** | **int** | | +**indexer_checksum** | **str** | | +**indexer_last_log_block** | **int** | | +**indexer_last_log_checksum** | **str** | | **is_eligible** | **bool** | | **listening_address** | **list[str]** | | **network** | **str** | | +**provider** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NodeVersionResponse.md b/docs/NodeVersionResponse.md index 48046a9..cc3ddef 100644 --- a/docs/NodeVersionResponse.md +++ b/docs/NodeVersionResponse.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**api_version** | **str** | | **version** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OpenChannelBodyRequest.md b/docs/OpenChannelBodyRequest.md index b7a99ea..7c6cc10 100644 --- a/docs/OpenChannelBodyRequest.md +++ b/docs/OpenChannelBodyRequest.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **str** | Initial amount of stake in HOPR tokens. | -**peer_address** | **str** | On-chain address of the counterparty. | +**destination** | **str** | On-chain address of the counterparty. | [optional] +**peer_address** | **str** | Deprecated: PeerId of the counterparty. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PeersApi.md b/docs/PeersApi.md index 1658109..6c745a7 100644 --- a/docs/PeersApi.md +++ b/docs/PeersApi.md @@ -4,13 +4,11 @@ All URIs are relative to */* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ping_peer**](PeersApi.md#ping_peer) | **POST** /api/v3/peers/{peerId}/ping | Directly pings the given peer. -[**show_peer_info**](PeersApi.md#show_peer_info) | **GET** /api/v3/peers/{peerId} | Returns transport-related information about the given peer. +[**ping_peer**](PeersApi.md#ping_peer) | **POST** /api/v3/peers/{destination}/ping | Directly pings the given peer. +[**show_peer_info**](PeersApi.md#show_peer_info) | **GET** /api/v3/peers/{destination} | Returns transport-related information about the given peer. # **ping_peer** -> PingResponse ping_peer(peer_id) - -Directly pings the given peer. +> PingResponse ping_peer(destination) Directly pings the given peer. @@ -30,11 +28,11 @@ configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = hoprd_sdk.PeersApi(hoprd_sdk.ApiClient(configuration)) -peer_id = 'peer_id_example' # str | PeerID of the requested peer +destination = 'destination_example' # str | PeerID or address of the requested peer try: # Directly pings the given peer. - api_response = api_instance.ping_peer(peer_id) + api_response = api_instance.ping_peer(destination) pprint(api_response) except ApiException as e: print("Exception when calling PeersApi->ping_peer: %s\n" % e) @@ -44,7 +42,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **peer_id** | **str**| PeerID of the requested peer | + **destination** | **str**| PeerID or address of the requested peer | ### Return type @@ -62,11 +60,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **show_peer_info** -> NodePeerInfoResponse show_peer_info(peer_id) +> NodePeerInfoResponse show_peer_info(destination) Returns transport-related information about the given peer. -Returns transport-related information about the given peer. This includes the peer ids that the given peer has `announced` on-chain and peer ids that are actually `observed` by the transport layer. +This includes the peer ids that the given peer has `announced` on-chain and peer ids that are actually `observed` by the transport layer. ### Example ```python @@ -84,11 +82,11 @@ configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = hoprd_sdk.PeersApi(hoprd_sdk.ApiClient(configuration)) -peer_id = 'peer_id_example' # str | PeerID of the requested peer +destination = 'destination_example' # str | PeerID or address of the requested peer try: # Returns transport-related information about the given peer. - api_response = api_instance.show_peer_info(peer_id) + api_response = api_instance.show_peer_info(destination) pprint(api_response) except ApiException as e: print("Exception when calling PeersApi->show_peer_info: %s\n" % e) @@ -98,7 +96,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **peer_id** | **str**| PeerID of the requested peer | + **destination** | **str**| PeerID or address of the requested peer | ### Return type diff --git a/docs/RoutingOptions.md b/docs/RoutingOptions.md new file mode 100644 index 0000000..dab6f31 --- /dev/null +++ b/docs/RoutingOptions.md @@ -0,0 +1,8 @@ +# RoutingOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendMessageBodyRequest.md b/docs/SendMessageBodyRequest.md index 2d119cb..b2bc809 100644 --- a/docs/SendMessageBodyRequest.md +++ b/docs/SendMessageBodyRequest.md @@ -4,10 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **body** | **str** | Message to be transmitted over the network | +**destination** | **str** | The recipient HOPR PeerId or address | [optional] **hops** | **int** | | [optional] **path** | **list[str]** | | [optional] -**peer_id** | **str** | The recipient HOPR PeerId | -**tag** | **int** | The message tag used to filter messages based on application | +**peer_id** | **str** | Deprecated: PeerId of the target node | [optional] +**tag** | **int** | The message tag used to filter messages based on application, must be from range <1024,65535> | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SessionApi.md b/docs/SessionApi.md new file mode 100644 index 0000000..9ebdbcb --- /dev/null +++ b/docs/SessionApi.md @@ -0,0 +1,175 @@ +# hoprd_sdk.SessionApi + +All URIs are relative to */* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**close_client**](SessionApi.md#close_client) | **DELETE** /api/v3/session/{protocol}/{ip}/{port} | Closes an existing Session listener. +[**create_client**](SessionApi.md#create_client) | **POST** /api/v3/session/{protocol} | Creates a new client session returning the given session listening host and port over TCP or UDP. +[**list_clients**](SessionApi.md#list_clients) | **GET** /api/v3/session/{protocol} | Lists existing Session listeners for the given IP protocol. + +# **close_client** +> close_client(protocol, ip, port) + +Closes an existing Session listener. + +The listener must've been previously created and bound for the given IP protocol. Once a listener is closed, no more socket connections can be made to it. If the passed port number is 0, listeners on all ports of the given listening IP and protocol will be closed. + +### Example +```python +from __future__ import print_function +import time +import hoprd_sdk +from hoprd_sdk.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_token +configuration = hoprd_sdk.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = hoprd_sdk.SessionApi(hoprd_sdk.ApiClient(configuration)) +protocol = hoprd_sdk.IpProtocol() # IpProtocol | +ip = 'ip_example' # str | +port = 56 # int | + +try: + # Closes an existing Session listener. + api_instance.close_client(protocol, ip, port) +except ApiException as e: + print("Exception when calling SessionApi->close_client: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **protocol** | [**IpProtocol**](.md)| | + **ip** | **str**| | + **port** | **int**| | + +### Return type + +void (empty response body) + +### Authorization + +[api_token](../README.md#api_token), [bearer_token](../README.md#bearer_token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_client** +> SessionClientResponse create_client(body, protocol) + +Creates a new client session returning the given session listening host and port over TCP or UDP. + +If no listening port is given in the request, the socket will be bound to a random free port and returned in the response. Different capabilities can be configured for the session, such as data segmentation or retransmission. Once the host and port are bound, it is possible to use the socket for bidirectional read/write communication over the selected IP protocol and HOPR network routing with the given destination. The destination HOPR node forwards all the data to the given target over the selected IP protocol. Various services require different types of socket communications: - services running over UDP usually do not require data retransmission, as it is already expected that UDP does not provide these and is therefore handled at the application layer. - On the contrary, services running over TCP *almost always* expect data segmentation and retransmission capabilities, so these should be configured while creating a session that passes TCP data. + +### Example +```python +from __future__ import print_function +import time +import hoprd_sdk +from hoprd_sdk.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_token +configuration = hoprd_sdk.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = hoprd_sdk.SessionApi(hoprd_sdk.ApiClient(configuration)) +body = hoprd_sdk.SessionClientRequest() # SessionClientRequest | Creates a new client HOPR session that will start listening on a dedicated port. Once the port is bound, it is possible to use the socket for bidirectional read and write communication. +protocol = 'protocol_example' # str | IP transport protocol + +try: + # Creates a new client session returning the given session listening host and port over TCP or UDP. + api_response = api_instance.create_client(body, protocol) + pprint(api_response) +except ApiException as e: + print("Exception when calling SessionApi->create_client: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SessionClientRequest**](SessionClientRequest.md)| Creates a new client HOPR session that will start listening on a dedicated port. Once the port is bound, it is possible to use the socket for bidirectional read and write communication. | + **protocol** | **str**| IP transport protocol | + +### Return type + +[**SessionClientResponse**](SessionClientResponse.md) + +### Authorization + +[api_token](../README.md#api_token), [bearer_token](../README.md#bearer_token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_clients** +> list[SessionClientResponse] list_clients(protocol) + +Lists existing Session listeners for the given IP protocol. + +### Example +```python +from __future__ import print_function +import time +import hoprd_sdk +from hoprd_sdk.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_token +configuration = hoprd_sdk.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = hoprd_sdk.SessionApi(hoprd_sdk.ApiClient(configuration)) +protocol = 'protocol_example' # str | IP transport protocol + +try: + # Lists existing Session listeners for the given IP protocol. + api_response = api_instance.list_clients(protocol) + pprint(api_response) +except ApiException as e: + print("Exception when calling SessionApi->list_clients: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **protocol** | **str**| IP transport protocol | + +### Return type + +[**list[SessionClientResponse]**](SessionClientResponse.md) + +### Authorization + +[api_token](../README.md#api_token), [bearer_token](../README.md#bearer_token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SessionCapability.md b/docs/SessionCapability.md new file mode 100644 index 0000000..00b8176 --- /dev/null +++ b/docs/SessionCapability.md @@ -0,0 +1,8 @@ +# SessionCapability + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SessionClientRequest.md b/docs/SessionClientRequest.md new file mode 100644 index 0000000..75f7283 --- /dev/null +++ b/docs/SessionClientRequest.md @@ -0,0 +1,13 @@ +# SessionClientRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capabilities** | [**list[SessionCapability]**](SessionCapability.md) | Capabilities for the Session protocol. Defaults to `Segmentation` and `Retransmission` for TCP and nothing for UDP. | [optional] +**destination** | **str** | Peer ID of the Exit node. | +**listen_host** | **str** | Listen host (`ip:port`) for the Session socket at the Entry node. Supports also partial specification (only `ip` or only `:port`) with the respective part replaced by the node's configured default. | [optional] +**path** | [**RoutingOptions**](RoutingOptions.md) | | +**target** | [**SessionTargetSpec**](SessionTargetSpec.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SessionClientResponse.md b/docs/SessionClientResponse.md new file mode 100644 index 0000000..74d00f9 --- /dev/null +++ b/docs/SessionClientResponse.md @@ -0,0 +1,13 @@ +# SessionClientResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **str** | | +**path** | [**RoutingOptions**](RoutingOptions.md) | | +**port** | **int** | | +**protocol** | **str** | | +**target** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SessionTargetSpec.md b/docs/SessionTargetSpec.md new file mode 100644 index 0000000..94e30cf --- /dev/null +++ b/docs/SessionTargetSpec.md @@ -0,0 +1,8 @@ +# SessionTargetSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/TicketProbabilityResponse.md b/docs/TicketProbabilityResponse.md new file mode 100644 index 0000000..56379c7 --- /dev/null +++ b/docs/TicketProbabilityResponse.md @@ -0,0 +1,9 @@ +# TicketProbabilityResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**probability** | **float** | Winning probability of a ticket. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/TicketsApi.md b/docs/TicketsApi.md index cdd9977..54a56c0 100644 --- a/docs/TicketsApi.md +++ b/docs/TicketsApi.md @@ -5,6 +5,7 @@ All URIs are relative to */* Method | HTTP request | Description ------------- | ------------- | ------------- [**redeem_all_tickets**](TicketsApi.md#redeem_all_tickets) | **POST** /api/v3/tickets/redeem | Starts redeeming of all tickets in all channels. +[**reset_ticket_statistics**](TicketsApi.md#reset_ticket_statistics) | **DELETE** /api/v3/tickets/statistics | Resets the ticket metrics. [**show_all_tickets**](TicketsApi.md#show_all_tickets) | **GET** /api/v3/tickets | Endpoint is deprecated and will be removed in the future. Returns an empty array. [**show_ticket_statistics**](TicketsApi.md#show_ticket_statistics) | **GET** /api/v3/tickets/statistics | Returns current complete statistics on tickets. @@ -13,7 +14,7 @@ Method | HTTP request | Description Starts redeeming of all tickets in all channels. -Starts redeeming of all tickets in all channels. **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. +**WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. ### Example ```python @@ -57,13 +58,58 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **reset_ticket_statistics** +> reset_ticket_statistics() + +Resets the ticket metrics. + +### Example +```python +from __future__ import print_function +import time +import hoprd_sdk +from hoprd_sdk.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_token +configuration = hoprd_sdk.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = hoprd_sdk.TicketsApi(hoprd_sdk.ApiClient(configuration)) + +try: + # Resets the ticket metrics. + api_instance.reset_ticket_statistics() +except ApiException as e: + print("Exception when calling TicketsApi->reset_ticket_statistics: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[api_token](../README.md#api_token), [bearer_token](../README.md#bearer_token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **show_all_tickets** > list[ChannelTicket] show_all_tickets() Endpoint is deprecated and will be removed in the future. Returns an empty array. -Endpoint is deprecated and will be removed in the future. Returns an empty array. - ### Example ```python from __future__ import print_function @@ -112,8 +158,6 @@ This endpoint does not need any parameter. Returns current complete statistics on tickets. -Returns current complete statistics on tickets. - ### Example ```python from __future__ import print_function diff --git a/docs/WithdrawResponse.md b/docs/WithdrawResponse.md new file mode 100644 index 0000000..2036546 --- /dev/null +++ b/docs/WithdrawResponse.md @@ -0,0 +1,9 @@ +# WithdrawResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**receipt** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/hoprd_sdk/__init__.py b/hoprd_sdk/__init__.py index 1863246..1a9a19b 100644 --- a/hoprd_sdk/__init__.py +++ b/hoprd_sdk/__init__.py @@ -7,7 +7,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -24,6 +24,7 @@ from hoprd_sdk.api.network_api import NetworkApi from hoprd_sdk.api.node_api import NodeApi from hoprd_sdk.api.peers_api import PeersApi +from hoprd_sdk.api.session_api import SessionApi from hoprd_sdk.api.tickets_api import TicketsApi # import ApiClient from hoprd_sdk.api_client import ApiClient @@ -31,7 +32,7 @@ # import models into sdk package from hoprd_sdk.models.account_addresses_response import AccountAddressesResponse from hoprd_sdk.models.account_balances_response import AccountBalancesResponse -from hoprd_sdk.models.alias_peer_id_body_request import AliasPeerIdBodyRequest +from hoprd_sdk.models.alias_destination_body_request import AliasDestinationBodyRequest from hoprd_sdk.models.announced_peer import AnnouncedPeer from hoprd_sdk.models.api_error import ApiError from hoprd_sdk.models.channel_info_response import ChannelInfoResponse @@ -41,7 +42,9 @@ from hoprd_sdk.models.entry_node import EntryNode from hoprd_sdk.models.fund_body_request import FundBodyRequest from hoprd_sdk.models.get_message_body_request import GetMessageBodyRequest +from hoprd_sdk.models.graph_export_query import GraphExportQuery from hoprd_sdk.models.heartbeat_info import HeartbeatInfo +from hoprd_sdk.models.ip_protocol import IpProtocol from hoprd_sdk.models.message_pop_all_response import MessagePopAllResponse from hoprd_sdk.models.message_pop_response import MessagePopResponse from hoprd_sdk.models.node_channel import NodeChannel @@ -57,9 +60,16 @@ from hoprd_sdk.models.peer_id_response import PeerIdResponse from hoprd_sdk.models.peer_info import PeerInfo from hoprd_sdk.models.ping_response import PingResponse +from hoprd_sdk.models.routing_options import RoutingOptions from hoprd_sdk.models.send_message_body_request import SendMessageBodyRequest from hoprd_sdk.models.send_message_response import SendMessageResponse +from hoprd_sdk.models.session_capability import SessionCapability +from hoprd_sdk.models.session_client_request import SessionClientRequest +from hoprd_sdk.models.session_client_response import SessionClientResponse +from hoprd_sdk.models.session_target_spec import SessionTargetSpec from hoprd_sdk.models.size_response import SizeResponse from hoprd_sdk.models.tag_query_request import TagQueryRequest from hoprd_sdk.models.ticket_price_response import TicketPriceResponse +from hoprd_sdk.models.ticket_probability_response import TicketProbabilityResponse from hoprd_sdk.models.withdraw_body_request import WithdrawBodyRequest +from hoprd_sdk.models.withdraw_response import WithdrawResponse diff --git a/hoprd_sdk/api/__init__.py b/hoprd_sdk/api/__init__.py index 982523e..bace8bc 100644 --- a/hoprd_sdk/api/__init__.py +++ b/hoprd_sdk/api/__init__.py @@ -12,4 +12,5 @@ from hoprd_sdk.api.network_api import NetworkApi from hoprd_sdk.api.node_api import NodeApi from hoprd_sdk.api.peers_api import PeersApi +from hoprd_sdk.api.session_api import SessionApi from hoprd_sdk.api.tickets_api import TicketsApi diff --git a/hoprd_sdk/api/account_api.py b/hoprd_sdk/api/account_api.py index 5e798a3..73577e5 100644 --- a/hoprd_sdk/api/account_api.py +++ b/hoprd_sdk/api/account_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,7 +35,7 @@ def __init__(self, api_client=None): def addresses(self, **kwargs): # noqa: E501 """Get node's HOPR and native addresses. # noqa: E501 - Get node's HOPR and native addresses. HOPR address is represented by the P2P PeerId and can be used by other node owner to interact with this node. # noqa: E501 + HOPR address is represented by the P2P PeerId and can be used by other node owner to interact with this node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.addresses(async_req=True) @@ -56,7 +56,7 @@ def addresses(self, **kwargs): # noqa: E501 def addresses_with_http_info(self, **kwargs): # noqa: E501 """Get node's HOPR and native addresses. # noqa: E501 - Get node's HOPR and native addresses. HOPR address is represented by the P2P PeerId and can be used by other node owner to interact with this node. # noqa: E501 + HOPR address is represented by the P2P PeerId and can be used by other node owner to interact with this node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.addresses_with_http_info(async_req=True) @@ -122,7 +122,7 @@ def addresses_with_http_info(self, **kwargs): # noqa: E501 def balances(self, **kwargs): # noqa: E501 """Get node's and associated Safe's HOPR and native balances as the allowance for HOPR # noqa: E501 - Get node's and associated Safe's HOPR and native balances as the allowance for HOPR tokens to be drawn by HoprChannels from Safe. HOPR tokens from the Safe balance are used to fund the payment channels between this node and other nodes on the network. NATIVE balance of the Node is used to pay for the gas fees for the blockchain. # noqa: E501 + tokens to be drawn by HoprChannels from Safe. HOPR tokens from the Safe balance are used to fund the payment channels between this node and other nodes on the network. NATIVE balance of the Node is used to pay for the gas fees for the blockchain. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.balances(async_req=True) @@ -143,7 +143,7 @@ def balances(self, **kwargs): # noqa: E501 def balances_with_http_info(self, **kwargs): # noqa: E501 """Get node's and associated Safe's HOPR and native balances as the allowance for HOPR # noqa: E501 - Get node's and associated Safe's HOPR and native balances as the allowance for HOPR tokens to be drawn by HoprChannels from Safe. HOPR tokens from the Safe balance are used to fund the payment channels between this node and other nodes on the network. NATIVE balance of the Node is used to pay for the gas fees for the blockchain. # noqa: E501 + tokens to be drawn by HoprChannels from Safe. HOPR tokens from the Safe balance are used to fund the payment channels between this node and other nodes on the network. NATIVE balance of the Node is used to pay for the gas fees for the blockchain. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.balances_with_http_info(async_req=True) @@ -209,7 +209,7 @@ def balances_with_http_info(self, **kwargs): # noqa: E501 def withdraw(self, body, **kwargs): # noqa: E501 """Withdraw funds from this node to the ethereum wallet address. # noqa: E501 - Withdraw funds from this node to the ethereum wallet address. Both NATIVE or HOPR can be withdrawn using this method. # noqa: E501 + Both Native or HOPR can be withdrawn using this method. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.withdraw(body, async_req=True) @@ -217,7 +217,7 @@ def withdraw(self, body, **kwargs): # noqa: E501 :param async_req bool :param WithdrawBodyRequest body: (required) - :return: AccountBalancesResponse + :return: WithdrawResponse If the method is called asynchronously, returns the request thread. """ @@ -231,7 +231,7 @@ def withdraw(self, body, **kwargs): # noqa: E501 def withdraw_with_http_info(self, body, **kwargs): # noqa: E501 """Withdraw funds from this node to the ethereum wallet address. # noqa: E501 - Withdraw funds from this node to the ethereum wallet address. Both NATIVE or HOPR can be withdrawn using this method. # noqa: E501 + Both Native or HOPR can be withdrawn using this method. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.withdraw_with_http_info(body, async_req=True) @@ -239,7 +239,7 @@ def withdraw_with_http_info(self, body, **kwargs): # noqa: E501 :param async_req bool :param WithdrawBodyRequest body: (required) - :return: AccountBalancesResponse + :return: WithdrawResponse If the method is called asynchronously, returns the request thread. """ @@ -297,7 +297,7 @@ def withdraw_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='AccountBalancesResponse', # noqa: E501 + response_type='WithdrawResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/hoprd_sdk/api/alias_api.py b/hoprd_sdk/api/alias_api.py index 8cccccc..afe5deb 100644 --- a/hoprd_sdk/api/alias_api.py +++ b/hoprd_sdk/api/alias_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -33,9 +33,8 @@ def __init__(self, api_client=None): self.api_client = api_client def aliases(self, **kwargs): # noqa: E501 - """Get each previously set alias and its corresponding PeerId. # noqa: E501 + """(deprecated, will be removed in v3.0) Get each previously set alias and its corresponding PeerId as a hashmap. # noqa: E501 - Get each previously set alias and its corresponding PeerId. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.aliases(async_req=True) @@ -54,9 +53,8 @@ def aliases(self, **kwargs): # noqa: E501 return data def aliases_with_http_info(self, **kwargs): # noqa: E501 - """Get each previously set alias and its corresponding PeerId. # noqa: E501 + """(deprecated, will be removed in v3.0) Get each previously set alias and its corresponding PeerId as a hashmap. # noqa: E501 - Get each previously set alias and its corresponding PeerId. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.aliases_with_http_info(async_req=True) @@ -119,10 +117,94 @@ def aliases_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def clear_aliases(self, **kwargs): # noqa: E501 + """(deprecated, will be removed in v3.0) Clear all aliases. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.clear_aliases(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.clear_aliases_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.clear_aliases_with_http_info(**kwargs) # noqa: E501 + return data + + def clear_aliases_with_http_info(self, **kwargs): # noqa: E501 + """(deprecated, will be removed in v3.0) Clear all aliases. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.clear_aliases_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method clear_aliases" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_token', 'bearer_token'] # noqa: E501 + + return self.api_client.call_api( + '/api/v3/aliases', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def delete_alias(self, alias, **kwargs): # noqa: E501 - """Delete an alias. # noqa: E501 + """(deprecated, will be removed in v3.0) Delete an alias. # noqa: E501 - Delete an alias. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_alias(alias, async_req=True) @@ -142,9 +224,8 @@ def delete_alias(self, alias, **kwargs): # noqa: E501 return data def delete_alias_with_http_info(self, alias, **kwargs): # noqa: E501 - """Delete an alias. # noqa: E501 + """(deprecated, will be removed in v3.0) Delete an alias. # noqa: E501 - Delete an alias. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_alias_with_http_info(alias, async_req=True) @@ -215,9 +296,8 @@ def delete_alias_with_http_info(self, alias, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_alias(self, alias, **kwargs): # noqa: E501 - """Get alias for the PeerId (Hopr address) that have this alias assigned to it. # noqa: E501 + """(deprecated, will be removed in v3.0) Get alias for the PeerId (Hopr address) that have this alias assigned to it. # noqa: E501 - Get alias for the PeerId (Hopr address) that have this alias assigned to it. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_alias(alias, async_req=True) @@ -237,9 +317,8 @@ def get_alias(self, alias, **kwargs): # noqa: E501 return data def get_alias_with_http_info(self, alias, **kwargs): # noqa: E501 - """Get alias for the PeerId (Hopr address) that have this alias assigned to it. # noqa: E501 + """(deprecated, will be removed in v3.0) Get alias for the PeerId (Hopr address) that have this alias assigned to it. # noqa: E501 - Get alias for the PeerId (Hopr address) that have this alias assigned to it. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_alias_with_http_info(alias, async_req=True) @@ -310,16 +389,15 @@ def get_alias_with_http_info(self, alias, **kwargs): # noqa: E501 collection_formats=collection_formats) def set_alias(self, body, **kwargs): # noqa: E501 - """Set alias for a peer with a specific PeerId. # noqa: E501 + """(deprecated, will be removed in v3.0) Set alias for a peer with a specific PeerId. # noqa: E501 - Set alias for a peer with a specific PeerId. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_alias(body, async_req=True) >>> result = thread.get() :param async_req bool - :param AliasPeerIdBodyRequest body: Alias name along with the PeerId to be aliased (required) + :param AliasDestinationBodyRequest body: Alias name along with the PeerId to be aliased (required) :return: PeerIdResponse If the method is called asynchronously, returns the request thread. @@ -332,16 +410,15 @@ def set_alias(self, body, **kwargs): # noqa: E501 return data def set_alias_with_http_info(self, body, **kwargs): # noqa: E501 - """Set alias for a peer with a specific PeerId. # noqa: E501 + """(deprecated, will be removed in v3.0) Set alias for a peer with a specific PeerId. # noqa: E501 - Set alias for a peer with a specific PeerId. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_alias_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param AliasPeerIdBodyRequest body: Alias name along with the PeerId to be aliased (required) + :param AliasDestinationBodyRequest body: Alias name along with the PeerId to be aliased (required) :return: PeerIdResponse If the method is called asynchronously, returns the request thread. diff --git a/hoprd_sdk/api/channels_api.py b/hoprd_sdk/api/channels_api.py index d988236..1aa9492 100644 --- a/hoprd_sdk/api/channels_api.py +++ b/hoprd_sdk/api/channels_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,7 +35,6 @@ def __init__(self, api_client=None): def aggregate_tickets_in_channel(self, channel_id, **kwargs): # noqa: E501 """Starts aggregation of tickets in the given channel. # noqa: E501 - Starts aggregation of tickets in the given channel. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.aggregate_tickets_in_channel(channel_id, async_req=True) @@ -57,7 +56,6 @@ def aggregate_tickets_in_channel(self, channel_id, **kwargs): # noqa: E501 def aggregate_tickets_in_channel_with_http_info(self, channel_id, **kwargs): # noqa: E501 """Starts aggregation of tickets in the given channel. # noqa: E501 - Starts aggregation of tickets in the given channel. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.aggregate_tickets_in_channel_with_http_info(channel_id, async_req=True) @@ -130,7 +128,7 @@ def aggregate_tickets_in_channel_with_http_info(self, channel_id, **kwargs): # def close_channel(self, channel_id, **kwargs): # noqa: E501 """Closes the given channel. # noqa: E501 - Closes the given channel. If the channel is currently `Open`, it will transition it to `PendingToClose`. If the channels is in `PendingToClose` and the channel closure period has elapsed, it will transition it to `Closed`. # noqa: E501 + If the channel is currently `Open`, it will transition it to `PendingToClose`. If the channels is in `PendingToClose` and the channel closure period has elapsed, it will transition it to `Closed`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.close_channel(channel_id, async_req=True) @@ -152,7 +150,7 @@ def close_channel(self, channel_id, **kwargs): # noqa: E501 def close_channel_with_http_info(self, channel_id, **kwargs): # noqa: E501 """Closes the given channel. # noqa: E501 - Closes the given channel. If the channel is currently `Open`, it will transition it to `PendingToClose`. If the channels is in `PendingToClose` and the channel closure period has elapsed, it will transition it to `Closed`. # noqa: E501 + If the channel is currently `Open`, it will transition it to `PendingToClose`. If the channels is in `PendingToClose` and the channel closure period has elapsed, it will transition it to `Closed`. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.close_channel_with_http_info(channel_id, async_req=True) @@ -225,7 +223,6 @@ def close_channel_with_http_info(self, channel_id, **kwargs): # noqa: E501 def fund_channel(self, body, channel_id, **kwargs): # noqa: E501 """Funds the given channel with the given amount of HOPR tokens. # noqa: E501 - Funds the given channel with the given amount of HOPR tokens. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fund_channel(body, channel_id, async_req=True) @@ -248,7 +245,6 @@ def fund_channel(self, body, channel_id, **kwargs): # noqa: E501 def fund_channel_with_http_info(self, body, channel_id, **kwargs): # noqa: E501 """Funds the given channel with the given amount of HOPR tokens. # noqa: E501 - Funds the given channel with the given amount of HOPR tokens. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fund_channel_with_http_info(body, channel_id, async_req=True) @@ -332,7 +328,7 @@ def fund_channel_with_http_info(self, body, channel_id, **kwargs): # noqa: E501 def list_channels(self, **kwargs): # noqa: E501 """Lists channels opened to/from this node. Alternatively, it can print all # noqa: E501 - Lists channels opened to/from this node. Alternatively, it can print all the channels in the network as this node sees them. # noqa: E501 + the channels in the network as this node sees them. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_channels(async_req=True) @@ -355,7 +351,7 @@ def list_channels(self, **kwargs): # noqa: E501 def list_channels_with_http_info(self, **kwargs): # noqa: E501 """Lists channels opened to/from this node. Alternatively, it can print all # noqa: E501 - Lists channels opened to/from this node. Alternatively, it can print all the channels in the network as this node sees them. # noqa: E501 + the channels in the network as this node sees them. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_channels_with_http_info(async_req=True) @@ -427,7 +423,6 @@ def list_channels_with_http_info(self, **kwargs): # noqa: E501 def open_channel(self, body, **kwargs): # noqa: E501 """Opens a channel to the given on-chain address with the given initial stake of HOPR tokens. # noqa: E501 - Opens a channel to the given on-chain address with the given initial stake of HOPR tokens. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.open_channel(body, async_req=True) @@ -449,7 +444,6 @@ def open_channel(self, body, **kwargs): # noqa: E501 def open_channel_with_http_info(self, body, **kwargs): # noqa: E501 """Opens a channel to the given on-chain address with the given initial stake of HOPR tokens. # noqa: E501 - Opens a channel to the given on-chain address with the given initial stake of HOPR tokens. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.open_channel_with_http_info(body, async_req=True) @@ -526,7 +520,7 @@ def open_channel_with_http_info(self, body, **kwargs): # noqa: E501 def redeem_tickets_in_channel(self, channel_id, **kwargs): # noqa: E501 """Starts redeeming all tickets in the given channel. # noqa: E501 - Starts redeeming all tickets in the given channel. **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. # noqa: E501 + **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.redeem_tickets_in_channel(channel_id, async_req=True) @@ -548,7 +542,7 @@ def redeem_tickets_in_channel(self, channel_id, **kwargs): # noqa: E501 def redeem_tickets_in_channel_with_http_info(self, channel_id, **kwargs): # noqa: E501 """Starts redeeming all tickets in the given channel. # noqa: E501 - Starts redeeming all tickets in the given channel. **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. # noqa: E501 + **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.redeem_tickets_in_channel_with_http_info(channel_id, async_req=True) @@ -621,7 +615,6 @@ def redeem_tickets_in_channel_with_http_info(self, channel_id, **kwargs): # noq def show_channel(self, channel_id, **kwargs): # noqa: E501 """Returns information about the given channel. # noqa: E501 - Returns information about the given channel. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.show_channel(channel_id, async_req=True) @@ -643,7 +636,6 @@ def show_channel(self, channel_id, **kwargs): # noqa: E501 def show_channel_with_http_info(self, channel_id, **kwargs): # noqa: E501 """Returns information about the given channel. # noqa: E501 - Returns information about the given channel. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.show_channel_with_http_info(channel_id, async_req=True) @@ -716,7 +708,6 @@ def show_channel_with_http_info(self, channel_id, **kwargs): # noqa: E501 def show_channel_tickets(self, channel_id, **kwargs): # noqa: E501 """Lists all tickets for the given channel ID. # noqa: E501 - Lists all tickets for the given channel ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.show_channel_tickets(channel_id, async_req=True) @@ -738,7 +729,6 @@ def show_channel_tickets(self, channel_id, **kwargs): # noqa: E501 def show_channel_tickets_with_http_info(self, channel_id, **kwargs): # noqa: E501 """Lists all tickets for the given channel ID. # noqa: E501 - Lists all tickets for the given channel ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.show_channel_tickets_with_http_info(channel_id, async_req=True) diff --git a/hoprd_sdk/api/checks_api.py b/hoprd_sdk/api/checks_api.py index 37cfbc0..9bfa2dc 100644 --- a/hoprd_sdk/api/checks_api.py +++ b/hoprd_sdk/api/checks_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,10 +32,90 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def eligiblez(self, **kwargs): # noqa: E501 + """Check whether the node is eligible in the network. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.eligiblez(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.eligiblez_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.eligiblez_with_http_info(**kwargs) # noqa: E501 + return data + + def eligiblez_with_http_info(self, **kwargs): # noqa: E501 + """Check whether the node is eligible in the network. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.eligiblez_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method eligiblez" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/eligiblez', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def healthyz(self, **kwargs): # noqa: E501 """Check whether the node is healthy. # noqa: E501 - Check whether the node is healthy. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.healthyz(async_req=True) @@ -56,7 +136,6 @@ def healthyz(self, **kwargs): # noqa: E501 def healthyz_with_http_info(self, **kwargs): # noqa: E501 """Check whether the node is healthy. # noqa: E501 - Check whether the node is healthy. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.healthyz_with_http_info(async_req=True) @@ -118,7 +197,6 @@ def healthyz_with_http_info(self, **kwargs): # noqa: E501 def readyz(self, **kwargs): # noqa: E501 """Check whether the node is ready to accept connections. # noqa: E501 - Check whether the node is ready to accept connections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.readyz(async_req=True) @@ -139,7 +217,6 @@ def readyz(self, **kwargs): # noqa: E501 def readyz_with_http_info(self, **kwargs): # noqa: E501 """Check whether the node is ready to accept connections. # noqa: E501 - Check whether the node is ready to accept connections. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.readyz_with_http_info(async_req=True) @@ -201,7 +278,6 @@ def readyz_with_http_info(self, **kwargs): # noqa: E501 def startedz(self, **kwargs): # noqa: E501 """Check whether the node is started. # noqa: E501 - Check whether the node is started. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.startedz(async_req=True) @@ -222,7 +298,6 @@ def startedz(self, **kwargs): # noqa: E501 def startedz_with_http_info(self, **kwargs): # noqa: E501 """Check whether the node is started. # noqa: E501 - Check whether the node is started. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.startedz_with_http_info(async_req=True) diff --git a/hoprd_sdk/api/configuration_api.py b/hoprd_sdk/api/configuration_api.py index a2f1671..a780a38 100644 --- a/hoprd_sdk/api/configuration_api.py +++ b/hoprd_sdk/api/configuration_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,7 +35,6 @@ def __init__(self, api_client=None): def configuration(self, **kwargs): # noqa: E501 """Get the configuration of the running node. # noqa: E501 - Get the configuration of the running node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.configuration(async_req=True) @@ -56,7 +55,6 @@ def configuration(self, **kwargs): # noqa: E501 def configuration_with_http_info(self, **kwargs): # noqa: E501 """Get the configuration of the running node. # noqa: E501 - Get the configuration of the running node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.configuration_with_http_info(async_req=True) diff --git a/hoprd_sdk/api/messages_api.py b/hoprd_sdk/api/messages_api.py index ddadf84..5246318 100644 --- a/hoprd_sdk/api/messages_api.py +++ b/hoprd_sdk/api/messages_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,7 +35,6 @@ def __init__(self, api_client=None): def delete_messages(self, **kwargs): # noqa: E501 """Delete messages from nodes message inbox. # noqa: E501 - Delete messages from nodes message inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_messages(async_req=True) @@ -57,7 +56,6 @@ def delete_messages(self, **kwargs): # noqa: E501 def delete_messages_with_http_info(self, **kwargs): # noqa: E501 """Delete messages from nodes message inbox. # noqa: E501 - Delete messages from nodes message inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_messages_with_http_info(async_req=True) @@ -126,7 +124,7 @@ def delete_messages_with_http_info(self, **kwargs): # noqa: E501 def peek(self, body, **kwargs): # noqa: E501 """Peek the oldest message currently present in the nodes message inbox. # noqa: E501 - Peek the oldest message currently present in the nodes message inbox. The message is not removed from the inbox. # noqa: E501 + The message is not removed from the inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.peek(body, async_req=True) @@ -148,7 +146,7 @@ def peek(self, body, **kwargs): # noqa: E501 def peek_with_http_info(self, body, **kwargs): # noqa: E501 """Peek the oldest message currently present in the nodes message inbox. # noqa: E501 - Peek the oldest message currently present in the nodes message inbox. The message is not removed from the inbox. # noqa: E501 + The message is not removed from the inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.peek_with_http_info(body, async_req=True) @@ -225,7 +223,7 @@ def peek_with_http_info(self, body, **kwargs): # noqa: E501 def peek_all(self, body, **kwargs): # noqa: E501 """Peek the list of messages currently present in the nodes message inbox, filtered by tag, # noqa: E501 - Peek the list of messages currently present in the nodes message inbox, filtered by tag, and optionally by timestamp (epoch in milliseconds). The messages are not removed from the inbox. # noqa: E501 + and optionally by timestamp (epoch in milliseconds). The messages are not removed from the inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.peek_all(body, async_req=True) @@ -247,7 +245,7 @@ def peek_all(self, body, **kwargs): # noqa: E501 def peek_all_with_http_info(self, body, **kwargs): # noqa: E501 """Peek the list of messages currently present in the nodes message inbox, filtered by tag, # noqa: E501 - Peek the list of messages currently present in the nodes message inbox, filtered by tag, and optionally by timestamp (epoch in milliseconds). The messages are not removed from the inbox. # noqa: E501 + and optionally by timestamp (epoch in milliseconds). The messages are not removed from the inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.peek_all_with_http_info(body, async_req=True) @@ -324,7 +322,7 @@ def peek_all_with_http_info(self, body, **kwargs): # noqa: E501 def pop(self, body, **kwargs): # noqa: E501 """Get the oldest message currently present in the nodes message inbox. # noqa: E501 - Get the oldest message currently present in the nodes message inbox. The message is removed from the inbox. # noqa: E501 + The message is removed from the inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pop(body, async_req=True) @@ -346,7 +344,7 @@ def pop(self, body, **kwargs): # noqa: E501 def pop_with_http_info(self, body, **kwargs): # noqa: E501 """Get the oldest message currently present in the nodes message inbox. # noqa: E501 - Get the oldest message currently present in the nodes message inbox. The message is removed from the inbox. # noqa: E501 + The message is removed from the inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pop_with_http_info(body, async_req=True) @@ -423,7 +421,7 @@ def pop_with_http_info(self, body, **kwargs): # noqa: E501 def pop_all(self, body, **kwargs): # noqa: E501 """Get the list of messages currently present in the nodes message inbox. # noqa: E501 - Get the list of messages currently present in the nodes message inbox. The messages are removed from the inbox. # noqa: E501 + The messages are removed from the inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pop_all(body, async_req=True) @@ -445,7 +443,7 @@ def pop_all(self, body, **kwargs): # noqa: E501 def pop_all_with_http_info(self, body, **kwargs): # noqa: E501 """Get the list of messages currently present in the nodes message inbox. # noqa: E501 - Get the list of messages currently present in the nodes message inbox. The messages are removed from the inbox. # noqa: E501 + The messages are removed from the inbox. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.pop_all_with_http_info(body, async_req=True) @@ -522,7 +520,7 @@ def pop_all_with_http_info(self, body, **kwargs): # noqa: E501 def send_message(self, body, **kwargs): # noqa: E501 """Send a message to another peer using the given path. # noqa: E501 - Send a message to another peer using the given path. The message can be sent either over a specified path or using a specified number of HOPS, if no path is given. # noqa: E501 + The message can be sent either over a specified path or using a specified number of HOPS, if no path is given. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.send_message(body, async_req=True) @@ -544,7 +542,7 @@ def send_message(self, body, **kwargs): # noqa: E501 def send_message_with_http_info(self, body, **kwargs): # noqa: E501 """Send a message to another peer using the given path. # noqa: E501 - Send a message to another peer using the given path. The message can be sent either over a specified path or using a specified number of HOPS, if no path is given. # noqa: E501 + The message can be sent either over a specified path or using a specified number of HOPS, if no path is given. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.send_message_with_http_info(body, async_req=True) @@ -621,7 +619,6 @@ def send_message_with_http_info(self, body, **kwargs): # noqa: E501 def size(self, **kwargs): # noqa: E501 """Get size of filtered message inbox for a specific tag # noqa: E501 - Get size of filtered message inbox for a specific tag # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.size(async_req=True) @@ -643,7 +640,6 @@ def size(self, **kwargs): # noqa: E501 def size_with_http_info(self, **kwargs): # noqa: E501 """Get size of filtered message inbox for a specific tag # noqa: E501 - Get size of filtered message inbox for a specific tag # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.size_with_http_info(async_req=True) diff --git a/hoprd_sdk/api/network_api.py b/hoprd_sdk/api/network_api.py index a1f683f..901c84c 100644 --- a/hoprd_sdk/api/network_api.py +++ b/hoprd_sdk/api/network_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,7 +35,6 @@ def __init__(self, api_client=None): def price(self, **kwargs): # noqa: E501 """Obtains the current ticket price. # noqa: E501 - Obtains the current ticket price. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.price(async_req=True) @@ -56,7 +55,6 @@ def price(self, **kwargs): # noqa: E501 def price_with_http_info(self, **kwargs): # noqa: E501 """Obtains the current ticket price. # noqa: E501 - Obtains the current ticket price. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.price_with_http_info(async_req=True) @@ -118,3 +116,88 @@ def price_with_http_info(self, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def probability(self, **kwargs): # noqa: E501 + """Gets the current minimum incoming ticket winning probability defined by the network. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.probability(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: TicketProbabilityResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.probability_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.probability_with_http_info(**kwargs) # noqa: E501 + return data + + def probability_with_http_info(self, **kwargs): # noqa: E501 + """Gets the current minimum incoming ticket winning probability defined by the network. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.probability_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: TicketProbabilityResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method probability" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_token', 'bearer_token'] # noqa: E501 + + return self.api_client.call_api( + '/api/v3/network/probability', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TicketProbabilityResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/hoprd_sdk/api/node_api.py b/hoprd_sdk/api/node_api.py index 2c77cce..535f8c9 100644 --- a/hoprd_sdk/api/node_api.py +++ b/hoprd_sdk/api/node_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,10 +32,106 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def channel_graph(self, **kwargs): # noqa: E501 + """Retrieve node's channel graph in DOT or JSON format. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.channel_graph(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param bool ignore_disconnected_components: If set, nodes that are not connected to this node (via open channels) will not be exported. This setting automatically implies `ignore_non_opened_channels`. + :param bool ignore_non_opened_channels: Do not export channels that are not in the `Open` state. + :param bool raw_graph: Export the entire graph in raw JSON format, that can be later used to load the graph into e.g. a unit test. Note that `ignore_disconnected_components` and `ignore_non_opened_channels` are ignored. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.channel_graph_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.channel_graph_with_http_info(**kwargs) # noqa: E501 + return data + + def channel_graph_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve node's channel graph in DOT or JSON format. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.channel_graph_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param bool ignore_disconnected_components: If set, nodes that are not connected to this node (via open channels) will not be exported. This setting automatically implies `ignore_non_opened_channels`. + :param bool ignore_non_opened_channels: Do not export channels that are not in the `Open` state. + :param bool raw_graph: Export the entire graph in raw JSON format, that can be later used to load the graph into e.g. a unit test. Note that `ignore_disconnected_components` and `ignore_non_opened_channels` are ignored. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ignore_disconnected_components', 'ignore_non_opened_channels', 'raw_graph'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method channel_graph" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'ignore_disconnected_components' in params: + query_params.append(('ignoreDisconnectedComponents', params['ignore_disconnected_components'])) # noqa: E501 + if 'ignore_non_opened_channels' in params: + query_params.append(('ignoreNonOpenedChannels', params['ignore_non_opened_channels'])) # noqa: E501 + if 'raw_graph' in params: + query_params.append(('rawGraph', params['raw_graph'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain', 'application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_token', 'bearer_token'] # noqa: E501 + + return self.api_client.call_api( + '/api/v3/node/graph', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def entry_nodes(self, **kwargs): # noqa: E501 """List all known entry nodes with multiaddrs and eligibility. # noqa: E501 - List all known entry nodes with multiaddrs and eligibility. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.entry_nodes(async_req=True) @@ -56,7 +152,6 @@ def entry_nodes(self, **kwargs): # noqa: E501 def entry_nodes_with_http_info(self, **kwargs): # noqa: E501 """List all known entry nodes with multiaddrs and eligibility. # noqa: E501 - List all known entry nodes with multiaddrs and eligibility. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.entry_nodes_with_http_info(async_req=True) @@ -122,7 +217,6 @@ def entry_nodes_with_http_info(self, **kwargs): # noqa: E501 def info(self, **kwargs): # noqa: E501 """Get information about this HOPR Node. # noqa: E501 - Get information about this HOPR Node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.info(async_req=True) @@ -143,7 +237,6 @@ def info(self, **kwargs): # noqa: E501 def info_with_http_info(self, **kwargs): # noqa: E501 """Get information about this HOPR Node. # noqa: E501 - Get information about this HOPR Node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.info_with_http_info(async_req=True) @@ -209,7 +302,6 @@ def info_with_http_info(self, **kwargs): # noqa: E501 def metrics(self, **kwargs): # noqa: E501 """Retrieve Prometheus metrics from the running node. # noqa: E501 - Retrieve Prometheus metrics from the running node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.metrics(async_req=True) @@ -230,7 +322,6 @@ def metrics(self, **kwargs): # noqa: E501 def metrics_with_http_info(self, **kwargs): # noqa: E501 """Retrieve Prometheus metrics from the running node. # noqa: E501 - Retrieve Prometheus metrics from the running node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.metrics_with_http_info(async_req=True) @@ -296,7 +387,7 @@ def metrics_with_http_info(self, **kwargs): # noqa: E501 def peers(self, **kwargs): # noqa: E501 """Lists information for `connected peers` and `announced peers`. # noqa: E501 - Lists information for `connected peers` and `announced peers`. Connected peers are nodes which are connected to the node while announced peers are nodes which have announced to the network. Optionally pass `quality` parameter to get only peers with higher or equal quality to the specified value. # noqa: E501 + Connected peers are nodes which are connected to the node while announced peers are nodes which have announced to the network. Optionally pass `quality` parameter to get only peers with higher or equal quality to the specified value. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.peers(async_req=True) @@ -318,7 +409,7 @@ def peers(self, **kwargs): # noqa: E501 def peers_with_http_info(self, **kwargs): # noqa: E501 """Lists information for `connected peers` and `announced peers`. # noqa: E501 - Lists information for `connected peers` and `announced peers`. Connected peers are nodes which are connected to the node while announced peers are nodes which have announced to the network. Optionally pass `quality` parameter to get only peers with higher or equal quality to the specified value. # noqa: E501 + Connected peers are nodes which are connected to the node while announced peers are nodes which have announced to the network. Optionally pass `quality` parameter to get only peers with higher or equal quality to the specified value. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.peers_with_http_info(async_req=True) @@ -385,9 +476,8 @@ def peers_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def version(self, **kwargs): # noqa: E501 - """Get release version of the running node. # noqa: E501 + """Get the release version of the running node. # noqa: E501 - Get release version of the running node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.version(async_req=True) @@ -406,9 +496,8 @@ def version(self, **kwargs): # noqa: E501 return data def version_with_http_info(self, **kwargs): # noqa: E501 - """Get release version of the running node. # noqa: E501 + """Get the release version of the running node. # noqa: E501 - Get release version of the running node. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.version_with_http_info(async_req=True) diff --git a/hoprd_sdk/api/peers_api.py b/hoprd_sdk/api/peers_api.py index a772f84..b7c41de 100644 --- a/hoprd_sdk/api/peers_api.py +++ b/hoprd_sdk/api/peers_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,45 +32,43 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def ping_peer(self, peer_id, **kwargs): # noqa: E501 + def ping_peer(self, destination, **kwargs): # noqa: E501 """Directly pings the given peer. # noqa: E501 - Directly pings the given peer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.ping_peer(peer_id, async_req=True) + >>> thread = api.ping_peer(destination, async_req=True) >>> result = thread.get() :param async_req bool - :param str peer_id: PeerID of the requested peer (required) + :param str destination: PeerID or address of the requested peer (required) :return: PingResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.ping_peer_with_http_info(peer_id, **kwargs) # noqa: E501 + return self.ping_peer_with_http_info(destination, **kwargs) # noqa: E501 else: - (data) = self.ping_peer_with_http_info(peer_id, **kwargs) # noqa: E501 + (data) = self.ping_peer_with_http_info(destination, **kwargs) # noqa: E501 return data - def ping_peer_with_http_info(self, peer_id, **kwargs): # noqa: E501 + def ping_peer_with_http_info(self, destination, **kwargs): # noqa: E501 """Directly pings the given peer. # noqa: E501 - Directly pings the given peer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.ping_peer_with_http_info(peer_id, async_req=True) + >>> thread = api.ping_peer_with_http_info(destination, async_req=True) >>> result = thread.get() :param async_req bool - :param str peer_id: PeerID of the requested peer (required) + :param str destination: PeerID or address of the requested peer (required) :return: PingResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['peer_id'] # noqa: E501 + all_params = ['destination'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -85,16 +83,16 @@ def ping_peer_with_http_info(self, peer_id, **kwargs): # noqa: E501 ) params[key] = val del params['kwargs'] - # verify the required parameter 'peer_id' is set - if ('peer_id' not in params or - params['peer_id'] is None): - raise ValueError("Missing the required parameter `peer_id` when calling `ping_peer`") # noqa: E501 + # verify the required parameter 'destination' is set + if ('destination' not in params or + params['destination'] is None): + raise ValueError("Missing the required parameter `destination` when calling `ping_peer`") # noqa: E501 collection_formats = {} path_params = {} - if 'peer_id' in params: - path_params['peerId'] = params['peer_id'] # noqa: E501 + if 'destination' in params: + path_params['destination'] = params['destination'] # noqa: E501 query_params = [] @@ -112,7 +110,7 @@ def ping_peer_with_http_info(self, peer_id, **kwargs): # noqa: E501 auth_settings = ['api_token', 'bearer_token'] # noqa: E501 return self.api_client.call_api( - '/api/v3/peers/{peerId}/ping', 'POST', + '/api/v3/peers/{destination}/ping', 'POST', path_params, query_params, header_params, @@ -127,45 +125,45 @@ def ping_peer_with_http_info(self, peer_id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def show_peer_info(self, peer_id, **kwargs): # noqa: E501 + def show_peer_info(self, destination, **kwargs): # noqa: E501 """Returns transport-related information about the given peer. # noqa: E501 - Returns transport-related information about the given peer. This includes the peer ids that the given peer has `announced` on-chain and peer ids that are actually `observed` by the transport layer. # noqa: E501 + This includes the peer ids that the given peer has `announced` on-chain and peer ids that are actually `observed` by the transport layer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.show_peer_info(peer_id, async_req=True) + >>> thread = api.show_peer_info(destination, async_req=True) >>> result = thread.get() :param async_req bool - :param str peer_id: PeerID of the requested peer (required) + :param str destination: PeerID or address of the requested peer (required) :return: NodePeerInfoResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.show_peer_info_with_http_info(peer_id, **kwargs) # noqa: E501 + return self.show_peer_info_with_http_info(destination, **kwargs) # noqa: E501 else: - (data) = self.show_peer_info_with_http_info(peer_id, **kwargs) # noqa: E501 + (data) = self.show_peer_info_with_http_info(destination, **kwargs) # noqa: E501 return data - def show_peer_info_with_http_info(self, peer_id, **kwargs): # noqa: E501 + def show_peer_info_with_http_info(self, destination, **kwargs): # noqa: E501 """Returns transport-related information about the given peer. # noqa: E501 - Returns transport-related information about the given peer. This includes the peer ids that the given peer has `announced` on-chain and peer ids that are actually `observed` by the transport layer. # noqa: E501 + This includes the peer ids that the given peer has `announced` on-chain and peer ids that are actually `observed` by the transport layer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.show_peer_info_with_http_info(peer_id, async_req=True) + >>> thread = api.show_peer_info_with_http_info(destination, async_req=True) >>> result = thread.get() :param async_req bool - :param str peer_id: PeerID of the requested peer (required) + :param str destination: PeerID or address of the requested peer (required) :return: NodePeerInfoResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['peer_id'] # noqa: E501 + all_params = ['destination'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -180,16 +178,16 @@ def show_peer_info_with_http_info(self, peer_id, **kwargs): # noqa: E501 ) params[key] = val del params['kwargs'] - # verify the required parameter 'peer_id' is set - if ('peer_id' not in params or - params['peer_id'] is None): - raise ValueError("Missing the required parameter `peer_id` when calling `show_peer_info`") # noqa: E501 + # verify the required parameter 'destination' is set + if ('destination' not in params or + params['destination'] is None): + raise ValueError("Missing the required parameter `destination` when calling `show_peer_info`") # noqa: E501 collection_formats = {} path_params = {} - if 'peer_id' in params: - path_params['peerId'] = params['peer_id'] # noqa: E501 + if 'destination' in params: + path_params['destination'] = params['destination'] # noqa: E501 query_params = [] @@ -207,7 +205,7 @@ def show_peer_info_with_http_info(self, peer_id, **kwargs): # noqa: E501 auth_settings = ['api_token', 'bearer_token'] # noqa: E501 return self.api_client.call_api( - '/api/v3/peers/{peerId}', 'GET', + '/api/v3/peers/{destination}', 'GET', path_params, query_params, header_params, diff --git a/hoprd_sdk/api/session_api.py b/hoprd_sdk/api/session_api.py new file mode 100644 index 0000000..1a78da0 --- /dev/null +++ b/hoprd_sdk/api/session_api.py @@ -0,0 +1,344 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from hoprd_sdk.api_client import ApiClient + + +class SessionApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def close_client(self, protocol, ip, port, **kwargs): # noqa: E501 + """Closes an existing Session listener. # noqa: E501 + + The listener must've been previously created and bound for the given IP protocol. Once a listener is closed, no more socket connections can be made to it. If the passed port number is 0, listeners on all ports of the given listening IP and protocol will be closed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.close_client(protocol, ip, port, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param IpProtocol protocol: (required) + :param str ip: (required) + :param int port: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.close_client_with_http_info(protocol, ip, port, **kwargs) # noqa: E501 + else: + (data) = self.close_client_with_http_info(protocol, ip, port, **kwargs) # noqa: E501 + return data + + def close_client_with_http_info(self, protocol, ip, port, **kwargs): # noqa: E501 + """Closes an existing Session listener. # noqa: E501 + + The listener must've been previously created and bound for the given IP protocol. Once a listener is closed, no more socket connections can be made to it. If the passed port number is 0, listeners on all ports of the given listening IP and protocol will be closed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.close_client_with_http_info(protocol, ip, port, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param IpProtocol protocol: (required) + :param str ip: (required) + :param int port: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['protocol', 'ip', 'port'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method close_client" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'protocol' is set + if ('protocol' not in params or + params['protocol'] is None): + raise ValueError("Missing the required parameter `protocol` when calling `close_client`") # noqa: E501 + # verify the required parameter 'ip' is set + if ('ip' not in params or + params['ip'] is None): + raise ValueError("Missing the required parameter `ip` when calling `close_client`") # noqa: E501 + # verify the required parameter 'port' is set + if ('port' not in params or + params['port'] is None): + raise ValueError("Missing the required parameter `port` when calling `close_client`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'protocol' in params: + path_params['protocol'] = params['protocol'] # noqa: E501 + if 'ip' in params: + path_params['ip'] = params['ip'] # noqa: E501 + if 'port' in params: + path_params['port'] = params['port'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_token', 'bearer_token'] # noqa: E501 + + return self.api_client.call_api( + '/api/v3/session/{protocol}/{ip}/{port}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_client(self, body, protocol, **kwargs): # noqa: E501 + """Creates a new client session returning the given session listening host and port over TCP or UDP. # noqa: E501 + + If no listening port is given in the request, the socket will be bound to a random free port and returned in the response. Different capabilities can be configured for the session, such as data segmentation or retransmission. Once the host and port are bound, it is possible to use the socket for bidirectional read/write communication over the selected IP protocol and HOPR network routing with the given destination. The destination HOPR node forwards all the data to the given target over the selected IP protocol. Various services require different types of socket communications: - services running over UDP usually do not require data retransmission, as it is already expected that UDP does not provide these and is therefore handled at the application layer. - On the contrary, services running over TCP *almost always* expect data segmentation and retransmission capabilities, so these should be configured while creating a session that passes TCP data. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_client(body, protocol, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SessionClientRequest body: Creates a new client HOPR session that will start listening on a dedicated port. Once the port is bound, it is possible to use the socket for bidirectional read and write communication. (required) + :param str protocol: IP transport protocol (required) + :return: SessionClientResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_client_with_http_info(body, protocol, **kwargs) # noqa: E501 + else: + (data) = self.create_client_with_http_info(body, protocol, **kwargs) # noqa: E501 + return data + + def create_client_with_http_info(self, body, protocol, **kwargs): # noqa: E501 + """Creates a new client session returning the given session listening host and port over TCP or UDP. # noqa: E501 + + If no listening port is given in the request, the socket will be bound to a random free port and returned in the response. Different capabilities can be configured for the session, such as data segmentation or retransmission. Once the host and port are bound, it is possible to use the socket for bidirectional read/write communication over the selected IP protocol and HOPR network routing with the given destination. The destination HOPR node forwards all the data to the given target over the selected IP protocol. Various services require different types of socket communications: - services running over UDP usually do not require data retransmission, as it is already expected that UDP does not provide these and is therefore handled at the application layer. - On the contrary, services running over TCP *almost always* expect data segmentation and retransmission capabilities, so these should be configured while creating a session that passes TCP data. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_client_with_http_info(body, protocol, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SessionClientRequest body: Creates a new client HOPR session that will start listening on a dedicated port. Once the port is bound, it is possible to use the socket for bidirectional read and write communication. (required) + :param str protocol: IP transport protocol (required) + :return: SessionClientResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'protocol'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_client" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create_client`") # noqa: E501 + # verify the required parameter 'protocol' is set + if ('protocol' not in params or + params['protocol'] is None): + raise ValueError("Missing the required parameter `protocol` when calling `create_client`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'protocol' in params: + path_params['protocol'] = params['protocol'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_token', 'bearer_token'] # noqa: E501 + + return self.api_client.call_api( + '/api/v3/session/{protocol}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SessionClientResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_clients(self, protocol, **kwargs): # noqa: E501 + """Lists existing Session listeners for the given IP protocol. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_clients(protocol, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str protocol: IP transport protocol (required) + :return: list[SessionClientResponse] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_clients_with_http_info(protocol, **kwargs) # noqa: E501 + else: + (data) = self.list_clients_with_http_info(protocol, **kwargs) # noqa: E501 + return data + + def list_clients_with_http_info(self, protocol, **kwargs): # noqa: E501 + """Lists existing Session listeners for the given IP protocol. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_clients_with_http_info(protocol, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str protocol: IP transport protocol (required) + :return: list[SessionClientResponse] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['protocol'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_clients" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'protocol' is set + if ('protocol' not in params or + params['protocol'] is None): + raise ValueError("Missing the required parameter `protocol` when calling `list_clients`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'protocol' in params: + path_params['protocol'] = params['protocol'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_token', 'bearer_token'] # noqa: E501 + + return self.api_client.call_api( + '/api/v3/session/{protocol}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SessionClientResponse]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/hoprd_sdk/api/tickets_api.py b/hoprd_sdk/api/tickets_api.py index 3b76845..7599d14 100644 --- a/hoprd_sdk/api/tickets_api.py +++ b/hoprd_sdk/api/tickets_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,7 +35,7 @@ def __init__(self, api_client=None): def redeem_all_tickets(self, **kwargs): # noqa: E501 """Starts redeeming of all tickets in all channels. # noqa: E501 - Starts redeeming of all tickets in all channels. **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. # noqa: E501 + **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.redeem_all_tickets(async_req=True) @@ -56,7 +56,7 @@ def redeem_all_tickets(self, **kwargs): # noqa: E501 def redeem_all_tickets_with_http_info(self, **kwargs): # noqa: E501 """Starts redeeming of all tickets in all channels. # noqa: E501 - Starts redeeming of all tickets in all channels. **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. # noqa: E501 + **WARNING:** this should almost **never** be used as it can issue a large number of on-chain transactions. The tickets should almost always be aggregated first. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.redeem_all_tickets_with_http_info(async_req=True) @@ -119,10 +119,94 @@ def redeem_all_tickets_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def reset_ticket_statistics(self, **kwargs): # noqa: E501 + """Resets the ticket metrics. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reset_ticket_statistics(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.reset_ticket_statistics_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.reset_ticket_statistics_with_http_info(**kwargs) # noqa: E501 + return data + + def reset_ticket_statistics_with_http_info(self, **kwargs): # noqa: E501 + """Resets the ticket metrics. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reset_ticket_statistics_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method reset_ticket_statistics" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_token', 'bearer_token'] # noqa: E501 + + return self.api_client.call_api( + '/api/v3/tickets/statistics', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def show_all_tickets(self, **kwargs): # noqa: E501 """Endpoint is deprecated and will be removed in the future. Returns an empty array. # noqa: E501 - Endpoint is deprecated and will be removed in the future. Returns an empty array. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.show_all_tickets(async_req=True) @@ -143,7 +227,6 @@ def show_all_tickets(self, **kwargs): # noqa: E501 def show_all_tickets_with_http_info(self, **kwargs): # noqa: E501 """Endpoint is deprecated and will be removed in the future. Returns an empty array. # noqa: E501 - Endpoint is deprecated and will be removed in the future. Returns an empty array. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.show_all_tickets_with_http_info(async_req=True) @@ -209,7 +292,6 @@ def show_all_tickets_with_http_info(self, **kwargs): # noqa: E501 def show_ticket_statistics(self, **kwargs): # noqa: E501 """Returns current complete statistics on tickets. # noqa: E501 - Returns current complete statistics on tickets. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.show_ticket_statistics(async_req=True) @@ -230,7 +312,6 @@ def show_ticket_statistics(self, **kwargs): # noqa: E501 def show_ticket_statistics_with_http_info(self, **kwargs): # noqa: E501 """Returns current complete statistics on tickets. # noqa: E501 - Returns current complete statistics on tickets. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.show_ticket_statistics_with_http_info(async_req=True) diff --git a/hoprd_sdk/api_client.py b/hoprd_sdk/api_client.py index e022f93..23aa52e 100644 --- a/hoprd_sdk/api_client.py +++ b/hoprd_sdk/api_client.py @@ -4,7 +4,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -73,7 +73,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/2.1.0/python' + self.user_agent = 'Swagger-Codegen/2.2.0-rc.1/python' def __enter__(self): return self diff --git a/hoprd_sdk/api_client.py.orig b/hoprd_sdk/api_client.py.orig index c2ddfa9..6db1cd6 100644 --- a/hoprd_sdk/api_client.py.orig +++ b/hoprd_sdk/api_client.py.orig @@ -4,7 +4,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -72,7 +72,7 @@ class ApiClient(object): self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/2.1.0/python' + self.user_agent = 'Swagger-Codegen/2.2.0-rc.1/python' def __del__(self): self.pool.close() diff --git a/hoprd_sdk/configuration.py b/hoprd_sdk/configuration.py index 7cf516c..a5bcc7d 100644 --- a/hoprd_sdk/configuration.py +++ b/hoprd_sdk/configuration.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -249,6 +249,6 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 3.1.0\n"\ - "SDK Package Version: 2.1.0".\ + "Version of the API: 3.10.0\n"\ + "SDK Package Version: 2.2.0-rc.1".\ format(env=sys.platform, pyversion=sys.version) diff --git a/hoprd_sdk/models/__init__.py b/hoprd_sdk/models/__init__.py index 1c6c3fb..4b46bf3 100644 --- a/hoprd_sdk/models/__init__.py +++ b/hoprd_sdk/models/__init__.py @@ -6,7 +6,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,7 +16,7 @@ # import models into model package from hoprd_sdk.models.account_addresses_response import AccountAddressesResponse from hoprd_sdk.models.account_balances_response import AccountBalancesResponse -from hoprd_sdk.models.alias_peer_id_body_request import AliasPeerIdBodyRequest +from hoprd_sdk.models.alias_destination_body_request import AliasDestinationBodyRequest from hoprd_sdk.models.announced_peer import AnnouncedPeer from hoprd_sdk.models.api_error import ApiError from hoprd_sdk.models.channel_info_response import ChannelInfoResponse @@ -26,7 +26,9 @@ from hoprd_sdk.models.entry_node import EntryNode from hoprd_sdk.models.fund_body_request import FundBodyRequest from hoprd_sdk.models.get_message_body_request import GetMessageBodyRequest +from hoprd_sdk.models.graph_export_query import GraphExportQuery from hoprd_sdk.models.heartbeat_info import HeartbeatInfo +from hoprd_sdk.models.ip_protocol import IpProtocol from hoprd_sdk.models.message_pop_all_response import MessagePopAllResponse from hoprd_sdk.models.message_pop_response import MessagePopResponse from hoprd_sdk.models.node_channel import NodeChannel @@ -42,9 +44,16 @@ from hoprd_sdk.models.peer_id_response import PeerIdResponse from hoprd_sdk.models.peer_info import PeerInfo from hoprd_sdk.models.ping_response import PingResponse +from hoprd_sdk.models.routing_options import RoutingOptions from hoprd_sdk.models.send_message_body_request import SendMessageBodyRequest from hoprd_sdk.models.send_message_response import SendMessageResponse +from hoprd_sdk.models.session_capability import SessionCapability +from hoprd_sdk.models.session_client_request import SessionClientRequest +from hoprd_sdk.models.session_client_response import SessionClientResponse +from hoprd_sdk.models.session_target_spec import SessionTargetSpec from hoprd_sdk.models.size_response import SizeResponse from hoprd_sdk.models.tag_query_request import TagQueryRequest from hoprd_sdk.models.ticket_price_response import TicketPriceResponse +from hoprd_sdk.models.ticket_probability_response import TicketProbabilityResponse from hoprd_sdk.models.withdraw_body_request import WithdrawBodyRequest +from hoprd_sdk.models.withdraw_response import WithdrawResponse diff --git a/hoprd_sdk/models/account_addresses_response.py b/hoprd_sdk/models/account_addresses_response.py index a442a33..1507d9c 100644 --- a/hoprd_sdk/models/account_addresses_response.py +++ b/hoprd_sdk/models/account_addresses_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/account_balances_response.py b/hoprd_sdk/models/account_balances_response.py index 360d16c..79597ae 100644 --- a/hoprd_sdk/models/account_balances_response.py +++ b/hoprd_sdk/models/account_balances_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/alias_peer_id_body_request.py b/hoprd_sdk/models/alias_destination_body_request.py similarity index 62% rename from hoprd_sdk/models/alias_peer_id_body_request.py rename to hoprd_sdk/models/alias_destination_body_request.py index 717a945..b6b0f58 100644 --- a/hoprd_sdk/models/alias_peer_id_body_request.py +++ b/hoprd_sdk/models/alias_destination_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import six -class AliasPeerIdBodyRequest(object): +class AliasDestinationBodyRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -29,38 +29,44 @@ class AliasPeerIdBodyRequest(object): """ swagger_types = { 'alias': 'str', + 'destination': 'str', 'peer_id': 'str' } attribute_map = { 'alias': 'alias', + 'destination': 'destination', 'peer_id': 'peerId' } - def __init__(self, alias=None, peer_id=None): # noqa: E501 - """AliasPeerIdBodyRequest - a model defined in Swagger""" # noqa: E501 + def __init__(self, alias=None, destination=None, peer_id=None): # noqa: E501 + """AliasDestinationBodyRequest - a model defined in Swagger""" # noqa: E501 self._alias = None + self._destination = None self._peer_id = None self.discriminator = None self.alias = alias - self.peer_id = peer_id + if destination is not None: + self.destination = destination + if peer_id is not None: + self.peer_id = peer_id @property def alias(self): - """Gets the alias of this AliasPeerIdBodyRequest. # noqa: E501 + """Gets the alias of this AliasDestinationBodyRequest. # noqa: E501 - :return: The alias of this AliasPeerIdBodyRequest. # noqa: E501 + :return: The alias of this AliasDestinationBodyRequest. # noqa: E501 :rtype: str """ return self._alias @alias.setter def alias(self, alias): - """Sets the alias of this AliasPeerIdBodyRequest. + """Sets the alias of this AliasDestinationBodyRequest. - :param alias: The alias of this AliasPeerIdBodyRequest. # noqa: E501 + :param alias: The alias of this AliasDestinationBodyRequest. # noqa: E501 :type: str """ if alias is None: @@ -68,26 +74,45 @@ def alias(self, alias): self._alias = alias + @property + def destination(self): + """Gets the destination of this AliasDestinationBodyRequest. # noqa: E501 + + + :return: The destination of this AliasDestinationBodyRequest. # noqa: E501 + :rtype: str + """ + return self._destination + + @destination.setter + def destination(self, destination): + """Sets the destination of this AliasDestinationBodyRequest. + + + :param destination: The destination of this AliasDestinationBodyRequest. # noqa: E501 + :type: str + """ + + self._destination = destination + @property def peer_id(self): - """Gets the peer_id of this AliasPeerIdBodyRequest. # noqa: E501 + """Gets the peer_id of this AliasDestinationBodyRequest. # noqa: E501 - :return: The peer_id of this AliasPeerIdBodyRequest. # noqa: E501 + :return: The peer_id of this AliasDestinationBodyRequest. # noqa: E501 :rtype: str """ return self._peer_id @peer_id.setter def peer_id(self, peer_id): - """Sets the peer_id of this AliasPeerIdBodyRequest. + """Sets the peer_id of this AliasDestinationBodyRequest. - :param peer_id: The peer_id of this AliasPeerIdBodyRequest. # noqa: E501 + :param peer_id: The peer_id of this AliasDestinationBodyRequest. # noqa: E501 :type: str """ - if peer_id is None: - raise ValueError("Invalid value for `peer_id`, must not be `None`") # noqa: E501 self._peer_id = peer_id @@ -112,7 +137,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(AliasPeerIdBodyRequest, dict): + if issubclass(AliasDestinationBodyRequest, dict): for key, value in self.items(): result[key] = value @@ -128,7 +153,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, AliasPeerIdBodyRequest): + if not isinstance(other, AliasDestinationBodyRequest): return False return self.__dict__ == other.__dict__ diff --git a/hoprd_sdk/models/announced_peer.py b/hoprd_sdk/models/announced_peer.py index de0f284..4148165 100644 --- a/hoprd_sdk/models/announced_peer.py +++ b/hoprd_sdk/models/announced_peer.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/api_error.py b/hoprd_sdk/models/api_error.py index 3fa19ec..618a1e4 100644 --- a/hoprd_sdk/models/api_error.py +++ b/hoprd_sdk/models/api_error.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/channel_info_response.py b/hoprd_sdk/models/channel_info_response.py index 81ff831..b7942ea 100644 --- a/hoprd_sdk/models/channel_info_response.py +++ b/hoprd_sdk/models/channel_info_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/channel_ticket.py b/hoprd_sdk/models/channel_ticket.py index 6b13942..93ca2c3 100644 --- a/hoprd_sdk/models/channel_ticket.py +++ b/hoprd_sdk/models/channel_ticket.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/channels_query_request.py b/hoprd_sdk/models/channels_query_request.py index 4d0fb97..3344025 100644 --- a/hoprd_sdk/models/channels_query_request.py +++ b/hoprd_sdk/models/channels_query_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/close_channel_response.py b/hoprd_sdk/models/close_channel_response.py index 7e3c9ad..c8170f2 100644 --- a/hoprd_sdk/models/close_channel_response.py +++ b/hoprd_sdk/models/close_channel_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/entry_node.py b/hoprd_sdk/models/entry_node.py index 26d8cf1..adeb019 100644 --- a/hoprd_sdk/models/entry_node.py +++ b/hoprd_sdk/models/entry_node.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/fund_body_request.py b/hoprd_sdk/models/fund_body_request.py index f775447..844b0b8 100644 --- a/hoprd_sdk/models/fund_body_request.py +++ b/hoprd_sdk/models/fund_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/get_message_body_request.py b/hoprd_sdk/models/get_message_body_request.py index f1359e2..ed8f9ab 100644 --- a/hoprd_sdk/models/get_message_body_request.py +++ b/hoprd_sdk/models/get_message_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/graph_export_query.py b/hoprd_sdk/models/graph_export_query.py new file mode 100644 index 0000000..97b36c6 --- /dev/null +++ b/hoprd_sdk/models/graph_export_query.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class GraphExportQuery(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'ignore_disconnected_components': 'bool', + 'ignore_non_opened_channels': 'bool', + 'raw_graph': 'bool' + } + + attribute_map = { + 'ignore_disconnected_components': 'ignoreDisconnectedComponents', + 'ignore_non_opened_channels': 'ignoreNonOpenedChannels', + 'raw_graph': 'rawGraph' + } + + def __init__(self, ignore_disconnected_components=False, ignore_non_opened_channels=False, raw_graph=False): # noqa: E501 + """GraphExportQuery - a model defined in Swagger""" # noqa: E501 + self._ignore_disconnected_components = None + self._ignore_non_opened_channels = None + self._raw_graph = None + self.discriminator = None + if ignore_disconnected_components is not None: + self.ignore_disconnected_components = ignore_disconnected_components + if ignore_non_opened_channels is not None: + self.ignore_non_opened_channels = ignore_non_opened_channels + if raw_graph is not None: + self.raw_graph = raw_graph + + @property + def ignore_disconnected_components(self): + """Gets the ignore_disconnected_components of this GraphExportQuery. # noqa: E501 + + If set, nodes that are not connected to this node (via open channels) will not be exported. This setting automatically implies `ignore_non_opened_channels`. # noqa: E501 + + :return: The ignore_disconnected_components of this GraphExportQuery. # noqa: E501 + :rtype: bool + """ + return self._ignore_disconnected_components + + @ignore_disconnected_components.setter + def ignore_disconnected_components(self, ignore_disconnected_components): + """Sets the ignore_disconnected_components of this GraphExportQuery. + + If set, nodes that are not connected to this node (via open channels) will not be exported. This setting automatically implies `ignore_non_opened_channels`. # noqa: E501 + + :param ignore_disconnected_components: The ignore_disconnected_components of this GraphExportQuery. # noqa: E501 + :type: bool + """ + + self._ignore_disconnected_components = ignore_disconnected_components + + @property + def ignore_non_opened_channels(self): + """Gets the ignore_non_opened_channels of this GraphExportQuery. # noqa: E501 + + Do not export channels that are not in the `Open` state. # noqa: E501 + + :return: The ignore_non_opened_channels of this GraphExportQuery. # noqa: E501 + :rtype: bool + """ + return self._ignore_non_opened_channels + + @ignore_non_opened_channels.setter + def ignore_non_opened_channels(self, ignore_non_opened_channels): + """Sets the ignore_non_opened_channels of this GraphExportQuery. + + Do not export channels that are not in the `Open` state. # noqa: E501 + + :param ignore_non_opened_channels: The ignore_non_opened_channels of this GraphExportQuery. # noqa: E501 + :type: bool + """ + + self._ignore_non_opened_channels = ignore_non_opened_channels + + @property + def raw_graph(self): + """Gets the raw_graph of this GraphExportQuery. # noqa: E501 + + Export the entire graph in raw JSON format, that can be later used to load the graph into e.g. a unit test. Note that `ignore_disconnected_components` and `ignore_non_opened_channels` are ignored. # noqa: E501 + + :return: The raw_graph of this GraphExportQuery. # noqa: E501 + :rtype: bool + """ + return self._raw_graph + + @raw_graph.setter + def raw_graph(self, raw_graph): + """Sets the raw_graph of this GraphExportQuery. + + Export the entire graph in raw JSON format, that can be later used to load the graph into e.g. a unit test. Note that `ignore_disconnected_components` and `ignore_non_opened_channels` are ignored. # noqa: E501 + + :param raw_graph: The raw_graph of this GraphExportQuery. # noqa: E501 + :type: bool + """ + + self._raw_graph = raw_graph + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GraphExportQuery, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GraphExportQuery): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/models/heartbeat_info.py b/hoprd_sdk/models/heartbeat_info.py index 4f3f2e5..7d0c5b2 100644 --- a/hoprd_sdk/models/heartbeat_info.py +++ b/hoprd_sdk/models/heartbeat_info.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/ip_protocol.py b/hoprd_sdk/models/ip_protocol.py new file mode 100644 index 0000000..c00f4c6 --- /dev/null +++ b/hoprd_sdk/models/ip_protocol.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class IpProtocol(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + TCP = "tcp" + UDP = "udp" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """IpProtocol - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IpProtocol, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IpProtocol): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/models/message_pop_all_response.py b/hoprd_sdk/models/message_pop_all_response.py index f87171b..d9bc4dc 100644 --- a/hoprd_sdk/models/message_pop_all_response.py +++ b/hoprd_sdk/models/message_pop_all_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/message_pop_response.py b/hoprd_sdk/models/message_pop_response.py index e5c237d..0df72d3 100644 --- a/hoprd_sdk/models/message_pop_response.py +++ b/hoprd_sdk/models/message_pop_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/node_channel.py b/hoprd_sdk/models/node_channel.py index 1563487..5886f8b 100644 --- a/hoprd_sdk/models/node_channel.py +++ b/hoprd_sdk/models/node_channel.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/node_channels_response.py b/hoprd_sdk/models/node_channels_response.py index da2021b..f047b31 100644 --- a/hoprd_sdk/models/node_channels_response.py +++ b/hoprd_sdk/models/node_channels_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/node_info_response.py b/hoprd_sdk/models/node_info_response.py index b442329..f236a7a 100644 --- a/hoprd_sdk/models/node_info_response.py +++ b/hoprd_sdk/models/node_info_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -38,9 +38,15 @@ class NodeInfoResponse(object): 'hopr_node_safe': 'str', 'hopr_node_safe_registry': 'str', 'hopr_token': 'str', + 'index_block_prev_checksum': 'int', + 'indexer_block': 'int', + 'indexer_checksum': 'str', + 'indexer_last_log_block': 'int', + 'indexer_last_log_checksum': 'str', 'is_eligible': 'bool', 'listening_address': 'list[str]', - 'network': 'str' + 'network': 'str', + 'provider': 'str' } attribute_map = { @@ -54,12 +60,18 @@ class NodeInfoResponse(object): 'hopr_node_safe': 'hoprNodeSafe', 'hopr_node_safe_registry': 'hoprNodeSafeRegistry', 'hopr_token': 'hoprToken', + 'index_block_prev_checksum': 'indexBlockPrevChecksum', + 'indexer_block': 'indexerBlock', + 'indexer_checksum': 'indexerChecksum', + 'indexer_last_log_block': 'indexerLastLogBlock', + 'indexer_last_log_checksum': 'indexerLastLogChecksum', 'is_eligible': 'isEligible', 'listening_address': 'listeningAddress', - 'network': 'network' + 'network': 'network', + 'provider': 'provider' } - def __init__(self, announced_address=None, chain=None, channel_closure_period=None, connectivity_status=None, hopr_channels=None, hopr_management_module=None, hopr_network_registry=None, hopr_node_safe=None, hopr_node_safe_registry=None, hopr_token=None, is_eligible=None, listening_address=None, network=None): # noqa: E501 + def __init__(self, announced_address=None, chain=None, channel_closure_period=None, connectivity_status=None, hopr_channels=None, hopr_management_module=None, hopr_network_registry=None, hopr_node_safe=None, hopr_node_safe_registry=None, hopr_token=None, index_block_prev_checksum=None, indexer_block=None, indexer_checksum=None, indexer_last_log_block=None, indexer_last_log_checksum=None, is_eligible=None, listening_address=None, network=None, provider=None): # noqa: E501 """NodeInfoResponse - a model defined in Swagger""" # noqa: E501 self._announced_address = None self._chain = None @@ -71,9 +83,15 @@ def __init__(self, announced_address=None, chain=None, channel_closure_period=No self._hopr_node_safe = None self._hopr_node_safe_registry = None self._hopr_token = None + self._index_block_prev_checksum = None + self._indexer_block = None + self._indexer_checksum = None + self._indexer_last_log_block = None + self._indexer_last_log_checksum = None self._is_eligible = None self._listening_address = None self._network = None + self._provider = None self.discriminator = None self.announced_address = announced_address self.chain = chain @@ -85,9 +103,15 @@ def __init__(self, announced_address=None, chain=None, channel_closure_period=No self.hopr_node_safe = hopr_node_safe self.hopr_node_safe_registry = hopr_node_safe_registry self.hopr_token = hopr_token + self.index_block_prev_checksum = index_block_prev_checksum + self.indexer_block = indexer_block + self.indexer_checksum = indexer_checksum + self.indexer_last_log_block = indexer_last_log_block + self.indexer_last_log_checksum = indexer_last_log_checksum self.is_eligible = is_eligible self.listening_address = listening_address self.network = network + self.provider = provider @property def announced_address(self): @@ -321,6 +345,121 @@ def hopr_token(self, hopr_token): self._hopr_token = hopr_token + @property + def index_block_prev_checksum(self): + """Gets the index_block_prev_checksum of this NodeInfoResponse. # noqa: E501 + + + :return: The index_block_prev_checksum of this NodeInfoResponse. # noqa: E501 + :rtype: int + """ + return self._index_block_prev_checksum + + @index_block_prev_checksum.setter + def index_block_prev_checksum(self, index_block_prev_checksum): + """Sets the index_block_prev_checksum of this NodeInfoResponse. + + + :param index_block_prev_checksum: The index_block_prev_checksum of this NodeInfoResponse. # noqa: E501 + :type: int + """ + if index_block_prev_checksum is None: + raise ValueError("Invalid value for `index_block_prev_checksum`, must not be `None`") # noqa: E501 + + self._index_block_prev_checksum = index_block_prev_checksum + + @property + def indexer_block(self): + """Gets the indexer_block of this NodeInfoResponse. # noqa: E501 + + + :return: The indexer_block of this NodeInfoResponse. # noqa: E501 + :rtype: int + """ + return self._indexer_block + + @indexer_block.setter + def indexer_block(self, indexer_block): + """Sets the indexer_block of this NodeInfoResponse. + + + :param indexer_block: The indexer_block of this NodeInfoResponse. # noqa: E501 + :type: int + """ + if indexer_block is None: + raise ValueError("Invalid value for `indexer_block`, must not be `None`") # noqa: E501 + + self._indexer_block = indexer_block + + @property + def indexer_checksum(self): + """Gets the indexer_checksum of this NodeInfoResponse. # noqa: E501 + + + :return: The indexer_checksum of this NodeInfoResponse. # noqa: E501 + :rtype: str + """ + return self._indexer_checksum + + @indexer_checksum.setter + def indexer_checksum(self, indexer_checksum): + """Sets the indexer_checksum of this NodeInfoResponse. + + + :param indexer_checksum: The indexer_checksum of this NodeInfoResponse. # noqa: E501 + :type: str + """ + if indexer_checksum is None: + raise ValueError("Invalid value for `indexer_checksum`, must not be `None`") # noqa: E501 + + self._indexer_checksum = indexer_checksum + + @property + def indexer_last_log_block(self): + """Gets the indexer_last_log_block of this NodeInfoResponse. # noqa: E501 + + + :return: The indexer_last_log_block of this NodeInfoResponse. # noqa: E501 + :rtype: int + """ + return self._indexer_last_log_block + + @indexer_last_log_block.setter + def indexer_last_log_block(self, indexer_last_log_block): + """Sets the indexer_last_log_block of this NodeInfoResponse. + + + :param indexer_last_log_block: The indexer_last_log_block of this NodeInfoResponse. # noqa: E501 + :type: int + """ + if indexer_last_log_block is None: + raise ValueError("Invalid value for `indexer_last_log_block`, must not be `None`") # noqa: E501 + + self._indexer_last_log_block = indexer_last_log_block + + @property + def indexer_last_log_checksum(self): + """Gets the indexer_last_log_checksum of this NodeInfoResponse. # noqa: E501 + + + :return: The indexer_last_log_checksum of this NodeInfoResponse. # noqa: E501 + :rtype: str + """ + return self._indexer_last_log_checksum + + @indexer_last_log_checksum.setter + def indexer_last_log_checksum(self, indexer_last_log_checksum): + """Sets the indexer_last_log_checksum of this NodeInfoResponse. + + + :param indexer_last_log_checksum: The indexer_last_log_checksum of this NodeInfoResponse. # noqa: E501 + :type: str + """ + if indexer_last_log_checksum is None: + raise ValueError("Invalid value for `indexer_last_log_checksum`, must not be `None`") # noqa: E501 + + self._indexer_last_log_checksum = indexer_last_log_checksum + @property def is_eligible(self): """Gets the is_eligible of this NodeInfoResponse. # noqa: E501 @@ -390,6 +529,29 @@ def network(self, network): self._network = network + @property + def provider(self): + """Gets the provider of this NodeInfoResponse. # noqa: E501 + + + :return: The provider of this NodeInfoResponse. # noqa: E501 + :rtype: str + """ + return self._provider + + @provider.setter + def provider(self, provider): + """Sets the provider of this NodeInfoResponse. + + + :param provider: The provider of this NodeInfoResponse. # noqa: E501 + :type: str + """ + if provider is None: + raise ValueError("Invalid value for `provider`, must not be `None`") # noqa: E501 + + self._provider = provider + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/hoprd_sdk/models/node_peer_info_response.py b/hoprd_sdk/models/node_peer_info_response.py index e4674eb..6b4295a 100644 --- a/hoprd_sdk/models/node_peer_info_response.py +++ b/hoprd_sdk/models/node_peer_info_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/node_peers_query_request.py b/hoprd_sdk/models/node_peers_query_request.py index 7423cf3..26a7f70 100644 --- a/hoprd_sdk/models/node_peers_query_request.py +++ b/hoprd_sdk/models/node_peers_query_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/node_peers_response.py b/hoprd_sdk/models/node_peers_response.py index 70f5c7b..71fe886 100644 --- a/hoprd_sdk/models/node_peers_response.py +++ b/hoprd_sdk/models/node_peers_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/node_ticket_statistics_response.py b/hoprd_sdk/models/node_ticket_statistics_response.py index d1941d5..f998653 100644 --- a/hoprd_sdk/models/node_ticket_statistics_response.py +++ b/hoprd_sdk/models/node_ticket_statistics_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/node_version_response.py b/hoprd_sdk/models/node_version_response.py index 7961169..f2a2e31 100644 --- a/hoprd_sdk/models/node_version_response.py +++ b/hoprd_sdk/models/node_version_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,19 +28,46 @@ class NodeVersionResponse(object): and the value is json key in definition. """ swagger_types = { + 'api_version': 'str', 'version': 'str' } attribute_map = { + 'api_version': 'apiVersion', 'version': 'version' } - def __init__(self, version=None): # noqa: E501 + def __init__(self, api_version=None, version=None): # noqa: E501 """NodeVersionResponse - a model defined in Swagger""" # noqa: E501 + self._api_version = None self._version = None self.discriminator = None + self.api_version = api_version self.version = version + @property + def api_version(self): + """Gets the api_version of this NodeVersionResponse. # noqa: E501 + + + :return: The api_version of this NodeVersionResponse. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this NodeVersionResponse. + + + :param api_version: The api_version of this NodeVersionResponse. # noqa: E501 + :type: str + """ + if api_version is None: + raise ValueError("Invalid value for `api_version`, must not be `None`") # noqa: E501 + + self._api_version = api_version + @property def version(self): """Gets the version of this NodeVersionResponse. # noqa: E501 diff --git a/hoprd_sdk/models/open_channel_body_request.py b/hoprd_sdk/models/open_channel_body_request.py index 2a0a4f8..bc6f2b0 100644 --- a/hoprd_sdk/models/open_channel_body_request.py +++ b/hoprd_sdk/models/open_channel_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -29,21 +29,27 @@ class OpenChannelBodyRequest(object): """ swagger_types = { 'amount': 'str', + 'destination': 'str', 'peer_address': 'str' } attribute_map = { 'amount': 'amount', + 'destination': 'destination', 'peer_address': 'peerAddress' } - def __init__(self, amount=None, peer_address=None): # noqa: E501 + def __init__(self, amount=None, destination=None, peer_address=None): # noqa: E501 """OpenChannelBodyRequest - a model defined in Swagger""" # noqa: E501 self._amount = None + self._destination = None self._peer_address = None self.discriminator = None self.amount = amount - self.peer_address = peer_address + if destination is not None: + self.destination = destination + if peer_address is not None: + self.peer_address = peer_address @property def amount(self): @@ -70,11 +76,34 @@ def amount(self, amount): self._amount = amount + @property + def destination(self): + """Gets the destination of this OpenChannelBodyRequest. # noqa: E501 + + On-chain address of the counterparty. # noqa: E501 + + :return: The destination of this OpenChannelBodyRequest. # noqa: E501 + :rtype: str + """ + return self._destination + + @destination.setter + def destination(self, destination): + """Sets the destination of this OpenChannelBodyRequest. + + On-chain address of the counterparty. # noqa: E501 + + :param destination: The destination of this OpenChannelBodyRequest. # noqa: E501 + :type: str + """ + + self._destination = destination + @property def peer_address(self): """Gets the peer_address of this OpenChannelBodyRequest. # noqa: E501 - On-chain address of the counterparty. # noqa: E501 + Deprecated: PeerId of the counterparty. # noqa: E501 :return: The peer_address of this OpenChannelBodyRequest. # noqa: E501 :rtype: str @@ -85,13 +114,11 @@ def peer_address(self): def peer_address(self, peer_address): """Sets the peer_address of this OpenChannelBodyRequest. - On-chain address of the counterparty. # noqa: E501 + Deprecated: PeerId of the counterparty. # noqa: E501 :param peer_address: The peer_address of this OpenChannelBodyRequest. # noqa: E501 :type: str """ - if peer_address is None: - raise ValueError("Invalid value for `peer_address`, must not be `None`") # noqa: E501 self._peer_address = peer_address diff --git a/hoprd_sdk/models/open_channel_response.py b/hoprd_sdk/models/open_channel_response.py index bfd06e8..9dcee4f 100644 --- a/hoprd_sdk/models/open_channel_response.py +++ b/hoprd_sdk/models/open_channel_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/peer_id_response.py b/hoprd_sdk/models/peer_id_response.py index f9a5194..4d08dc7 100644 --- a/hoprd_sdk/models/peer_id_response.py +++ b/hoprd_sdk/models/peer_id_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/peer_info.py b/hoprd_sdk/models/peer_info.py index 133cc48..d490af4 100644 --- a/hoprd_sdk/models/peer_info.py +++ b/hoprd_sdk/models/peer_info.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/ping_response.py b/hoprd_sdk/models/ping_response.py index 14729a3..7aa1afc 100644 --- a/hoprd_sdk/models/ping_response.py +++ b/hoprd_sdk/models/ping_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/routing_options.py b/hoprd_sdk/models/routing_options.py new file mode 100644 index 0000000..3fef29c --- /dev/null +++ b/hoprd_sdk/models/routing_options.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RoutingOptions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """RoutingOptions - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RoutingOptions, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RoutingOptions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/models/send_message_body_request.py b/hoprd_sdk/models/send_message_body_request.py index 50284c9..b54da09 100644 --- a/hoprd_sdk/models/send_message_body_request.py +++ b/hoprd_sdk/models/send_message_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -29,6 +29,7 @@ class SendMessageBodyRequest(object): """ swagger_types = { 'body': 'str', + 'destination': 'str', 'hops': 'int', 'path': 'list[str]', 'peer_id': 'str', @@ -37,26 +38,31 @@ class SendMessageBodyRequest(object): attribute_map = { 'body': 'body', + 'destination': 'destination', 'hops': 'hops', 'path': 'path', 'peer_id': 'peerId', 'tag': 'tag' } - def __init__(self, body=None, hops=None, path=None, peer_id=None, tag=None): # noqa: E501 + def __init__(self, body=None, destination=None, hops=None, path=None, peer_id=None, tag=None): # noqa: E501 """SendMessageBodyRequest - a model defined in Swagger""" # noqa: E501 self._body = None + self._destination = None self._hops = None self._path = None self._peer_id = None self._tag = None self.discriminator = None self.body = body + if destination is not None: + self.destination = destination if hops is not None: self.hops = hops if path is not None: self.path = path - self.peer_id = peer_id + if peer_id is not None: + self.peer_id = peer_id self.tag = tag @property @@ -84,6 +90,29 @@ def body(self, body): self._body = body + @property + def destination(self): + """Gets the destination of this SendMessageBodyRequest. # noqa: E501 + + The recipient HOPR PeerId or address # noqa: E501 + + :return: The destination of this SendMessageBodyRequest. # noqa: E501 + :rtype: str + """ + return self._destination + + @destination.setter + def destination(self, destination): + """Sets the destination of this SendMessageBodyRequest. + + The recipient HOPR PeerId or address # noqa: E501 + + :param destination: The destination of this SendMessageBodyRequest. # noqa: E501 + :type: str + """ + + self._destination = destination + @property def hops(self): """Gets the hops of this SendMessageBodyRequest. # noqa: E501 @@ -130,7 +159,7 @@ def path(self, path): def peer_id(self): """Gets the peer_id of this SendMessageBodyRequest. # noqa: E501 - The recipient HOPR PeerId # noqa: E501 + Deprecated: PeerId of the target node # noqa: E501 :return: The peer_id of this SendMessageBodyRequest. # noqa: E501 :rtype: str @@ -141,13 +170,11 @@ def peer_id(self): def peer_id(self, peer_id): """Sets the peer_id of this SendMessageBodyRequest. - The recipient HOPR PeerId # noqa: E501 + Deprecated: PeerId of the target node # noqa: E501 :param peer_id: The peer_id of this SendMessageBodyRequest. # noqa: E501 :type: str """ - if peer_id is None: - raise ValueError("Invalid value for `peer_id`, must not be `None`") # noqa: E501 self._peer_id = peer_id @@ -155,7 +182,7 @@ def peer_id(self, peer_id): def tag(self): """Gets the tag of this SendMessageBodyRequest. # noqa: E501 - The message tag used to filter messages based on application # noqa: E501 + The message tag used to filter messages based on application, must be from range <1024,65535> # noqa: E501 :return: The tag of this SendMessageBodyRequest. # noqa: E501 :rtype: int @@ -166,7 +193,7 @@ def tag(self): def tag(self, tag): """Sets the tag of this SendMessageBodyRequest. - The message tag used to filter messages based on application # noqa: E501 + The message tag used to filter messages based on application, must be from range <1024,65535> # noqa: E501 :param tag: The tag of this SendMessageBodyRequest. # noqa: E501 :type: int diff --git a/hoprd_sdk/models/send_message_response.py b/hoprd_sdk/models/send_message_response.py index a66c5db..e8c14bd 100644 --- a/hoprd_sdk/models/send_message_response.py +++ b/hoprd_sdk/models/send_message_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/session_capability.py b/hoprd_sdk/models/session_capability.py new file mode 100644 index 0000000..30635e4 --- /dev/null +++ b/hoprd_sdk/models/session_capability.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SessionCapability(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + SEGMENTATION = "Segmentation" + RETRANSMISSION = "Retransmission" + RETRANSMISSIONACKONLY = "RetransmissionAckOnly" + NODELAY = "NoDelay" + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """SessionCapability - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SessionCapability, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SessionCapability): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/models/session_client_request.py b/hoprd_sdk/models/session_client_request.py new file mode 100644 index 0000000..acaef94 --- /dev/null +++ b/hoprd_sdk/models/session_client_request.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SessionClientRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'capabilities': 'list[SessionCapability]', + 'destination': 'str', + 'listen_host': 'str', + 'path': 'RoutingOptions', + 'target': 'SessionTargetSpec' + } + + attribute_map = { + 'capabilities': 'capabilities', + 'destination': 'destination', + 'listen_host': 'listenHost', + 'path': 'path', + 'target': 'target' + } + + def __init__(self, capabilities=None, destination=None, listen_host=None, path=None, target=None): # noqa: E501 + """SessionClientRequest - a model defined in Swagger""" # noqa: E501 + self._capabilities = None + self._destination = None + self._listen_host = None + self._path = None + self._target = None + self.discriminator = None + if capabilities is not None: + self.capabilities = capabilities + self.destination = destination + if listen_host is not None: + self.listen_host = listen_host + self.path = path + self.target = target + + @property + def capabilities(self): + """Gets the capabilities of this SessionClientRequest. # noqa: E501 + + Capabilities for the Session protocol. Defaults to `Segmentation` and `Retransmission` for TCP and nothing for UDP. # noqa: E501 + + :return: The capabilities of this SessionClientRequest. # noqa: E501 + :rtype: list[SessionCapability] + """ + return self._capabilities + + @capabilities.setter + def capabilities(self, capabilities): + """Sets the capabilities of this SessionClientRequest. + + Capabilities for the Session protocol. Defaults to `Segmentation` and `Retransmission` for TCP and nothing for UDP. # noqa: E501 + + :param capabilities: The capabilities of this SessionClientRequest. # noqa: E501 + :type: list[SessionCapability] + """ + + self._capabilities = capabilities + + @property + def destination(self): + """Gets the destination of this SessionClientRequest. # noqa: E501 + + Peer ID of the Exit node. # noqa: E501 + + :return: The destination of this SessionClientRequest. # noqa: E501 + :rtype: str + """ + return self._destination + + @destination.setter + def destination(self, destination): + """Sets the destination of this SessionClientRequest. + + Peer ID of the Exit node. # noqa: E501 + + :param destination: The destination of this SessionClientRequest. # noqa: E501 + :type: str + """ + if destination is None: + raise ValueError("Invalid value for `destination`, must not be `None`") # noqa: E501 + + self._destination = destination + + @property + def listen_host(self): + """Gets the listen_host of this SessionClientRequest. # noqa: E501 + + Listen host (`ip:port`) for the Session socket at the Entry node. Supports also partial specification (only `ip` or only `:port`) with the respective part replaced by the node's configured default. # noqa: E501 + + :return: The listen_host of this SessionClientRequest. # noqa: E501 + :rtype: str + """ + return self._listen_host + + @listen_host.setter + def listen_host(self, listen_host): + """Sets the listen_host of this SessionClientRequest. + + Listen host (`ip:port`) for the Session socket at the Entry node. Supports also partial specification (only `ip` or only `:port`) with the respective part replaced by the node's configured default. # noqa: E501 + + :param listen_host: The listen_host of this SessionClientRequest. # noqa: E501 + :type: str + """ + + self._listen_host = listen_host + + @property + def path(self): + """Gets the path of this SessionClientRequest. # noqa: E501 + + + :return: The path of this SessionClientRequest. # noqa: E501 + :rtype: RoutingOptions + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this SessionClientRequest. + + + :param path: The path of this SessionClientRequest. # noqa: E501 + :type: RoutingOptions + """ + if path is None: + raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501 + + self._path = path + + @property + def target(self): + """Gets the target of this SessionClientRequest. # noqa: E501 + + + :return: The target of this SessionClientRequest. # noqa: E501 + :rtype: SessionTargetSpec + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this SessionClientRequest. + + + :param target: The target of this SessionClientRequest. # noqa: E501 + :type: SessionTargetSpec + """ + if target is None: + raise ValueError("Invalid value for `target`, must not be `None`") # noqa: E501 + + self._target = target + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SessionClientRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SessionClientRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/models/session_client_response.py b/hoprd_sdk/models/session_client_response.py new file mode 100644 index 0000000..7130c2e --- /dev/null +++ b/hoprd_sdk/models/session_client_response.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SessionClientResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'ip': 'str', + 'path': 'RoutingOptions', + 'port': 'int', + 'protocol': 'str', + 'target': 'str' + } + + attribute_map = { + 'ip': 'ip', + 'path': 'path', + 'port': 'port', + 'protocol': 'protocol', + 'target': 'target' + } + + def __init__(self, ip=None, path=None, port=None, protocol=None, target=None): # noqa: E501 + """SessionClientResponse - a model defined in Swagger""" # noqa: E501 + self._ip = None + self._path = None + self._port = None + self._protocol = None + self._target = None + self.discriminator = None + self.ip = ip + self.path = path + self.port = port + self.protocol = protocol + self.target = target + + @property + def ip(self): + """Gets the ip of this SessionClientResponse. # noqa: E501 + + + :return: The ip of this SessionClientResponse. # noqa: E501 + :rtype: str + """ + return self._ip + + @ip.setter + def ip(self, ip): + """Sets the ip of this SessionClientResponse. + + + :param ip: The ip of this SessionClientResponse. # noqa: E501 + :type: str + """ + if ip is None: + raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501 + + self._ip = ip + + @property + def path(self): + """Gets the path of this SessionClientResponse. # noqa: E501 + + + :return: The path of this SessionClientResponse. # noqa: E501 + :rtype: RoutingOptions + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this SessionClientResponse. + + + :param path: The path of this SessionClientResponse. # noqa: E501 + :type: RoutingOptions + """ + if path is None: + raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501 + + self._path = path + + @property + def port(self): + """Gets the port of this SessionClientResponse. # noqa: E501 + + + :return: The port of this SessionClientResponse. # noqa: E501 + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this SessionClientResponse. + + + :param port: The port of this SessionClientResponse. # noqa: E501 + :type: int + """ + if port is None: + raise ValueError("Invalid value for `port`, must not be `None`") # noqa: E501 + + self._port = port + + @property + def protocol(self): + """Gets the protocol of this SessionClientResponse. # noqa: E501 + + + :return: The protocol of this SessionClientResponse. # noqa: E501 + :rtype: str + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol): + """Sets the protocol of this SessionClientResponse. + + + :param protocol: The protocol of this SessionClientResponse. # noqa: E501 + :type: str + """ + if protocol is None: + raise ValueError("Invalid value for `protocol`, must not be `None`") # noqa: E501 + + self._protocol = protocol + + @property + def target(self): + """Gets the target of this SessionClientResponse. # noqa: E501 + + + :return: The target of this SessionClientResponse. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this SessionClientResponse. + + + :param target: The target of this SessionClientResponse. # noqa: E501 + :type: str + """ + if target is None: + raise ValueError("Invalid value for `target`, must not be `None`") # noqa: E501 + + self._target = target + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SessionClientResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SessionClientResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/models/session_target_spec.py b/hoprd_sdk/models/session_target_spec.py new file mode 100644 index 0000000..bea3c62 --- /dev/null +++ b/hoprd_sdk/models/session_target_spec.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SessionTargetSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """SessionTargetSpec - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SessionTargetSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SessionTargetSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/models/size_response.py b/hoprd_sdk/models/size_response.py index 6ddfd0c..5051e88 100644 --- a/hoprd_sdk/models/size_response.py +++ b/hoprd_sdk/models/size_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/tag_query_request.py b/hoprd_sdk/models/tag_query_request.py index dfc2bed..2b092a2 100644 --- a/hoprd_sdk/models/tag_query_request.py +++ b/hoprd_sdk/models/tag_query_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/ticket_price_response.py b/hoprd_sdk/models/ticket_price_response.py index 6605e4f..2bf6975 100644 --- a/hoprd_sdk/models/ticket_price_response.py +++ b/hoprd_sdk/models/ticket_price_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/ticket_probability_response.py b/hoprd_sdk/models/ticket_probability_response.py new file mode 100644 index 0000000..71b3b8b --- /dev/null +++ b/hoprd_sdk/models/ticket_probability_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class TicketProbabilityResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'probability': 'float' + } + + attribute_map = { + 'probability': 'probability' + } + + def __init__(self, probability=None): # noqa: E501 + """TicketProbabilityResponse - a model defined in Swagger""" # noqa: E501 + self._probability = None + self.discriminator = None + self.probability = probability + + @property + def probability(self): + """Gets the probability of this TicketProbabilityResponse. # noqa: E501 + + Winning probability of a ticket. # noqa: E501 + + :return: The probability of this TicketProbabilityResponse. # noqa: E501 + :rtype: float + """ + return self._probability + + @probability.setter + def probability(self, probability): + """Sets the probability of this TicketProbabilityResponse. + + Winning probability of a ticket. # noqa: E501 + + :param probability: The probability of this TicketProbabilityResponse. # noqa: E501 + :type: float + """ + if probability is None: + raise ValueError("Invalid value for `probability`, must not be `None`") # noqa: E501 + + self._probability = probability + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TicketProbabilityResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TicketProbabilityResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/models/withdraw_body_request.py b/hoprd_sdk/models/withdraw_body_request.py index 704e726..51bf856 100644 --- a/hoprd_sdk/models/withdraw_body_request.py +++ b/hoprd_sdk/models/withdraw_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/hoprd_sdk/models/withdraw_response.py b/hoprd_sdk/models/withdraw_response.py new file mode 100644 index 0000000..e7a874f --- /dev/null +++ b/hoprd_sdk/models/withdraw_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class WithdrawResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'receipt': 'str' + } + + attribute_map = { + 'receipt': 'receipt' + } + + def __init__(self, receipt=None): # noqa: E501 + """WithdrawResponse - a model defined in Swagger""" # noqa: E501 + self._receipt = None + self.discriminator = None + self.receipt = receipt + + @property + def receipt(self): + """Gets the receipt of this WithdrawResponse. # noqa: E501 + + + :return: The receipt of this WithdrawResponse. # noqa: E501 + :rtype: str + """ + return self._receipt + + @receipt.setter + def receipt(self, receipt): + """Sets the receipt of this WithdrawResponse. + + + :param receipt: The receipt of this WithdrawResponse. # noqa: E501 + :type: str + """ + if receipt is None: + raise ValueError("Invalid value for `receipt`, must not be `None`") # noqa: E501 + + self._receipt = receipt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(WithdrawResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WithdrawResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/hoprd_sdk/rest.py b/hoprd_sdk/rest.py index d30b968..ee038d4 100644 --- a/hoprd_sdk/rest.py +++ b/hoprd_sdk/rest.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/setup.py b/setup.py index 2c71da0..dd4d9e8 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "hoprd-sdk" -VERSION = "2.1.0" +VERSION = "2.2.0-rc.1" # To install the library, run the following # # python setup.py install diff --git a/test/test_account_addresses_response.py b/test/test_account_addresses_response.py index 8ca9e35..9cd12a7 100644 --- a/test/test_account_addresses_response.py +++ b/test/test_account_addresses_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_account_api.py b/test/test_account_api.py index bcf73dd..fb09ab6 100644 --- a/test/test_account_api.py +++ b/test/test_account_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_account_balances_response.py b/test/test_account_balances_response.py index a03636d..8b11f79 100644 --- a/test/test_account_balances_response.py +++ b/test/test_account_balances_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_alias_api.py b/test/test_alias_api.py index c3c5e2b..35bc52d 100644 --- a/test/test_alias_api.py +++ b/test/test_alias_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -31,28 +31,35 @@ def tearDown(self): def test_aliases(self): """Test case for aliases - Get each previously set alias and its corresponding PeerId. # noqa: E501 + (deprecated, will be removed in v3.0) Get each previously set alias and its corresponding PeerId as a hashmap. # noqa: E501 + """ + pass + + def test_clear_aliases(self): + """Test case for clear_aliases + + (deprecated, will be removed in v3.0) Clear all aliases. # noqa: E501 """ pass def test_delete_alias(self): """Test case for delete_alias - Delete an alias. # noqa: E501 + (deprecated, will be removed in v3.0) Delete an alias. # noqa: E501 """ pass def test_get_alias(self): """Test case for get_alias - Get alias for the PeerId (Hopr address) that have this alias assigned to it. # noqa: E501 + (deprecated, will be removed in v3.0) Get alias for the PeerId (Hopr address) that have this alias assigned to it. # noqa: E501 """ pass def test_set_alias(self): """Test case for set_alias - Set alias for a peer with a specific PeerId. # noqa: E501 + (deprecated, will be removed in v3.0) Set alias for a peer with a specific PeerId. # noqa: E501 """ pass diff --git a/test/test_alias_destination_body_request.py b/test/test_alias_destination_body_request.py new file mode 100644 index 0000000..c1ffd53 --- /dev/null +++ b/test/test_alias_destination_body_request.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.alias_destination_body_request import AliasDestinationBodyRequest # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestAliasDestinationBodyRequest(unittest.TestCase): + """AliasDestinationBodyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAliasDestinationBodyRequest(self): + """Test AliasDestinationBodyRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.alias_destination_body_request.AliasDestinationBodyRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_announced_peer.py b/test/test_announced_peer.py index 3212a82..7fce40d 100644 --- a/test/test_announced_peer.py +++ b/test/test_announced_peer.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_api_error.py b/test/test_api_error.py index d31e64d..8a956e5 100644 --- a/test/test_api_error.py +++ b/test/test_api_error.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_channel_info_response.py b/test/test_channel_info_response.py index a6f3b83..23f065d 100644 --- a/test/test_channel_info_response.py +++ b/test/test_channel_info_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_channel_ticket.py b/test/test_channel_ticket.py index 23dae84..ddf3f81 100644 --- a/test/test_channel_ticket.py +++ b/test/test_channel_ticket.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_channels_api.py b/test/test_channels_api.py index 2eaac8e..1e780a7 100644 --- a/test/test_channels_api.py +++ b/test/test_channels_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_channels_query_request.py b/test/test_channels_query_request.py index 40a5b3a..f2edc52 100644 --- a/test/test_channels_query_request.py +++ b/test/test_channels_query_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_checks_api.py b/test/test_checks_api.py index d9013e6..7b8016f 100644 --- a/test/test_checks_api.py +++ b/test/test_checks_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,6 +28,13 @@ def setUp(self): def tearDown(self): pass + def test_eligiblez(self): + """Test case for eligiblez + + Check whether the node is eligible in the network. # noqa: E501 + """ + pass + def test_healthyz(self): """Test case for healthyz diff --git a/test/test_close_channel_response.py b/test/test_close_channel_response.py index 766e1a7..b8d2197 100644 --- a/test/test_close_channel_response.py +++ b/test/test_close_channel_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_configuration_api.py b/test/test_configuration_api.py index 770f84a..625d7eb 100644 --- a/test/test_configuration_api.py +++ b/test/test_configuration_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_entry_node.py b/test/test_entry_node.py index ead146a..630f479 100644 --- a/test/test_entry_node.py +++ b/test/test_entry_node.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_fund_body_request.py b/test/test_fund_body_request.py index 43b4311..d4d1d4a 100644 --- a/test/test_fund_body_request.py +++ b/test/test_fund_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_get_message_body_request.py b/test/test_get_message_body_request.py index 6b02614..861d842 100644 --- a/test/test_get_message_body_request.py +++ b/test/test_get_message_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_alias_peer_id_body_request.py b/test/test_graph_export_query.py similarity index 58% rename from test/test_alias_peer_id_body_request.py rename to test/test_graph_export_query.py index ebf4a3f..a160ce0 100644 --- a/test/test_alias_peer_id_body_request.py +++ b/test/test_graph_export_query.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,12 +15,12 @@ import unittest import hoprd_sdk -from hoprd_sdk.models.alias_peer_id_body_request import AliasPeerIdBodyRequest # noqa: E501 +from hoprd_sdk.models.graph_export_query import GraphExportQuery # noqa: E501 from hoprd_sdk.rest import ApiException -class TestAliasPeerIdBodyRequest(unittest.TestCase): - """AliasPeerIdBodyRequest unit test stubs""" +class TestGraphExportQuery(unittest.TestCase): + """GraphExportQuery unit test stubs""" def setUp(self): pass @@ -28,10 +28,10 @@ def setUp(self): def tearDown(self): pass - def testAliasPeerIdBodyRequest(self): - """Test AliasPeerIdBodyRequest""" + def testGraphExportQuery(self): + """Test GraphExportQuery""" # FIXME: construct object with mandatory attributes with example values - # model = hoprd_sdk.models.alias_peer_id_body_request.AliasPeerIdBodyRequest() # noqa: E501 + # model = hoprd_sdk.models.graph_export_query.GraphExportQuery() # noqa: E501 pass diff --git a/test/test_heartbeat_info.py b/test/test_heartbeat_info.py index 8c7f2d0..63881b9 100644 --- a/test/test_heartbeat_info.py +++ b/test/test_heartbeat_info.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_ip_protocol.py b/test/test_ip_protocol.py new file mode 100644 index 0000000..0c25975 --- /dev/null +++ b/test/test_ip_protocol.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.ip_protocol import IpProtocol # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestIpProtocol(unittest.TestCase): + """IpProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIpProtocol(self): + """Test IpProtocol""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.ip_protocol.IpProtocol() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_pop_all_response.py b/test/test_message_pop_all_response.py index 122db45..4167523 100644 --- a/test/test_message_pop_all_response.py +++ b/test/test_message_pop_all_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_message_pop_response.py b/test/test_message_pop_response.py index b1e0df6..500af2c 100644 --- a/test/test_message_pop_response.py +++ b/test/test_message_pop_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_messages_api.py b/test/test_messages_api.py index c25d962..544caa2 100644 --- a/test/test_messages_api.py +++ b/test/test_messages_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_network_api.py b/test/test_network_api.py index fafdad5..42a1715 100644 --- a/test/test_network_api.py +++ b/test/test_network_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,6 +35,13 @@ def test_price(self): """ pass + def test_probability(self): + """Test case for probability + + Gets the current minimum incoming ticket winning probability defined by the network. # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_node_api.py b/test/test_node_api.py index 19621a8..377e8e1 100644 --- a/test/test_node_api.py +++ b/test/test_node_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,6 +28,13 @@ def setUp(self): def tearDown(self): pass + def test_channel_graph(self): + """Test case for channel_graph + + Retrieve node's channel graph in DOT or JSON format. # noqa: E501 + """ + pass + def test_entry_nodes(self): """Test case for entry_nodes @@ -59,7 +66,7 @@ def test_peers(self): def test_version(self): """Test case for version - Get release version of the running node. # noqa: E501 + Get the release version of the running node. # noqa: E501 """ pass diff --git a/test/test_node_channel.py b/test/test_node_channel.py index 1424153..1070077 100644 --- a/test/test_node_channel.py +++ b/test/test_node_channel.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_node_channels_response.py b/test/test_node_channels_response.py index f10121e..31b1f21 100644 --- a/test/test_node_channels_response.py +++ b/test/test_node_channels_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_node_info_response.py b/test/test_node_info_response.py index 210c283..7bd504b 100644 --- a/test/test_node_info_response.py +++ b/test/test_node_info_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_node_peer_info_response.py b/test/test_node_peer_info_response.py index fb0e8cf..92ee479 100644 --- a/test/test_node_peer_info_response.py +++ b/test/test_node_peer_info_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_node_peers_query_request.py b/test/test_node_peers_query_request.py index dd53c5f..d1761e1 100644 --- a/test/test_node_peers_query_request.py +++ b/test/test_node_peers_query_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_node_peers_response.py b/test/test_node_peers_response.py index 133b794..80562fe 100644 --- a/test/test_node_peers_response.py +++ b/test/test_node_peers_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_node_ticket_statistics_response.py b/test/test_node_ticket_statistics_response.py index 2cf3ab8..22bb010 100644 --- a/test/test_node_ticket_statistics_response.py +++ b/test/test_node_ticket_statistics_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_node_version_response.py b/test/test_node_version_response.py index 7f42609..ae71c06 100644 --- a/test/test_node_version_response.py +++ b/test/test_node_version_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_open_channel_body_request.py b/test/test_open_channel_body_request.py index 7959491..8b23f6c 100644 --- a/test/test_open_channel_body_request.py +++ b/test/test_open_channel_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_open_channel_response.py b/test/test_open_channel_response.py index c218e8c..a644d14 100644 --- a/test/test_open_channel_response.py +++ b/test/test_open_channel_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_peer_id_response.py b/test/test_peer_id_response.py index 032861b..85476e1 100644 --- a/test/test_peer_id_response.py +++ b/test/test_peer_id_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_peer_info.py b/test/test_peer_info.py index b127c50..efdd0a5 100644 --- a/test/test_peer_info.py +++ b/test/test_peer_info.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_peers_api.py b/test/test_peers_api.py index c241445..51b8cd8 100644 --- a/test/test_peers_api.py +++ b/test/test_peers_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_ping_response.py b/test/test_ping_response.py index 94d8491..5398c8e 100644 --- a/test/test_ping_response.py +++ b/test/test_ping_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_routing_options.py b/test/test_routing_options.py new file mode 100644 index 0000000..8d27f29 --- /dev/null +++ b/test/test_routing_options.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.routing_options import RoutingOptions # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestRoutingOptions(unittest.TestCase): + """RoutingOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRoutingOptions(self): + """Test RoutingOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.routing_options.RoutingOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_send_message_body_request.py b/test/test_send_message_body_request.py index 6647e49..4127881 100644 --- a/test/test_send_message_body_request.py +++ b/test/test_send_message_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_send_message_response.py b/test/test_send_message_response.py index bbf7052..69fa049 100644 --- a/test/test_send_message_response.py +++ b/test/test_send_message_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_session_api.py b/test/test_session_api.py new file mode 100644 index 0000000..3bdfd9b --- /dev/null +++ b/test/test_session_api.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.api.session_api import SessionApi # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestSessionApi(unittest.TestCase): + """SessionApi unit test stubs""" + + def setUp(self): + self.api = SessionApi() # noqa: E501 + + def tearDown(self): + pass + + def test_close_client(self): + """Test case for close_client + + Closes an existing Session listener. # noqa: E501 + """ + pass + + def test_create_client(self): + """Test case for create_client + + Creates a new client session returning the given session listening host and port over TCP or UDP. # noqa: E501 + """ + pass + + def test_list_clients(self): + """Test case for list_clients + + Lists existing Session listeners for the given IP protocol. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_session_capability.py b/test/test_session_capability.py new file mode 100644 index 0000000..860462f --- /dev/null +++ b/test/test_session_capability.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.session_capability import SessionCapability # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestSessionCapability(unittest.TestCase): + """SessionCapability unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSessionCapability(self): + """Test SessionCapability""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.session_capability.SessionCapability() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_session_client_request.py b/test/test_session_client_request.py new file mode 100644 index 0000000..f45f7a1 --- /dev/null +++ b/test/test_session_client_request.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.session_client_request import SessionClientRequest # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestSessionClientRequest(unittest.TestCase): + """SessionClientRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSessionClientRequest(self): + """Test SessionClientRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.session_client_request.SessionClientRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_session_client_response.py b/test/test_session_client_response.py new file mode 100644 index 0000000..d2b03a9 --- /dev/null +++ b/test/test_session_client_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.session_client_response import SessionClientResponse # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestSessionClientResponse(unittest.TestCase): + """SessionClientResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSessionClientResponse(self): + """Test SessionClientResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.session_client_response.SessionClientResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_session_target_spec.py b/test/test_session_target_spec.py new file mode 100644 index 0000000..c1cd483 --- /dev/null +++ b/test/test_session_target_spec.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.session_target_spec import SessionTargetSpec # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestSessionTargetSpec(unittest.TestCase): + """SessionTargetSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSessionTargetSpec(self): + """Test SessionTargetSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.session_target_spec.SessionTargetSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_size_response.py b/test/test_size_response.py index 1f351ea..1b7ea4e 100644 --- a/test/test_size_response.py +++ b/test/test_size_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_tag_query_request.py b/test/test_tag_query_request.py index 24b2b2d..292d004 100644 --- a/test/test_tag_query_request.py +++ b/test/test_tag_query_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_ticket_price_response.py b/test/test_ticket_price_response.py index 0c4e65c..1966ef5 100644 --- a/test/test_ticket_price_response.py +++ b/test/test_ticket_price_response.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_ticket_probability_response.py b/test/test_ticket_probability_response.py new file mode 100644 index 0000000..a467f88 --- /dev/null +++ b/test/test_ticket_probability_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.ticket_probability_response import TicketProbabilityResponse # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestTicketProbabilityResponse(unittest.TestCase): + """TicketProbabilityResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTicketProbabilityResponse(self): + """Test TicketProbabilityResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.ticket_probability_response.TicketProbabilityResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tickets_api.py b/test/test_tickets_api.py index 4f90a93..b9ce883 100644 --- a/test/test_tickets_api.py +++ b/test/test_tickets_api.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -35,6 +35,13 @@ def test_redeem_all_tickets(self): """ pass + def test_reset_ticket_statistics(self): + """Test case for reset_ticket_statistics + + Resets the ticket metrics. # noqa: E501 + """ + pass + def test_show_all_tickets(self): """Test case for show_all_tickets diff --git a/test/test_withdraw_body_request.py b/test/test_withdraw_body_request.py index a94a846..0c3a9ea 100644 --- a/test/test_withdraw_body_request.py +++ b/test/test_withdraw_body_request.py @@ -5,7 +5,7 @@ This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 - OpenAPI spec version: 3.1.0 + OpenAPI spec version: 3.10.0 Contact: tech@hoprnet.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_withdraw_response.py b/test/test_withdraw_response.py new file mode 100644 index 0000000..c7b7058 --- /dev/null +++ b/test/test_withdraw_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + hoprd-api + + This Rest API enables developers to interact with a hoprd node programatically through HTTP. # noqa: E501 + + OpenAPI spec version: 3.10.0 + Contact: tech@hoprnet.org + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import hoprd_sdk +from hoprd_sdk.models.withdraw_response import WithdrawResponse # noqa: E501 +from hoprd_sdk.rest import ApiException + + +class TestWithdrawResponse(unittest.TestCase): + """WithdrawResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWithdrawResponse(self): + """Test WithdrawResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = hoprd_sdk.models.withdraw_response.WithdrawResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()