# FacePokerApi.ParticipantApi

All URIs are relative to *https://virtserver.swaggerhub.com/krzynool/FacePokerSwag/1.0.0*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addPlayer**](ParticipantApi.md#addPlayer) | **POST** /table/{tableId}/player | Add a player
[**deletePlayer**](ParticipantApi.md#deletePlayer) | **DELETE** /table/{tableId}/player/{playerId} | Delete a player
[**editPlayer**](ParticipantApi.md#editPlayer) | **PUT** /table/{tableId}/player/{playerId} | Edit a player
[**getPlayer**](ParticipantApi.md#getPlayer) | **GET** /table/{tableId}/player/{playerId} | Edit a player


<a name="addPlayer"></a>
# **addPlayer**
> addPlayer(authorization, tableId, body)

Add a player

### Example
```javascript
var FacePokerApi = require('face_poker_api');

var apiInstance = new FacePokerApi.ParticipantApi();

var authorization = "authorization_example"; // String | Bearer token of the table admin

var tableId = "tableId_example"; // String | ID of table

var body = new FacePokerApi.Participant(); // Participant | Player parameters

apiInstance.addPlayer(authorization, tableId, body).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **authorization** | **String**| Bearer token of the table admin | 
 **tableId** | **String**| ID of table | 
 **body** | [**Participant**](Participant.md)| Player parameters | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="deletePlayer"></a>
# **deletePlayer**
> deletePlayer(authorization, tableId, playerId)

Delete a player

### Example
```javascript
var FacePokerApi = require('face_poker_api');

var apiInstance = new FacePokerApi.ParticipantApi();

var authorization = "authorization_example"; // String | Bearer token of the table admin

var tableId = "tableId_example"; // String | ID of table

var playerId = "playerId_example"; // String | ID of the player

apiInstance.deletePlayer(authorization, tableId, playerId).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **authorization** | **String**| Bearer token of the table admin | 
 **tableId** | **String**| ID of table | 
 **playerId** | **String**| ID of the player | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="editPlayer"></a>
# **editPlayer**
> editPlayer(authorization, tableId, playerId, body)

Edit a player

### Example
```javascript
var FacePokerApi = require('face_poker_api');

var apiInstance = new FacePokerApi.ParticipantApi();

var authorization = "authorization_example"; // String | Should be admin bearer token

var tableId = "tableId_example"; // String | ID of table

var playerId = "playerId_example"; // String | ID of the player

var body = new FacePokerApi.Participant(); // Participant | Player parameters

apiInstance.editPlayer(authorization, tableId, playerId, body).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **authorization** | **String**| Should be admin bearer token | 
 **tableId** | **String**| ID of table | 
 **playerId** | **String**| ID of the player | 
 **body** | [**Participant**](Participant.md)| Player parameters | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getPlayer"></a>
# **getPlayer**
> Participant getPlayer(tableId, playerId)

Edit a player

### Example
```javascript
var FacePokerApi = require('face_poker_api');

var apiInstance = new FacePokerApi.ParticipantApi();

var tableId = "tableId_example"; // String | ID of table

var playerId = "playerId_example"; // String | ID of the player

apiInstance.getPlayer(tableId, playerId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **tableId** | **String**| ID of table | 
 **playerId** | **String**| ID of the player | 

### Return type

[**Participant**](Participant.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

