Dump off the swaggerIo generator with tests removed and fix for Round->loser and Round->dicerolls

This commit is contained in:
Tim
2021-11-25 18:24:54 +01:00
commit 8d925075da
30 changed files with 7795 additions and 0 deletions

397
docs/Api/DefaultApi.md Normal file
View File

@ -0,0 +1,397 @@
# Swagger\Client\DefaultApi
All URIs are relative to */*
Method | HTTP request | Description
------------- | ------------- | -------------
[**callTurn**](DefaultApi.md#callturn) | **POST** /player/call/{player} |
[**createGame**](DefaultApi.md#creategame) | **GET** /game/create |
[**gameIsStarted**](DefaultApi.md#gameisstarted) | **GET** /game/started/{player} |
[**getTurn**](DefaultApi.md#getturn) | **GET** /player/turn/{player} |
[**joinGame**](DefaultApi.md#joingame) | **GET** /game/join/{code} |
[**postTurn**](DefaultApi.md#postturn) | **POST** /player/guess/{player} |
[**setGameRules**](DefaultApi.md#setgamerules) | **POST** /game/rules/{player} |
[**startGame**](DefaultApi.md#startgame) | **GET** /game/start/{player} |
# **callTurn**
> \Swagger\Client\Model\MyTurn callTurn($player)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$player = "player_example"; // string |
try {
$result = $apiInstance->callTurn($player);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->callTurn: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**player** | **string**| |
### Return type
[**\Swagger\Client\Model\MyTurn**](../Model/MyTurn.md)
### Authorization
No authorization required
### 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)
# **createGame**
> \Swagger\Client\Model\PlayerCode createGame($name)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$name = "name_example"; // string |
try {
$result = $apiInstance->createGame($name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->createGame: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **string**| |
### Return type
[**\Swagger\Client\Model\PlayerCode**](../Model/PlayerCode.md)
### Authorization
No authorization required
### 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)
# **gameIsStarted**
> \Swagger\Client\Model\GameIsStarted gameIsStarted($player)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$player = "player_example"; // string |
try {
$result = $apiInstance->gameIsStarted($player);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->gameIsStarted: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**player** | **string**| |
### Return type
[**\Swagger\Client\Model\GameIsStarted**](../Model/GameIsStarted.md)
### Authorization
No authorization required
### 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)
# **getTurn**
> \Swagger\Client\Model\MyTurn getTurn($player)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$player = "player_example"; // string |
try {
$result = $apiInstance->getTurn($player);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getTurn: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**player** | **string**| |
### Return type
[**\Swagger\Client\Model\MyTurn**](../Model/MyTurn.md)
### Authorization
No authorization required
### 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)
# **joinGame**
> \Swagger\Client\Model\PlayerCode joinGame($name, $code)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$name = "name_example"; // string |
$code = "code_example"; // string |
try {
$result = $apiInstance->joinGame($name, $code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->joinGame: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **string**| |
**code** | **string**| |
### Return type
[**\Swagger\Client\Model\PlayerCode**](../Model/PlayerCode.md)
### Authorization
No authorization required
### 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)
# **postTurn**
> \Swagger\Client\Model\MyTurn postTurn($player, $body)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$player = "player_example"; // string |
$body = new \Swagger\Client\Model\PlayerGuess(); // \Swagger\Client\Model\PlayerGuess |
try {
$result = $apiInstance->postTurn($player, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->postTurn: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**player** | **string**| |
**body** | [**\Swagger\Client\Model\PlayerGuess**](../Model/PlayerGuess.md)| | [optional]
### Return type
[**\Swagger\Client\Model\MyTurn**](../Model/MyTurn.md)
### Authorization
No authorization required
### 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)
# **setGameRules**
> \Swagger\Client\Model\MessageResponse setGameRules($player, $body)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$player = "player_example"; // string |
$body = new \Swagger\Client\Model\GameRules(); // \Swagger\Client\Model\GameRules |
try {
$result = $apiInstance->setGameRules($player, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->setGameRules: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**player** | **string**| |
**body** | [**\Swagger\Client\Model\GameRules**](../Model/GameRules.md)| | [optional]
### Return type
[**\Swagger\Client\Model\MessageResponse**](../Model/MessageResponse.md)
### Authorization
No authorization required
### 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)
# **startGame**
> \Swagger\Client\Model\MessageResponse startGame($player)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$player = "player_example"; // string |
try {
$result = $apiInstance->startGame($player);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->startGame: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**player** | **string**| |
### Return type
[**\Swagger\Client\Model\MessageResponse**](../Model/MessageResponse.md)
### Authorization
No authorization required
### 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)

View File

@ -0,0 +1,8 @@
# AllOfRoundLoser
## 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)

View File

@ -0,0 +1,10 @@
# GameIsStarted
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**started** | **bool** | | [optional]
**game_state** | [**\Swagger\Client\Model\GameState**](GameState.md) | | [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)

15
docs/Model/GameRules.md Normal file
View File

@ -0,0 +1,15 @@
# GameRules
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**start_dice_per_player** | **int** | | [optional]
**higher_count_lower_value** | **bool** | | [optional]
**joker_counts_double** | **bool** | | [optional]
**has_joker** | **bool** | | [optional]
**has_palifico** | **bool** | | [optional]
**has_calza** | **bool** | | [optional]
**joker_die_value** | **int** | | [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)

15
docs/Model/GameState.md Normal file
View File

@ -0,0 +1,15 @@
# GameState
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**state** | **string** | | [optional]
**code** | **string** | | [optional]
**rounds** | [**\Swagger\Client\Model\Round[]**](Round.md) | | [optional]
**players** | [**\Swagger\Client\Model\Player[]**](Player.md) | | [optional]
**current_player** | [**\Swagger\Client\Model\Player**](Player.md) | | [optional]
**owning_player** | [**\Swagger\Client\Model\Player**](Player.md) | | [optional]
**rules** | [**\Swagger\Client\Model\GameRules**](GameRules.md) | | [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)

View File

@ -0,0 +1,10 @@
# MessageResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **string** | | [optional]
**errors** | **string[]** | | [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)

11
docs/Model/MyTurn.md Normal file
View File

@ -0,0 +1,11 @@
# MyTurn
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**turn** | **bool** | | [optional]
**game_state** | [**\Swagger\Client\Model\GameState**](GameState.md) | | [optional]
**errors** | **string[]** | | [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)

11
docs/Model/Player.md Normal file
View File

@ -0,0 +1,11 @@
# Player
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**hash** | **string** | | [optional]
**name** | **string** | | [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)

11
docs/Model/PlayerCode.md Normal file
View File

@ -0,0 +1,11 @@
# PlayerCode
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**player** | [**\Swagger\Client\Model\Player**](Player.md) | | [optional]
**code** | **string** | | [optional]
**errors** | **string[]** | | [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)

10
docs/Model/PlayerGuess.md Normal file
View File

@ -0,0 +1,10 @@
# PlayerGuess
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**dice_count** | **int** | |
**die_value** | **int** | |
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

13
docs/Model/Round.md Normal file
View File

@ -0,0 +1,13 @@
# Round
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**number** | **int** | | [optional]
**turns** | [**\Swagger\Client\Model\Turn[]**](Turn.md) | | [optional]
**loser** | [**AllOfRoundLoser**](AllOfRoundLoser.md) | | [optional]
**my_rolls** | [**int[][]**](array.md) | | [optional]
**rolls** | **int[]** | | [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)

12
docs/Model/Turn.md Normal file
View File

@ -0,0 +1,12 @@
# Turn
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**number** | **int** | | [optional]
**player** | [**\Swagger\Client\Model\Player**](Player.md) | | [optional]
**dice_count** | **int** | | [optional]
**die_value** | **int** | | [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)