This repository has been archived by the owner on Jan 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5c8e8d
commit 3431d45
Showing
9 changed files
with
237 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# hoprd_sdk.SessionApi | ||
|
||
All URIs are relative to */* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
[**create_client**](SessionApi.md#create_client) | **POST** /api/v3/session | Creates a new client session returing a dedicated session listening port. | ||
|
||
# **create_client** | ||
> SessionClientResponse create_client(body) | ||
Creates a new client session returing a dedicated session listening port. | ||
|
||
Once the port is bound, it is possible to use the socket for bidirectional read and write communication. | ||
|
||
### 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 socketfor bidirectional read and write communication. | ||
|
||
try: | ||
# Creates a new client session returing a dedicated session listening port. | ||
api_response = api_instance.create_client(body) | ||
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 socketfor bidirectional read and write communication. | | ||
|
||
### 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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.