All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Javascript.api.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
{{=< >=}}(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['../ApiClient'<#imports>, '../<#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>/'));
  } else {
    // Browser globals (root is window)
    if (!root.) {
      root. = {};
    }
    root.. = factory(root..ApiClient<#imports>, root..);
  }
}(this, function(ApiClient<#imports>, ) {
  'use strict';

<#emitJSDoc>  /**
   *  service.
   * @module <#apiPackage>/
   * @version 
   */

  /**
   * Constructs a new . <#description>
   * 
   * @alias module:<#apiPackage>/
   * @class
   * @param {module:ApiClient} apiClient Optional API client implementation to use, default to {@link module: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:<#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:<#apiPackage>/~Callback} callback The callback function, accepting three arguments: error, data, response<#returnType>
     * data is of type: <&vendorExtensions.x-jsdoc-type>
     */
    this. = function() {<#hasOptionalParams>
      opts = opts || {};
      var postBody = <#bodyParam><#required><^required>opts['']<^bodyParam>null;
<#allParams><#required>
      // verify the required parameter '' is set
      if ( == undefined ||  == null) {
        throw "Missing the required parameter '' when calling ";
      }


      var pathParams = {<#pathParams>
        '': <#required><^required>opts['']<#hasMore>,
      };
      var queryParams = {<#queryParams>
        '': <#collectionFormat>this.apiClient.buildCollectionParam(<#required><^required>opts[''], '')<^collectionFormat><#required><^required>opts['']<#hasMore>,
      };
      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>''<#hasMore>, ];
      var accepts = [<#produces>''<#hasMore>, ];
      var returnType = <#returnType><&returnType><^returnType>null;

      return this.apiClient.callApi(
        '<&path>', '',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType<^usePromises>, callback
      );
    }
  };

  return exports;
}));<={{ }}=>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy