398 lines
10 KiB
Markdown
398 lines
10 KiB
Markdown
# 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)
|
|
|