# FacePokerApi.CandidateApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**addCandidate**](CandidateApi.md#addCandidate) | **POST** /table/{tableId}/candidate | Request to play
[**deleteCandidate**](CandidateApi.md#deleteCandidate) | **DELETE** /table/{tableId}/candidate/{candidateId} | See all player requests
[**getCandidates**](CandidateApi.md#getCandidates) | **GET** /table/{tableId}/candidate | See all player requests


<a name="addCandidate"></a>
# **addCandidate**
> Candidate addCandidate(tableId, body)

Request to play

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

var apiInstance = new FacePokerApi.CandidateApi();

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

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

apiInstance.addCandidate(tableId, body).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 | 
 **body** | [**Candidate**](Candidate.md)| Candidate parameters | 

### Return type

[**Candidate**](Candidate.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="deleteCandidate"></a>
# **deleteCandidate**
> deleteCandidate(authorization, tableId, candidateId)

See all player requests

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

var apiInstance = new FacePokerApi.CandidateApi();

var authorization = "authorization_example"; // String | Bearer token of the table admin or your own to delete yourself

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

var candidateId = "candidateId_example"; // String | ID of the candidate

apiInstance.deleteCandidate(authorization, tableId, candidateId).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 or your own to delete yourself | 
 **tableId** | **String**| ID of table | 
 **candidateId** | **String**| ID of the candidate | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getCandidates"></a>
# **getCandidates**
> [Candidate] getCandidates(authorization, tableId)

See all player requests

We should limit the candidates to some number that would not require pagination like 10

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

var apiInstance = new FacePokerApi.CandidateApi();

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

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

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

```

### Parameters

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

### Return type

[**[Candidate]**](Candidate.md)

### Authorization

No authorization required

### HTTP request headers

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

