Files
peernet/demo_server/demo_client/docs/PeerNetServiceApi.md

766 lines
22 KiB
Markdown
Raw Permalink Normal View History

2024-04-06 20:45:15 -07:00
# openapi_client.PeerNetServiceApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**peer_net_service_claim_ice_candidates**](PeerNetServiceApi.md#peer_net_service_claim_ice_candidates) | **GET** /v1/sessions/{session}/claim/candidates |
[**peer_net_service_create_ice_candidate**](PeerNetServiceApi.md#peer_net_service_create_ice_candidate) | **POST** /v1/sessions/{session}/candidates |
[**peer_net_service_create_knock**](PeerNetServiceApi.md#peer_net_service_create_knock) | **POST** /v1/servers/{server}/services/{service}/knocks |
[**peer_net_service_create_server**](PeerNetServiceApi.md#peer_net_service_create_server) | **POST** /v1/servers |
[**peer_net_service_create_service**](PeerNetServiceApi.md#peer_net_service_create_service) | **POST** /v1/servers/{server}/services |
[**peer_net_service_delete_server**](PeerNetServiceApi.md#peer_net_service_delete_server) | **DELETE** /v1/servers/* |
[**peer_net_service_delete_service**](PeerNetServiceApi.md#peer_net_service_delete_service) | **DELETE** /v1/servers/{server}/services/{service} |
[**peer_net_service_get_knock**](PeerNetServiceApi.md#peer_net_service_get_knock) | **GET** /v1/servers/{server}/services/{service}/knocks/{knock} |
[**peer_net_service_get_room**](PeerNetServiceApi.md#peer_net_service_get_room) | **GET** /v1/rooms/{room} |
[**peer_net_service_list_knocks**](PeerNetServiceApi.md#peer_net_service_list_knocks) | **GET** /v1/servers/{server}/services/{service}/knocks |
[**peer_net_service_update_knock**](PeerNetServiceApi.md#peer_net_service_update_knock) | **PATCH** /v1/servers/{server}/services/{service}/knocks/{knock} |
# **peer_net_service_claim_ice_candidates**
> ClaimIceCandidatesResponse peer_net_service_claim_ice_candidates(session)
Acts as both List and Delete atomically.
### Example
```python
import openapi_client
from openapi_client.models.claim_ice_candidates_response import ClaimIceCandidatesResponse
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
session = 'session_example' # str | The session id.
try:
api_response = api_instance.peer_net_service_claim_ice_candidates(session)
print("The response of PeerNetServiceApi->peer_net_service_claim_ice_candidates:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_claim_ice_candidates: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**session** | **str**| The session id. |
### Return type
[**ClaimIceCandidatesResponse**](ClaimIceCandidatesResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_create_ice_candidate**
> IceCandidate peer_net_service_create_ice_candidate(session, ice_candidate)
### Example
```python
import openapi_client
from openapi_client.models.ice_candidate import IceCandidate
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
session = 'session_example' # str | The session id.
ice_candidate = openapi_client.IceCandidate() # IceCandidate |
try:
api_response = api_instance.peer_net_service_create_ice_candidate(session, ice_candidate)
print("The response of PeerNetServiceApi->peer_net_service_create_ice_candidate:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_create_ice_candidate: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**session** | **str**| The session id. |
**ice_candidate** | [**IceCandidate**](IceCandidate.md)| |
### Return type
[**IceCandidate**](IceCandidate.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_create_knock**
> Knock peer_net_service_create_knock(server, service, knock)
Creates a knock that will be answered by the peer; the signaler may delete the knock, regardless of the state, when it ages.
### Example
```python
import openapi_client
from openapi_client.models.knock import Knock
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
server = 'server_example' # str | The server id.
service = 'service_example' # str | The service id.
knock = openapi_client.Knock() # Knock |
try:
api_response = api_instance.peer_net_service_create_knock(server, service, knock)
print("The response of PeerNetServiceApi->peer_net_service_create_knock:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_create_knock: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**server** | **str**| The server id. |
**service** | **str**| The service id. |
**knock** | [**Knock**](Knock.md)| |
### Return type
[**Knock**](Knock.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_create_server**
> Server peer_net_service_create_server(server)
### Example
```python
import openapi_client
from openapi_client.models.server import Server
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
server = openapi_client.Server() # Server |
try:
api_response = api_instance.peer_net_service_create_server(server)
print("The response of PeerNetServiceApi->peer_net_service_create_server:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_create_server: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**server** | [**Server**](Server.md)| |
### Return type
[**Server**](Server.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_create_service**
> Service peer_net_service_create_service(server, service)
### Example
```python
import openapi_client
from openapi_client.models.service import Service
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
server = 'server_example' # str | The server id.
service = openapi_client.Service() # Service |
try:
api_response = api_instance.peer_net_service_create_service(server, service)
print("The response of PeerNetServiceApi->peer_net_service_create_service:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_create_service: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**server** | **str**| The server id. |
**service** | [**Service**](Service.md)| |
### Return type
[**Service**](Service.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_delete_server**
> peer_net_service_delete_server(name=name)
### Example
```python
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
name = 'name_example' # str | (optional)
try:
api_instance.peer_net_service_delete_server(name=name)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_delete_server: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **str**| | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_delete_service**
> peer_net_service_delete_service(server, service)
### Example
```python
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
server = 'server_example' # str | The server id.
service = 'service_example' # str | The service id.
try:
api_instance.peer_net_service_delete_service(server, service)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_delete_service: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**server** | **str**| The server id. |
**service** | **str**| The service id. |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_get_knock**
> Knock peer_net_service_get_knock(server, service, knock)
### Example
```python
import openapi_client
from openapi_client.models.knock import Knock
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
server = 'server_example' # str | The server id.
service = 'service_example' # str | The service id.
knock = 'knock_example' # str | The knock id.
try:
api_response = api_instance.peer_net_service_get_knock(server, service, knock)
print("The response of PeerNetServiceApi->peer_net_service_get_knock:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_get_knock: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**server** | **str**| The server id. |
**service** | **str**| The service id. |
**knock** | **str**| The knock id. |
### Return type
[**Knock**](Knock.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_get_room**
> Room peer_net_service_get_room(room)
### Example
```python
import openapi_client
from openapi_client.models.room import Room
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
room = 'room_example' # str | The room id.
try:
api_response = api_instance.peer_net_service_get_room(room)
print("The response of PeerNetServiceApi->peer_net_service_get_room:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_get_room: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**room** | **str**| The room id. |
### Return type
[**Room**](Room.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_list_knocks**
> ListKnocksResponse peer_net_service_list_knocks(server, service)
### Example
```python
import openapi_client
from openapi_client.models.list_knocks_response import ListKnocksResponse
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
server = 'server_example' # str | The server id.
service = 'service_example' # str | The service id.
try:
api_response = api_instance.peer_net_service_list_knocks(server, service)
print("The response of PeerNetServiceApi->peer_net_service_list_knocks:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_list_knocks: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**server** | **str**| The server id. |
**service** | **str**| The service id. |
### Return type
[**ListKnocksResponse**](ListKnocksResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)
# **peer_net_service_update_knock**
> Knock peer_net_service_update_knock(server, service, knock, knock2)
### Example
```python
import openapi_client
from openapi_client.models.knock import Knock
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.PeerNetServiceApi(api_client)
server = 'server_example' # str | The server id.
service = 'service_example' # str | The service id.
knock = 'knock_example' # str | The knock id.
knock2 = openapi_client.Knock() # Knock |
try:
api_response = api_instance.peer_net_service_update_knock(server, service, knock, knock2)
print("The response of PeerNetServiceApi->peer_net_service_update_knock:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PeerNetServiceApi->peer_net_service_update_knock: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**server** | **str**| The server id. |
**service** | **str**| The service id. |
**knock** | **str**| The knock id. |
**knock2** | [**Knock**](Knock.md)| |
### Return type
[**Knock**](Knock.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**0** | Default error response | - |
[[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)