211 lines
5.7 KiB
Markdown
211 lines
5.7 KiB
Markdown
# board_mate.game.GameApi
|
|
|
|
All URIs are relative to *https://boardmate_api*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**add_move**](GameApi.md#add_move) | **POST** /moves/add/{gameId} | POST moves/add/{gameId}
|
|
[**create_party**](GameApi.md#create_party) | **POST** /create | POST create
|
|
[**retrieve_games**](GameApi.md#retrieve_games) | **GET** /games/{id} | GET games/{id}
|
|
|
|
|
|
# **add_move**
|
|
> ResponseBodyString add_move(game_id, move_dto)
|
|
|
|
POST moves/add/{gameId}
|
|
|
|
### Example
|
|
|
|
```python
|
|
import time
|
|
import os
|
|
import board_mate.game
|
|
from board_mate.game.models.move_dto import MoveDto
|
|
from board_mate.game.models.response_body_string import ResponseBodyString
|
|
from board_mate.game.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://boardmate_api
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = board_mate.game.Configuration(
|
|
host = "https://boardmate_api"
|
|
)
|
|
|
|
|
|
# Enter a context with an instance of the API client
|
|
with board_mate.game.ApiClient(configuration) as api_client:
|
|
# Create an instance of the API class
|
|
api_instance = board_mate.game.GameApi(api_client)
|
|
game_id = 'game_id_example' # str |
|
|
move_dto = board_mate.game.MoveDto() # MoveDto |
|
|
|
|
try:
|
|
# POST moves/add/{gameId}
|
|
api_response = api_instance.add_move(game_id, move_dto)
|
|
print("The response of GameApi->add_move:\n")
|
|
pprint(api_response)
|
|
except Exception as e:
|
|
print("Exception when calling GameApi->add_move: %s\n" % e)
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**game_id** | **str**| |
|
|
**move_dto** | [**MoveDto**](MoveDto.md)| |
|
|
|
|
### Return type
|
|
|
|
[**ResponseBodyString**](ResponseBodyString.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: */*
|
|
|
|
### HTTP response details
|
|
| Status code | Description | Response headers |
|
|
|-------------|-------------|------------------|
|
|
**200** | OK | - |
|
|
|
|
[[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_party**
|
|
> ResponseBodyString create_party(game_dto)
|
|
|
|
POST create
|
|
|
|
### Example
|
|
|
|
```python
|
|
import time
|
|
import os
|
|
import board_mate.game
|
|
from board_mate.game.models.game_dto import GameDto
|
|
from board_mate.game.models.response_body_string import ResponseBodyString
|
|
from board_mate.game.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://boardmate_api
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = board_mate.game.Configuration(
|
|
host = "https://boardmate_api"
|
|
)
|
|
|
|
|
|
# Enter a context with an instance of the API client
|
|
with board_mate.game.ApiClient(configuration) as api_client:
|
|
# Create an instance of the API class
|
|
api_instance = board_mate.game.GameApi(api_client)
|
|
game_dto = board_mate.game.GameDto() # GameDto |
|
|
|
|
try:
|
|
# POST create
|
|
api_response = api_instance.create_party(game_dto)
|
|
print("The response of GameApi->create_party:\n")
|
|
pprint(api_response)
|
|
except Exception as e:
|
|
print("Exception when calling GameApi->create_party: %s\n" % e)
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**game_dto** | [**GameDto**](GameDto.md)| |
|
|
|
|
### Return type
|
|
|
|
[**ResponseBodyString**](ResponseBodyString.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: */*
|
|
|
|
### HTTP response details
|
|
| Status code | Description | Response headers |
|
|
|-------------|-------------|------------------|
|
|
**200** | OK | - |
|
|
|
|
[[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)
|
|
|
|
# **retrieve_games**
|
|
> ResponseBodyGameDto retrieve_games(id)
|
|
|
|
GET games/{id}
|
|
|
|
### Example
|
|
|
|
```python
|
|
import time
|
|
import os
|
|
import board_mate.game
|
|
from board_mate.game.models.response_body_game_dto import ResponseBodyGameDto
|
|
from board_mate.game.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://boardmate_api
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = board_mate.game.Configuration(
|
|
host = "https://boardmate_api"
|
|
)
|
|
|
|
|
|
# Enter a context with an instance of the API client
|
|
with board_mate.game.ApiClient(configuration) as api_client:
|
|
# Create an instance of the API class
|
|
api_instance = board_mate.game.GameApi(api_client)
|
|
id = 'id_example' # str |
|
|
|
|
try:
|
|
# GET games/{id}
|
|
api_response = api_instance.retrieve_games(id)
|
|
print("The response of GameApi->retrieve_games:\n")
|
|
pprint(api_response)
|
|
except Exception as e:
|
|
print("Exception when calling GameApi->retrieve_games: %s\n" % e)
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **str**| |
|
|
|
|
### Return type
|
|
|
|
[**ResponseBodyGameDto**](ResponseBodyGameDto.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: */*
|
|
|
|
### HTTP response details
|
|
| Status code | Description | Response headers |
|
|
|-------------|-------------|------------------|
|
|
**200** | OK | - |
|
|
|
|
[[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)
|
|
|