add openapi-generated client
This commit is contained in:
150
generated/docs/DefaultApi.md
Normal file
150
generated/docs/DefaultApi.md
Normal file
@ -0,0 +1,150 @@
|
||||
# openapi_client.DefaultApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**game_decision_game_decision_post**](DefaultApi.md#game_decision_game_decision_post) | **POST** /game/decision | Game Decision
|
||||
[**game_start_game_start_post**](DefaultApi.md#game_start_game_start_post) | **POST** /game/start | Game Start
|
||||
|
||||
|
||||
# **game_decision_game_decision_post**
|
||||
> GameDecisionResponse game_decision_game_decision_post(game_decision_request)
|
||||
|
||||
Game Decision
|
||||
|
||||
Log decision, update the score and proceed with game.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import openapi_client
|
||||
from openapi_client.models.game_decision_request import GameDecisionRequest
|
||||
from openapi_client.models.game_decision_response import GameDecisionResponse
|
||||
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.DefaultApi(api_client)
|
||||
game_decision_request = openapi_client.GameDecisionRequest() # GameDecisionRequest |
|
||||
|
||||
try:
|
||||
# Game Decision
|
||||
api_response = api_instance.game_decision_game_decision_post(game_decision_request)
|
||||
print("The response of DefaultApi->game_decision_game_decision_post:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling DefaultApi->game_decision_game_decision_post: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**game_decision_request** | [**GameDecisionRequest**](GameDecisionRequest.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**GameDecisionResponse**](GameDecisionResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Successful Response | - |
|
||||
**422** | Validation Error | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **game_start_game_start_post**
|
||||
> GameStartResponse game_start_game_start_post(game_start_request)
|
||||
|
||||
Game Start
|
||||
|
||||
Start a new game session for the player.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import openapi_client
|
||||
from openapi_client.models.game_start_request import GameStartRequest
|
||||
from openapi_client.models.game_start_response import GameStartResponse
|
||||
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.DefaultApi(api_client)
|
||||
game_start_request = openapi_client.GameStartRequest() # GameStartRequest |
|
||||
|
||||
try:
|
||||
# Game Start
|
||||
api_response = api_instance.game_start_game_start_post(game_start_request)
|
||||
print("The response of DefaultApi->game_start_game_start_post:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling DefaultApi->game_start_game_start_post: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**game_start_request** | [**GameStartRequest**](GameStartRequest.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**GameStartResponse**](GameStartResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Successful Response | - |
|
||||
**422** | Validation Error | - |
|
||||
|
||||
[[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)
|
||||
|
31
generated/docs/GameDecisionRequest.md
Normal file
31
generated/docs/GameDecisionRequest.md
Normal file
@ -0,0 +1,31 @@
|
||||
# GameDecisionRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**decision** | **str** | Decision of the player. |
|
||||
**session_id** | **str** | Unique session ID for the game. |
|
||||
**client_id** | **str** | Unique client ID for the game. |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from openapi_client.models.game_decision_request import GameDecisionRequest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of GameDecisionRequest from a JSON string
|
||||
game_decision_request_instance = GameDecisionRequest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(GameDecisionRequest.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
game_decision_request_dict = game_decision_request_instance.to_dict()
|
||||
# create an instance of GameDecisionRequest from a dict
|
||||
game_decision_request_from_dict = GameDecisionRequest.from_dict(game_decision_request_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
32
generated/docs/GameDecisionResponse.md
Normal file
32
generated/docs/GameDecisionResponse.md
Normal file
@ -0,0 +1,32 @@
|
||||
# GameDecisionResponse
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status** | **str** | Status of the game after the decision. |
|
||||
**score** | **int** | Current score of the player. |
|
||||
**client_id** | **str** | | [optional]
|
||||
**client_data** | **object** | Client data for the player. | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from openapi_client.models.game_decision_response import GameDecisionResponse
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of GameDecisionResponse from a JSON string
|
||||
game_decision_response_instance = GameDecisionResponse.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(GameDecisionResponse.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
game_decision_response_dict = game_decision_response_instance.to_dict()
|
||||
# create an instance of GameDecisionResponse from a dict
|
||||
game_decision_response_from_dict = GameDecisionResponse.from_dict(game_decision_response_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
29
generated/docs/GameStartRequest.md
Normal file
29
generated/docs/GameStartRequest.md
Normal file
@ -0,0 +1,29 @@
|
||||
# GameStartRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**player_name** | **str** | Name of the player. |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from openapi_client.models.game_start_request import GameStartRequest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of GameStartRequest from a JSON string
|
||||
game_start_request_instance = GameStartRequest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(GameStartRequest.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
game_start_request_dict = game_start_request_instance.to_dict()
|
||||
# create an instance of GameStartRequest from a dict
|
||||
game_start_request_from_dict = GameStartRequest.from_dict(game_start_request_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
34
generated/docs/GameStartResponse.md
Normal file
34
generated/docs/GameStartResponse.md
Normal file
@ -0,0 +1,34 @@
|
||||
# GameStartResponse
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**message** | **str** | Message indicating the game has started. |
|
||||
**session_id** | **str** | Unique session ID for the game. |
|
||||
**player_id** | **str** | Unique player ID for the game. |
|
||||
**client_id** | **str** | Unique client ID for the game. |
|
||||
**client_data** | **object** | Client data for the player. |
|
||||
**score** | **int** | Starting score of the player. |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from openapi_client.models.game_start_response import GameStartResponse
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of GameStartResponse from a JSON string
|
||||
game_start_response_instance = GameStartResponse.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(GameStartResponse.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
game_start_response_dict = game_start_response_instance.to_dict()
|
||||
# create an instance of GameStartResponse from a dict
|
||||
game_start_response_from_dict = GameStartResponse.from_dict(game_start_response_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
29
generated/docs/HTTPValidationError.md
Normal file
29
generated/docs/HTTPValidationError.md
Normal file
@ -0,0 +1,29 @@
|
||||
# HTTPValidationError
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**detail** | [**List[ValidationError]**](ValidationError.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from openapi_client.models.http_validation_error import HTTPValidationError
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of HTTPValidationError from a JSON string
|
||||
http_validation_error_instance = HTTPValidationError.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(HTTPValidationError.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
http_validation_error_dict = http_validation_error_instance.to_dict()
|
||||
# create an instance of HTTPValidationError from a dict
|
||||
http_validation_error_from_dict = HTTPValidationError.from_dict(http_validation_error_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
31
generated/docs/ValidationError.md
Normal file
31
generated/docs/ValidationError.md
Normal file
@ -0,0 +1,31 @@
|
||||
# ValidationError
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | |
|
||||
**msg** | **str** | |
|
||||
**type** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from openapi_client.models.validation_error import ValidationError
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ValidationError from a JSON string
|
||||
validation_error_instance = ValidationError.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ValidationError.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
validation_error_dict = validation_error_instance.to_dict()
|
||||
# create an instance of ValidationError from a dict
|
||||
validation_error_from_dict = ValidationError.from_dict(validation_error_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
28
generated/docs/ValidationErrorLocInner.md
Normal file
28
generated/docs/ValidationErrorLocInner.md
Normal file
@ -0,0 +1,28 @@
|
||||
# ValidationErrorLocInner
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ValidationErrorLocInner from a JSON string
|
||||
validation_error_loc_inner_instance = ValidationErrorLocInner.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ValidationErrorLocInner.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
validation_error_loc_inner_dict = validation_error_loc_inner_instance.to_dict()
|
||||
# create an instance of ValidationErrorLocInner from a dict
|
||||
validation_error_loc_inner_from_dict = ValidationErrorLocInner.from_dict(validation_error_loc_inner_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
Reference in New Issue
Block a user