# SdPublicProdApi.TemplateEndpointsApi

All URIs are relative to *https://core-api.stardust.gg/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**templateCountGet**](TemplateEndpointsApi.md#templateCountGet) | **GET** /template/count | Get Template Count
[**templateCreateBulkPost**](TemplateEndpointsApi.md#templateCreateBulkPost) | **POST** /template/create-bulk | Create Templates
[**templateCreatePost**](TemplateEndpointsApi.md#templateCreatePost) | **POST** /template/create | Create Template
[**templateGetAllGet**](TemplateEndpointsApi.md#templateGetAllGet) | **GET** /template/get-all | Get All Templates
[**templateGetGet**](TemplateEndpointsApi.md#templateGetGet) | **GET** /template/get | Get Template
[**templateGetTokensGet**](TemplateEndpointsApi.md#templateGetTokensGet) | **GET** /template/get-tokens | Get Template Tokens
[**templateMutatePut**](TemplateEndpointsApi.md#templateMutatePut) | **PUT** /template/mutate | Mutate Template
[**templatePropsRemoveDelete**](TemplateEndpointsApi.md#templatePropsRemoveDelete) | **DELETE** /template/props-remove | Remove Template Property
[**templateRemoveDelete**](TemplateEndpointsApi.md#templateRemoveDelete) | **DELETE** /template/remove | Remove Template

<a name="templateCountGet"></a>
# **templateCountGet**
> SDTemplateCountResponse templateCountGet(opts)

Get Template Count

Get a Template&#x27;s Count Within a Game

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let opts = { 
  'filter': "filter_example" // String | Find a substring within the Template name field
};
apiInstance.templateCountGet(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **filter** | **String**| Find a substring within the Template name field | [optional] 

### Return type

[**SDTemplateCountResponse**](SDTemplateCountResponse.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

<a name="templateCreateBulkPost"></a>
# **templateCreateBulkPost**
> SDTemplateCreateBulkResponse templateCreateBulkPost(body)

Create Templates

Create Multiple Templates at Once

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let body = new SdPublicProdApi.SDTemplateCreateBulkRequest(); // SDTemplateCreateBulkRequest | 

apiInstance.templateCreateBulkPost(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**SDTemplateCreateBulkRequest**](SDTemplateCreateBulkRequest.md)|  | 

### Return type

[**SDTemplateCreateBulkResponse**](SDTemplateCreateBulkResponse.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

<a name="templateCreatePost"></a>
# **templateCreatePost**
> SDTemplateCreateResponse templateCreatePost(body)

Create Template

Adds a New Token Template that lets Players Acquire that Token using the Token/Mint Endpoint

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let body = new SdPublicProdApi.SDTemplateCreateRequest(); // SDTemplateCreateRequest | 

apiInstance.templateCreatePost(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**SDTemplateCreateRequest**](SDTemplateCreateRequest.md)|  | 

### Return type

[**SDTemplateCreateResponse**](SDTemplateCreateResponse.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

<a name="templateGetAllGet"></a>
# **templateGetAllGet**
> SDTemplateGetAllResponses templateGetAllGet(start, limit, opts)

Get All Templates

Get All of the Templates Within a Game

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let start = "start_example"; // String | position in list
let limit = "limit_example"; // String | maximum templates returned in list
let opts = { 
  'filter': "filter_example" // String | Find a substring within the Template name field
};
apiInstance.templateGetAllGet(start, limit, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **start** | **String**| position in list | 
 **limit** | **String**| maximum templates returned in list | 
 **filter** | **String**| Find a substring within the Template name field | [optional] 

### Return type

[**SDTemplateGetAllResponses**](SDTemplateGetAllResponses.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

<a name="templateGetGet"></a>
# **templateGetGet**
> SDTemplateGetResponse templateGetGet(templateId)

Get Template

Get the Details of a Template

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let templateId = "templateId_example"; // String | Template Id such as 3589)

apiInstance.templateGetGet(templateId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **templateId** | **String**| Template Id such as 3589) | 

### Return type

[**SDTemplateGetResponse**](SDTemplateGetResponse.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

<a name="templateGetTokensGet"></a>
# **templateGetTokensGet**
> SDTemplateGetTokensResponses templateGetTokensGet(templateId, opts)

Get Template Tokens

Get a List of All Minted Tokens from a Given Template

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let templateId = "templateId_example"; // String | The ID of the Template
let opts = { 
  'start': "start_example", // String | position in list
  'limit': "limit_example" // String | maximum templates returned in list
};
apiInstance.templateGetTokensGet(templateId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **templateId** | **String**| The ID of the Template | 
 **start** | **String**| position in list | [optional] 
 **limit** | **String**| maximum templates returned in list | [optional] 

### Return type

[**SDTemplateGetTokensResponses**](SDTemplateGetTokensResponses.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

<a name="templateMutatePut"></a>
# **templateMutatePut**
> Empty templateMutatePut(body)

Mutate Template

Mutates a Property of a Template, Which in Turn will Affect the Inherited Property on All of the Tokens Created from this Template (via token/mint)

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let body = new SdPublicProdApi.SDTemplateMutateRequest(); // SDTemplateMutateRequest | 

apiInstance.templateMutatePut(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**SDTemplateMutateRequest**](SDTemplateMutateRequest.md)|  | 

### Return type

[**Empty**](Empty.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

<a name="templatePropsRemoveDelete"></a>
# **templatePropsRemoveDelete**
> Empty templatePropsRemoveDelete(templateId, props)

Remove Template Property

Removes a Templates Property from Your Game

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let templateId = "templateId_example"; // String | Template Id returned from template/create (ex. 5)
let props = "props_example"; // String | Stringify Array of template mutable property names ex: '[\"exp\", \"health\"]' }

apiInstance.templatePropsRemoveDelete(templateId, props, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **templateId** | **String**| Template Id returned from template/create (ex. 5) | 
 **props** | **String**| Stringify Array of template mutable property names ex: &#x27;[\&quot;exp\&quot;, \&quot;health\&quot;]&#x27; } | 

### Return type

[**Empty**](Empty.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

<a name="templateRemoveDelete"></a>
# **templateRemoveDelete**
> Empty templateRemoveDelete(templateId)

Remove Template

Removes a Template from Your Game. If Players have Instances of this Template from the token/mint Command, Their Tokens will NOT be Removed

### Example
```javascript
import {SdPublicProdApi} from 'sd_public_prod_api';
let defaultClient = SdPublicProdApi.ApiClient.instance;

// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

let apiInstance = new SdPublicProdApi.TemplateEndpointsApi();
let templateId = "templateId_example"; // String | Template Id returned from template/create (ex. 5)

apiInstance.templateRemoveDelete(templateId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **templateId** | **String**| Template Id returned from template/create (ex. 5) | 

### Return type

[**Empty**](Empty.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

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

