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

Javascript-Closure-Angular.es6.api.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
/**
 * @fileoverview AUTOMATICALLY GENERATED service for {{package}}.{{classname}}.
 * Do not edit this file by hand or your changes will be lost next time it is
 * generated.{{#appDescription}}
 *
 * {{ appDescription }}{{/appDescription}}{{#version}}
 * Version: {{.}}{{/version}}{{#appContact}}
 * Contact: {{.}}{{/appContact}}
{{^hideGenerationTimestamp}}
 * Generated at: {{generatedDate}}
{{/hideGenerationTimestamp}}
 * Generator version: {{generatorVersion}}
 * Generated by: {{generatorClass}}
 */{{#licenseInfo}}
/**
 * @license {{licenseInfo}}{{#licenseUrl}}
 * {{.}}{{/licenseUrl}}
 */
{{/licenseInfo}}

{{#operations}}

export default class {{classname}} {

  /**
  {{#description}}
   * {{&description}}
  {{/description}}
   * @constructor
   * @param {!angular.$resource} $resource
   * @ngInject
   */
  constructor($resource) {
    this.basePath = '{{basePath}}';

    return $resource(null, {}, {
    {{#operation}}
      '{{operationId}}': this.{{operationId}}(),
    {{/operation}}
    });
  }

{{#operation}}

  /**
   * {{summary}}
   * {{notes}} {{#pathParams}}
   * @param {object} { {{paramName}} : !{{{dataType}}}{{^required}}={{/required}} } path parameters required by resource {{/pathParams}}{{#bodyParams}}
   * @param {object} { {{paramName}} : !{{{dataType}}}{{^required}}={{/required}} } postData required by resource {{/bodyParams}}
   * @param {function} Success Callback
   * @param {function} Error Callback
   * @return {object}
   */
  {{operationId}}() {
    return {
      method: '{{httpMethod}}',
      url: this.basePath + '{{path}}'
      {{#pathParams}}
        .replace('{' + '{{baseName}}' + '}', ':{{paramName}}')
      {{/pathParams}}
    }
  }
{{/operation}}
}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy