regenerated sdk
This commit is contained in:
Родитель
18026c0efa
Коммит
f96fc175e9
|
@ -122,16 +122,10 @@ export AZURE_FACE_KEY=<service-key>
|
|||
export AZURE_ENTITY_SEARCH_KEY=<service-key>
|
||||
export AZURE_WEB_SEARCH_KEY=<service-key>
|
||||
export AZURE_VIDEO_SEARCH_KEY=<service-key>
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
export AZURE_NEWS_SEARCH_KEY=<service-key>
|
||||
export AZURE_IMAGE_SEARCH_KEY=<service-key>
|
||||
=======
|
||||
export AZURE_CUSTOM_SEARCH_KEY=<service-key>
|
||||
>>>>>>> added test and recordings
|
||||
=======
|
||||
export AZURE_CONTENT_MODERATOR_KEY=<service-key>
|
||||
>>>>>>> generated sdk
|
||||
```
|
||||
|
||||
#### Note: Not all tests require all these environment variables, and if a required one is not set the test will fail and tell you which ones need to be set.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* regenerated.
|
||||
*/
|
||||
|
||||
import { ServiceClient, ServiceClientOptions } from 'ms-rest';
|
||||
import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'ms-rest';
|
||||
import * as operations from "./operations";
|
||||
|
||||
declare class ContentModeratorAPIClient extends ServiceClient {
|
||||
|
@ -17,7 +17,7 @@ declare class ContentModeratorAPIClient extends ServiceClient {
|
|||
* Initializes a new instance of the ContentModeratorAPIClient class.
|
||||
* @constructor
|
||||
*
|
||||
* @param {string} ocpApimSubscriptionKey - The subscription key in header
|
||||
* @param {credentials} credentials - Subscription credentials which uniquely identify client subscription.
|
||||
*
|
||||
* @param {azureRegionBaseUrl} baseUrl - Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'
|
||||
*
|
||||
|
@ -31,9 +31,9 @@ declare class ContentModeratorAPIClient extends ServiceClient {
|
|||
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
|
||||
*
|
||||
*/
|
||||
constructor(ocpApimSubscriptionKey: string, baseUrl: string, options?: ServiceClientOptions);
|
||||
constructor(credentials: ServiceClientCredentials, baseUrl: string, options?: ServiceClientOptions);
|
||||
|
||||
ocpApimSubscriptionKey: string;
|
||||
credentials: ServiceClientCredentials;
|
||||
|
||||
baseUrl: string;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ const operations = require('./operations');
|
|||
class ContentModeratorAPIClient extends ServiceClient {
|
||||
/**
|
||||
* Create a ContentModeratorAPIClient.
|
||||
* @param {string} ocpApimSubscriptionKey - The subscription key in header
|
||||
* @param {credentials} credentials - Subscription credentials which uniquely identify client subscription.
|
||||
* @param {azureRegionBaseUrl} baseUrl - Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'
|
||||
* @param {object} [options] - The parameter options
|
||||
* @param {Array} [options.filters] - Filters to be added to the request pipeline
|
||||
|
@ -33,9 +33,9 @@ class ContentModeratorAPIClient extends ServiceClient {
|
|||
* {@link https://github.com/request/request#requestoptions-callback Options doc}
|
||||
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
|
||||
*/
|
||||
constructor(ocpApimSubscriptionKey, baseUrl, options) {
|
||||
if (ocpApimSubscriptionKey === null || ocpApimSubscriptionKey === undefined) {
|
||||
throw new Error('\'ocpApimSubscriptionKey\' cannot be null.');
|
||||
constructor(credentials, baseUrl, options) {
|
||||
if (credentials === null || credentials === undefined) {
|
||||
throw new Error('\'credentials\' cannot be null.');
|
||||
}
|
||||
if (baseUrl === null || baseUrl === undefined) {
|
||||
throw new Error('\'baseUrl\' cannot be null.');
|
||||
|
@ -43,10 +43,10 @@ class ContentModeratorAPIClient extends ServiceClient {
|
|||
|
||||
if (!options) options = {};
|
||||
|
||||
super(null, options);
|
||||
super(credentials, options);
|
||||
|
||||
this.baseUri = 'https://{baseUrl}';
|
||||
this.ocpApimSubscriptionKey = ocpApimSubscriptionKey;
|
||||
this.credentials = credentials;
|
||||
this.baseUrl = baseUrl;
|
||||
|
||||
let packageInfo = this.getPackageJsonInfo(__dirname);
|
||||
|
|
|
@ -56,9 +56,6 @@ function _findFaces(options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -82,9 +79,6 @@ function _findFaces(options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -210,9 +204,6 @@ function _oCRMethod(language, options, callback) {
|
|||
if (enhanced !== null && enhanced !== undefined && typeof enhanced !== 'boolean') {
|
||||
throw new Error('enhanced must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -240,9 +231,6 @@ function _oCRMethod(language, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -351,9 +339,6 @@ function _evaluateMethod(options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -377,9 +362,6 @@ function _evaluateMethod(options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -502,9 +484,6 @@ function _matchMethod(options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -531,9 +510,6 @@ function _matchMethod(options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -644,9 +620,6 @@ function _findFacesFileInput(imageStream, options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (imageStream === null || imageStream === undefined) {
|
||||
throw new Error('imageStream cannot be null or undefined and it must be of type object.');
|
||||
}
|
||||
|
@ -673,9 +646,6 @@ function _findFacesFileInput(imageStream, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'image/gif';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -794,9 +764,6 @@ function _findFacesUrlInput(contentType, imageUrl, options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (contentType === null || contentType === undefined || typeof contentType.valueOf() !== 'string') {
|
||||
throw new Error('contentType cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -826,9 +793,6 @@ function _findFacesUrlInput(contentType, imageUrl, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
|
@ -979,9 +943,6 @@ function _oCRUrlInput(language, contentType, imageUrl, options, callback) {
|
|||
if (enhanced !== null && enhanced !== undefined && typeof enhanced !== 'boolean') {
|
||||
throw new Error('enhanced must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (contentType === null || contentType === undefined || typeof contentType.valueOf() !== 'string') {
|
||||
throw new Error('contentType cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -1015,9 +976,6 @@ function _oCRUrlInput(language, contentType, imageUrl, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
|
@ -1162,9 +1120,6 @@ function _oCRFileInput(language, imageStream, options, callback) {
|
|||
if (enhanced !== null && enhanced !== undefined && typeof enhanced !== 'boolean') {
|
||||
throw new Error('enhanced must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (imageStream === null || imageStream === undefined) {
|
||||
throw new Error('imageStream cannot be null or undefined and it must be of type object.');
|
||||
}
|
||||
|
@ -1195,9 +1150,6 @@ function _oCRFileInput(language, imageStream, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'image/gif';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -1310,9 +1262,6 @@ function _evaluateFileInput(imageStream, options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (imageStream === null || imageStream === undefined) {
|
||||
throw new Error('imageStream cannot be null or undefined and it must be of type object.');
|
||||
}
|
||||
|
@ -1339,9 +1288,6 @@ function _evaluateFileInput(imageStream, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'image/gif';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -1460,9 +1406,6 @@ function _evaluateUrlInput(contentType, imageUrl, options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (contentType === null || contentType === undefined || typeof contentType.valueOf() !== 'string') {
|
||||
throw new Error('contentType cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -1492,9 +1435,6 @@ function _evaluateUrlInput(contentType, imageUrl, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
|
@ -1642,9 +1582,6 @@ function _matchUrlInput(contentType, imageUrl, options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (contentType === null || contentType === undefined || typeof contentType.valueOf() !== 'string') {
|
||||
throw new Error('contentType cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -1677,9 +1614,6 @@ function _matchUrlInput(contentType, imageUrl, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
|
@ -1821,9 +1755,6 @@ function _matchFileInput(imageStream, options, callback) {
|
|||
if (cacheImage !== null && cacheImage !== undefined && typeof cacheImage !== 'boolean') {
|
||||
throw new Error('cacheImage must be of type boolean.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (imageStream === null || imageStream === undefined) {
|
||||
throw new Error('imageStream cannot be null or undefined and it must be of type object.');
|
||||
}
|
||||
|
@ -1853,9 +1784,6 @@ function _matchFileInput(imageStream, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'image/gif';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
|
|
@ -66,9 +66,6 @@ function _addImage(listId, options, callback) {
|
|||
if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') {
|
||||
throw new Error('label must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -96,9 +93,6 @@ function _addImage(listId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -204,9 +198,6 @@ function _deleteAllImages(listId, options, callback) {
|
|||
if (listId === null || listId === undefined || typeof listId.valueOf() !== 'string') {
|
||||
throw new Error('listId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -224,9 +215,6 @@ function _deleteAllImages(listId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -339,9 +327,6 @@ function _getAllImageIds(listId, options, callback) {
|
|||
if (listId === null || listId === undefined || typeof listId.valueOf() !== 'string') {
|
||||
throw new Error('listId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -359,9 +344,6 @@ function _getAllImageIds(listId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -472,9 +454,6 @@ function _deleteImage(listId, imageId, options, callback) {
|
|||
if (imageId === null || imageId === undefined || typeof imageId.valueOf() !== 'string') {
|
||||
throw new Error('imageId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -493,9 +472,6 @@ function _deleteImage(listId, imageId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -628,9 +604,6 @@ function _addImageUrlInput(listId, contentType, imageUrl, options, callback) {
|
|||
if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') {
|
||||
throw new Error('label must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (contentType === null || contentType === undefined || typeof contentType.valueOf() !== 'string') {
|
||||
throw new Error('contentType cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -664,9 +637,6 @@ function _addImageUrlInput(listId, contentType, imageUrl, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
|
@ -804,9 +774,6 @@ function _addImageFileInput(listId, imageStream, options, callback) {
|
|||
if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') {
|
||||
throw new Error('label must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (imageStream === null || imageStream === undefined) {
|
||||
throw new Error('imageStream cannot be null or undefined and it must be of type object.');
|
||||
}
|
||||
|
@ -837,9 +804,6 @@ function _addImageFileInput(listId, imageStream, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'image/gif';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
|
|
@ -51,9 +51,6 @@ function _getDetails(listId, options, callback) {
|
|||
if (this.client.baseUrl === null || this.client.baseUrl === undefined || typeof this.client.baseUrl.valueOf() !== 'string') {
|
||||
throw new Error('this.client.baseUrl cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (listId === null || listId === undefined || typeof listId.valueOf() !== 'string') {
|
||||
throw new Error('listId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -74,9 +71,6 @@ function _getDetails(listId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -182,9 +176,6 @@ function _deleteMethod(listId, options, callback) {
|
|||
if (listId === null || listId === undefined || typeof listId.valueOf() !== 'string') {
|
||||
throw new Error('listId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -202,9 +193,6 @@ function _deleteMethod(listId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -339,9 +327,6 @@ function _update(listId, contentType, body, options, callback) {
|
|||
if (body === null || body === undefined) {
|
||||
throw new Error('body cannot be null or undefined.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -362,9 +347,6 @@ function _update(listId, contentType, body, options, callback) {
|
|||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -502,9 +484,6 @@ function _create(contentType, body, options, callback) {
|
|||
if (body === null || body === undefined) {
|
||||
throw new Error('body cannot be null or undefined.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -524,9 +503,6 @@ function _create(contentType, body, options, callback) {
|
|||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -641,9 +617,6 @@ function _getAllImageLists(options, callback) {
|
|||
if (this.client.baseUrl === null || this.client.baseUrl === undefined || typeof this.client.baseUrl.valueOf() !== 'string') {
|
||||
throw new Error('this.client.baseUrl cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -660,9 +633,6 @@ function _getAllImageLists(options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -783,9 +753,6 @@ function _refreshIndexMethod(listId, options, callback) {
|
|||
if (listId === null || listId === undefined || typeof listId.valueOf() !== 'string') {
|
||||
throw new Error('listId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -803,9 +770,6 @@ function _refreshIndexMethod(listId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
|
|
@ -63,9 +63,6 @@ function _addTerm(listId, term, language, options, callback) {
|
|||
if (language === null || language === undefined || typeof language.valueOf() !== 'string') {
|
||||
throw new Error('language cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -89,9 +86,6 @@ function _addTerm(listId, term, language, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -213,9 +207,6 @@ function _deleteTerm(listId, term, language, options, callback) {
|
|||
if (language === null || language === undefined || typeof language.valueOf() !== 'string') {
|
||||
throw new Error('language cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -239,9 +230,6 @@ function _deleteTerm(listId, term, language, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -365,9 +353,6 @@ function _getAllTerms(listId, language, options, callback) {
|
|||
if (language === null || language === undefined || typeof language.valueOf() !== 'string') {
|
||||
throw new Error('language cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (offset !== null && offset !== undefined && typeof offset !== 'number') {
|
||||
throw new Error('offset must be of type number.');
|
||||
}
|
||||
|
@ -402,9 +387,6 @@ function _getAllTerms(listId, language, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -515,9 +497,6 @@ function _deleteAllTerms(listId, language, options, callback) {
|
|||
if (language === null || language === undefined || typeof language.valueOf() !== 'string') {
|
||||
throw new Error('language cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -540,9 +519,6 @@ function _deleteAllTerms(listId, language, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
|
|
@ -55,9 +55,6 @@ function _getDetails(listId, options, callback) {
|
|||
if (listId === null || listId === undefined || typeof listId.valueOf() !== 'string') {
|
||||
throw new Error('listId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -75,9 +72,6 @@ function _getDetails(listId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -183,9 +177,6 @@ function _deleteMethod(listId, options, callback) {
|
|||
if (listId === null || listId === undefined || typeof listId.valueOf() !== 'string') {
|
||||
throw new Error('listId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -203,9 +194,6 @@ function _deleteMethod(listId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -340,9 +328,6 @@ function _update(listId, contentType, body, options, callback) {
|
|||
if (body === null || body === undefined) {
|
||||
throw new Error('body cannot be null or undefined.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -363,9 +348,6 @@ function _update(listId, contentType, body, options, callback) {
|
|||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -503,9 +485,6 @@ function _create(contentType, body, options, callback) {
|
|||
if (body === null || body === undefined) {
|
||||
throw new Error('body cannot be null or undefined.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -525,9 +504,6 @@ function _create(contentType, body, options, callback) {
|
|||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -642,9 +618,6 @@ function _getAllTermLists(options, callback) {
|
|||
if (this.client.baseUrl === null || this.client.baseUrl === undefined || typeof this.client.baseUrl.valueOf() !== 'string') {
|
||||
throw new Error('this.client.baseUrl cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -661,9 +634,6 @@ function _getAllTermLists(options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -786,9 +756,6 @@ function _refreshIndexMethod(listId, language, options, callback) {
|
|||
if (listId === null || listId === undefined || typeof listId.valueOf() !== 'string') {
|
||||
throw new Error('listId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (language === null || language === undefined || typeof language.valueOf() !== 'string') {
|
||||
throw new Error('language cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -814,9 +781,6 @@ function _refreshIndexMethod(listId, language, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
|
|
@ -59,9 +59,6 @@ function _getReview(teamName, reviewId, options, callback) {
|
|||
if (reviewId === null || reviewId === undefined || typeof reviewId.valueOf() !== 'string') {
|
||||
throw new Error('reviewId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -80,9 +77,6 @@ function _getReview(teamName, reviewId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -194,9 +188,6 @@ function _getJobDetails(teamName, jobId, options, callback) {
|
|||
if (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') {
|
||||
throw new Error('jobId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -215,9 +206,6 @@ function _getJobDetails(teamName, jobId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -362,9 +350,6 @@ function _createReviews(urlContentType, teamName, createReviewBody, options, cal
|
|||
if (subTeam !== null && subTeam !== undefined && typeof subTeam.valueOf() !== 'string') {
|
||||
throw new Error('subTeam must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -392,9 +377,6 @@ function _createReviews(urlContentType, teamName, createReviewBody, options, cal
|
|||
if (urlContentType !== undefined && urlContentType !== null) {
|
||||
httpRequest.headers['UrlContentType'] = urlContentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -621,9 +603,6 @@ function _createJob(teamName, contentType, contentId, workflowName, jobContentTy
|
|||
if (callBackEndpoint !== null && callBackEndpoint !== undefined && typeof callBackEndpoint.valueOf() !== 'string') {
|
||||
throw new Error('callBackEndpoint must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (jobContentType === null || jobContentType === undefined || typeof jobContentType.valueOf() !== 'string') {
|
||||
throw new Error('jobContentType cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -657,9 +636,6 @@ function _createJob(teamName, contentType, contentId, workflowName, jobContentTy
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if (jobContentType !== undefined && jobContentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = jobContentType;
|
||||
}
|
||||
|
@ -819,9 +795,6 @@ function _addVideoFrame(teamName, reviewId, options, callback) {
|
|||
if (timescale !== null && timescale !== undefined && typeof timescale !== 'number') {
|
||||
throw new Error('timescale must be of type number.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -847,9 +820,6 @@ function _addVideoFrame(teamName, reviewId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -979,9 +949,6 @@ function _getVideoFrames(teamName, reviewId, options, callback) {
|
|||
if (reviewId === null || reviewId === undefined || typeof reviewId.valueOf() !== 'string') {
|
||||
throw new Error('reviewId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (startSeed !== null && startSeed !== undefined && typeof startSeed !== 'number') {
|
||||
throw new Error('startSeed must be of type number.');
|
||||
}
|
||||
|
@ -1022,9 +989,6 @@ function _getVideoFrames(teamName, reviewId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -1135,9 +1099,6 @@ function _publishVideoReview(teamName, reviewId, options, callback) {
|
|||
if (reviewId === null || reviewId === undefined || typeof reviewId.valueOf() !== 'string') {
|
||||
throw new Error('reviewId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -1156,9 +1117,6 @@ function _publishVideoReview(teamName, reviewId, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -1263,9 +1221,6 @@ function _addVideoTranscriptModerationResult(contentType, teamName, reviewId, tr
|
|||
if (reviewId === null || reviewId === undefined || typeof reviewId.valueOf() !== 'string') {
|
||||
throw new Error('reviewId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -1287,9 +1242,6 @@ function _addVideoTranscriptModerationResult(contentType, teamName, reviewId, tr
|
|||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -1415,9 +1367,6 @@ function _addVideoTranscript(teamName, reviewId, vTTfile, options, callback) {
|
|||
if (reviewId === null || reviewId === undefined || typeof reviewId.valueOf() !== 'string') {
|
||||
throw new Error('reviewId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (vTTfile === null || vTTfile === undefined) {
|
||||
throw new Error('vTTfile cannot be null or undefined and it must be of type object.');
|
||||
}
|
||||
|
@ -1439,9 +1388,6 @@ function _addVideoTranscript(teamName, reviewId, vTTfile, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'text/plain';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
|
@ -1574,9 +1520,6 @@ function _createVideoReviews(contentType, teamName, createVideoReviewsBody, opti
|
|||
if (subTeam !== null && subTeam !== undefined && typeof subTeam.valueOf() !== 'string') {
|
||||
throw new Error('subTeam must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -1604,9 +1547,6 @@ function _createVideoReviews(contentType, teamName, createVideoReviewsBody, opti
|
|||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -1775,9 +1715,6 @@ function _addVideoFrameUrl(contentType, teamName, reviewId, videoFrameBody, opti
|
|||
if (timescale !== null && timescale !== undefined && typeof timescale !== 'number') {
|
||||
throw new Error('timescale must be of type number.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
@ -1806,9 +1743,6 @@ function _addVideoFrameUrl(contentType, teamName, reviewId, videoFrameBody, opti
|
|||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -1949,9 +1883,6 @@ function _addVideoFrameStream(contentType, teamName, reviewId, frameImageZip, fr
|
|||
if (timescale !== null && timescale !== undefined && typeof timescale !== 'number') {
|
||||
throw new Error('timescale must be of type number.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (frameImageZip === null || frameImageZip === undefined) {
|
||||
throw new Error('frameImageZip cannot be null or undefined and it must be of type object.');
|
||||
}
|
||||
|
@ -1986,9 +1917,6 @@ function _addVideoFrameStream(contentType, teamName, reviewId, frameImageZip, fr
|
|||
if (contentType !== undefined && contentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = contentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
|
|
@ -89,9 +89,6 @@ function _screenText(language, textContentType, textContent, options, callback)
|
|||
if (textContentType === null || textContentType === undefined || typeof textContentType.valueOf() !== 'string') {
|
||||
throw new Error('textContentType cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (textContent === null || textContent === undefined || typeof textContent.valueOf() !== 'string') {
|
||||
throw new Error('textContent cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -131,9 +128,6 @@ function _screenText(language, textContentType, textContent, options, callback)
|
|||
if (textContentType !== undefined && textContentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = textContentType;
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
|
@ -263,9 +257,6 @@ function _detectLanguage(textContentType, textContent, options, callback) {
|
|||
if (this.client.baseUrl === null || this.client.baseUrl === undefined || typeof this.client.baseUrl.valueOf() !== 'string') {
|
||||
throw new Error('this.client.baseUrl cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.ocpApimSubscriptionKey === null || this.client.ocpApimSubscriptionKey === undefined || typeof this.client.ocpApimSubscriptionKey.valueOf() !== 'string') {
|
||||
throw new Error('this.client.ocpApimSubscriptionKey cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (textContentType === null || textContentType === undefined || typeof textContentType.valueOf() !== 'string') {
|
||||
throw new Error('textContentType cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
|
@ -288,9 +279,6 @@ function _detectLanguage(textContentType, textContent, options, callback) {
|
|||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'text/plain';
|
||||
if (this.client.ocpApimSubscriptionKey !== undefined && this.client.ocpApimSubscriptionKey !== null) {
|
||||
httpRequest.headers['Ocp-Apim-Subscription-Key'] = this.client.ocpApimSubscriptionKey;
|
||||
}
|
||||
if (textContentType !== undefined && textContentType !== null) {
|
||||
httpRequest.headers['Content-Type'] = textContentType;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче