Javascript-Closure-Angular.es6.api.mustache Maven / Gradle / Ivy
/**
* @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}}{{/version}}{{#appContact}}
* Contact: {{appContact}}{{/appContact}}
{{^hideGenerationTimestamp}}
* Generated at: {{generatedDate}}
{{/hideGenerationTimestamp}}
* Generated by: {{generatorClass}}
*/{{#licenseInfo}}
/**
* @license {{licenseInfo}}{{#licenseUrl}}
* {{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