# FacePokerApi.TableApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**createTable**](TableApi.md#createTable) | **POST** /table | Create new table
[**getTable**](TableApi.md#getTable) | **GET** /table/{tableId} | Fetch existing table by ID
[**updateTable**](TableApi.md#updateTable) | **PUT** /table/{tableId} | Update an existing table


<a name="createTable"></a>
# **createTable**
> InlineResponse201 createTable(newTable)

Create new table

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

var apiInstance = new FacePokerApi.TableApi();

var newTable = new FacePokerApi.NewTable(); // NewTable | The Table to create.

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

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **newTable** | [**NewTable**](NewTable.md)| The Table to create. | 

### Return type

[**InlineResponse201**](InlineResponse201.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="getTable"></a>
# **getTable**
> Table getTable(authorization, tableId)

Fetch existing table by ID

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

var apiInstance = new FacePokerApi.TableApi();

var authorization = "authorization_example"; // String | Bearer token

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

apiInstance.getTable(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 | 
 **tableId** | **String**| ID of table to fetch | 

### Return type

[**Table**](Table.md)

### Authorization

No authorization required

### HTTP request headers

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

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

Update an existing table

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

var apiInstance = new FacePokerApi.TableApi();

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

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

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

apiInstance.updateTable(authorization, tableId, body).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 to update | 
 **body** | [**Table**](Table.md)| Table object parameters | 

### Return type

[**Table**](Table.md)

### Authorization

No authorization required

### HTTP request headers

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

