All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
Javascript.api.mustache Maven / Gradle / Ivy
{{>licenseInfo}}
{{=< >=}}(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['<#invokerPackage><&invokerPackage>/ApiClient'<#imports>, '<#invokerPackage><&invokerPackage>/<#modelPackage><&modelPackage>/'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient')<#imports>, require('../<#modelPackage><&modelPackage>/'));
} else {
// Browser globals (root is window)
if (!root.<&moduleName>) {
root.<&moduleName> = {};
}
root.<&moduleName>.<&classname> = factory(root.<&moduleName>.ApiClient<#imports>, root.<&moduleName>.);
}
}(this, function(ApiClient<#imports>, ) {
'use strict';
<#emitJSDoc> /**
* service.
* @module <#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/
* @version
*/
/**
* Constructs a new <&classname>. <#description>
*
* @alias module:<#invokerPackage><&invokerPackage>/<#apiPackage>/
* @class
* @param {module:<#invokerPackage><&invokerPackage>/ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:<#invokerPackage><&invokerPackage>/ApiClient#instance} if unspecified.
*/
var exports = function(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
<#operations><#operation><#emitJSDoc><^usePromises>
/**
* Callback function to receive the result of the operation.
* @callback module:<#invokerPackage>/ <#apiPackage>/ ~Callback
* @param {String} error Error message, if any.
* @param <#vendorExtensions.x-jsdoc-type>{<&vendorExtensions.x-jsdoc-type>} data The data returned by the service call.<^vendorExtensions.x-jsdoc-type>data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**<#summary>
* <#notes>
* <#allParams><#required>
* @param {<&vendorExtensions.x-jsdoc-type>} <#hasOptionalParams>
* @param {Object} opts Optional parameters<#allParams><^required>
* @param {<&vendorExtensions.x-jsdoc-type>} opts. <#defaultValue> (default to <.>)<^usePromises>
* @param {module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname>~Callback} callback The callback function, accepting three arguments: error, data, response<#returnType>
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}<#usePromises>
* @return {Promise} a {@link https://www.promisejs.org/|Promise}<#returnType>, with an object containing data of type {@link <&vendorExtensions.x-jsdoc-type>} and HTTP response<^returnType>, with an object containing HTTP response
*/
this.<#usePromises>WithHttpInfo = function(<^usePromises><#hasParams>, callback) {<#hasOptionalParams>
opts = opts || {};
var postBody = <#bodyParam><#required><^required>opts['']<^bodyParam>null;
<#allParams><#required>
// verify the required parameter '' is set
if ( === undefined || === null) {
throw new Error("Missing the required parameter '' when calling ");
}
var pathParams = {<#pathParams>
'': <#required><^required>opts['']<#hasMore>,
};
var queryParams = {<#queryParams><^collectionFormat>
'': <#required><^required>opts[''],
};
var collectionQueryParams = {<#queryParams><#collectionFormat>
'': {
value: <#required><^required>opts[''],
collectionFormat: ''
},
};
var headerParams = {<#headerParams>
'': <#required><^required>opts['']<#hasMore>,
};
var formParams = {<#formParams>
'': <#collectionFormat>this.apiClient.buildCollectionParam(<#required><^required>opts[''], '') <^collectionFormat><#required><^required>opts['']<#hasMore>,
};
var authNames = [<#authMethods>''<#hasMore>, ];
var contentTypes = [<#consumes>'<& mediaType>'<#hasMore>, ];
var accepts = [<#produces>'<& mediaType>'<#hasMore>, ];
var returnType = <#returnType><&returnType><^returnType>null;
return this.apiClient.callApi(
'<&path>', '',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType<^usePromises>, callback
);
}
<#usePromises>
<#emitJSDoc>
/**<#summary>
* <#notes>
* <#allParams><#required>
* @param {<&vendorExtensions.x-jsdoc-type>} <#hasOptionalParams>
* @param {Object} opts Optional parameters<#allParams><^required>
* @param {<&vendorExtensions.x-jsdoc-type>} opts. <#defaultValue> (default to <.>)<^usePromises>
* @param {module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname>~Callback} callback The callback function, accepting three arguments: error, data, response<#returnType>
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}<#usePromises>
* @return {Promise} a {@link https://www.promisejs.org/|Promise}<#returnType>, with data of type {@link <&vendorExtensions.x-jsdoc-type>}
*/
this. = function() {
return this.WithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}
};
return exports;
}));<={{ }}=>