# ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi

All URIs are relative to *http://localhost/gemini-web/rest*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteTranslationContent**](TranslatorApi.md#deleteTranslationContent) | **DELETE** /translator/contents/{id} | delete resource
[**exportTranslationsAsXml**](TranslatorApi.md#exportTranslationsAsXml) | **GET** /translator/contents | Exports to XML
[**exportTranslationsToFile**](TranslatorApi.md#exportTranslationsToFile) | **GET** /translator/contents/export | Exports to XML
[**fullUpdateTranslationContent**](TranslatorApi.md#fullUpdateTranslationContent) | **PUT** /translator/contents/{id} | update resource
[**getAllTranslations**](TranslatorApi.md#getAllTranslations) | **GET** /translator/translations | Get information about a scope
[**getLanguages**](TranslatorApi.md#getLanguages) | **GET** /translator/languages | get list of resources
[**getSingleTranslationContent**](TranslatorApi.md#getSingleTranslationContent) | **GET** /translator/contents/{id} | get resource
[**importCsv**](TranslatorApi.md#importCsv) | **POST** /translator/contents | Imports CSV
[**updateTranslationContent**](TranslatorApi.md#updateTranslationContent) | **POST** /translator/contents/{id} | perform a partial update of the resource


<a name="deleteTranslationContent"></a>
# **deleteTranslationContent**
> deleteTranslationContent(id, opts)

delete resource

Deletes a single resource.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var id = 789; // Number | The ID of the resource.

var opts = { 
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteTranslationContent(id, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**| The ID of the resource. | 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

<a name="exportTranslationsAsXml"></a>
# **exportTranslationsAsXml**
> &#39;String&#39; exportTranslationsAsXml(opts)

Exports to XML

Exports translations to a String of XML syntax.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var opts = { 
  'language': "language_example", // String | The language that should be exported
  'buildDate': new Date("2013-10-20T19:20:30+01:00"), // Date | The build date used for the exported XML
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.exportTranslationsAsXml(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **language** | **String**| The language that should be exported | [optional] 
 **buildDate** | **Date**| The build date used for the exported XML | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

**&#39;String&#39;**

### Authorization

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

### HTTP request headers

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

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

Exports to XML

Exports translations to XML file.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var opts = { 
  'type': "xml", // String | The type to export; currently only XML is supported
  'language': "language_example", // String | The language that should be exported.
  'buildDate': new Date("2013-10-20T19:20:30+01:00"), // Date | The build date used for the exported translations.
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.exportTranslationsToFile(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **type** | **String**| The type to export; currently only XML is supported | [optional] [default to xml]
 **language** | **String**| The language that should be exported. | [optional] 
 **buildDate** | **Date**| The build date used for the exported translations. | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="fullUpdateTranslationContent"></a>
# **fullUpdateTranslationContent**
> fullUpdateTranslationContent(id, body, opts)

update resource

Updates an item with the given ID. The request body has to contain the whole data-object since this is a full update operation.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var id = 789; // Number | The ID of the resource.

var body = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslationContentJson(); // TranslationContentJson | The resource to update.

var opts = { 
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.fullUpdateTranslationContent(id, body, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**| The ID of the resource. | 
 **body** | [**TranslationContentJson**](TranslationContentJson.md)| The resource to update. | 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

<a name="getAllTranslations"></a>
# **getAllTranslations**
> [TranslationJson] getAllTranslations(opts)

Get information about a scope

Retrieves a single scope by fully qualified name. Returns all variables visible in this scope.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var opts = { 
  'language': "language_example", // String | The language of the translation.
  'scope': "scope_example", // String | The scope of the translation.
  'key': "key_example", // String | The key of the translation.
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAllTranslations(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **language** | **String**| The language of the translation. | [optional] 
 **scope** | **String**| The scope of the translation. | [optional] 
 **key** | **String**| The key of the translation. | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

[**[TranslationJson]**](TranslationJson.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="getLanguages"></a>
# **getLanguages**
> LanguageRestResultPage getLanguages(opts)

get list of resources

Gets a list of resources.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var opts = { 
  'limit': 56, // Number | An integer which is the limit (max number) of returned records (used for pagination).
  'offset': 56, // Number | An integer (< list-size-1) that is the offset of the first record to transmit (used for pagination).
  'page': 56, // Number | An integer that designates the pagenumber of the first record to transmit (used for pagination).
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getLanguages(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **limit** | **Number**| An integer which is the limit (max number) of returned records (used for pagination). | [optional] 
 **offset** | **Number**| An integer (&lt; list-size-1) that is the offset of the first record to transmit (used for pagination). | [optional] 
 **page** | **Number**| An integer that designates the pagenumber of the first record to transmit (used for pagination). | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

[**LanguageRestResultPage**](LanguageRestResultPage.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="getSingleTranslationContent"></a>
# **getSingleTranslationContent**
> TranslationContentJson getSingleTranslationContent(id, opts)

get resource

Gets a single resource.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var id = 789; // Number | The ID of the resource.

var opts = { 
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getSingleTranslationContent(id, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**| The ID of the resource. | 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

[**TranslationContentJson**](TranslationContentJson.md)

### Authorization

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

### HTTP request headers

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

<a name="importCsv"></a>
# **importCsv**
> importCsv(body, language, opts)

Imports CSV

Imports translations from a String with CSV syntax.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var body = "body_example"; // String | A string containing translations in CSV syntax.

var language = "language_example"; // String | The language for this import.

var opts = { 
  'transactionId': "transactionId_example", // String | A unique transaction ID used for idempotent inserts.
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.importCsv(body, language, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | **String**| A string containing translations in CSV syntax. | 
 **language** | **String**| The language for this import. | 
 **transactionId** | **String**| A unique transaction ID used for idempotent inserts. | [optional] 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: text/csv
 - **Accept**: Not defined

<a name="updateTranslationContent"></a>
# **updateTranslationContent**
> updateTranslationContent(id, body, opts)

perform a partial update of the resource

Updates only the given values of an existing resource.

### Example
```javascript
var ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail = require('this_is_the_documentation_of_the_rest_interfaces_provided_by_nts_retail');
var defaultClient = ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.ApiClient.instance;

// Configure OAuth2 access token for authorization: gemini_auth
var gemini_auth = defaultClient.authentications['gemini_auth'];
gemini_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.TranslatorApi();

var id = 789; // Number | The ID of the resource.

var body = new ThisIsTheDocumentationOfTheRestInterfacesProvidedByNtsRetail.JsonNode(); // JsonNode | The partial JSON containing the fields of the item that should be updated.

var opts = { 
  'shortToken': "shortToken_example" // String | A temporary short token which can be used as an alternative to the JWT.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateTranslationContent(id, body, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**| The ID of the resource. | 
 **body** | [**JsonNode**](JsonNode.md)| The partial JSON containing the fields of the item that should be updated. | 
 **shortToken** | **String**| A temporary short token which can be used as an alternative to the JWT. | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

