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>/<&import>'], 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>, <&import>) {
'use strict';
<#emitJSDoc> /**
* service.
* @module <#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname>
* @version
*/
/**
* Constructs a new <&classname>. <#description>
* <&description>
* @alias module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname>
* @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>
* <&summary><#notes>
* <¬es><#allParams><#required>
* @param {<&vendorExtensions.x-jsdoc-type>} <¶mName> <&description><#hasOptionalParams>
* @param {Object} opts Optional parameters<#allParams><^required>
* @param {<&vendorExtensions.x-jsdoc-type>} opts.<¶mName> <&description><#defaultValue> (default to <&.>)<^usePromises>
* @param {module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname>~<&operationId>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() {<#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['']<^-last>,-last>
};
var queryParams = {<#queryParams><^collectionFormat>
'': <#required><^required>opts[''],
};
var collectionQueryParams = {<#queryParams><#collectionFormat>
'': {
value: <#required><^required>opts[''],
collectionFormat: ''
},
};
var headerParams = {<#headerParams>
'': <#required><^required>opts['']<^-last>,-last>
};
var formParams = {<#formParams>
'': <#collectionFormat>this.apiClient.buildCollectionParam(<#required><^required>opts[''], '') <^collectionFormat><#required><^required>opts['']<^-last>,-last>
};
var authNames = [<#authMethods>''<^-last>, -last>];
var contentTypes = [<#consumes>'<& mediaType>'<^-last>, -last>];
var accepts = [<#produces>'<& mediaType>'<^-last>, -last>];
var returnType = <#vendorExtensions.x-return-type><&vendorExtensions.x-return-type><^vendorExtensions.x-return-type>null;
<#servers.0>
let basePaths = [<#servers>''<^-last>, -last>];
let basePath = basePaths[0]; // by default use the first one in "servers" defined in OpenAPI
if (typeof opts['_base_path_index'] !== 'undefined') {
if (opts['_base_path_index'] < 0 || opts['_base_path_index'] >= basePaths.length) {
throw new Error("Invalid index " + opts['_base_path_index'] + " when selecting the host settings. Must be less than " + basePaths.length);
}
basePath = basePaths[opts['_base_path_index']];
}
return this.apiClient.callApi(
'<&path>', '',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, <#servers.0>basePath<^servers.0>null<^usePromises>, callback
);
}
<#usePromises>
<#emitJSDoc>
/**<#summary>
* <&summary><#notes>
* <¬es><#allParams><#required>
* @param {<&vendorExtensions.x-jsdoc-type>} <¶mName> <&description><#hasOptionalParams>
* @param {Object} opts Optional parameters<#allParams><^required>
* @param {<&vendorExtensions.x-jsdoc-type>} opts.<¶mName> <&description><#defaultValue> (default to <&.>)<^usePromises>
* @param {module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/<&classname>~<&operationId>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;
}));<={{ }}=>