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

Java.libraries.retrofit.api.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
package {{package}};

import {{invokerPackage}}.CollectionFormats.*;

import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;

{{#imports}}import {{import}};
{{/imports}}

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

{{#operations}}
public interface {{classname}} {
  {{#operation}}
  /**
   * {{summary}}
   * Sync method
   * {{notes}}
{{#allParams}}
   * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
{{/allParams}}
   * @return {{returnType}}{{^returnType}}Void{{/returnType}}
{{#externalDocs}}
   * {{description}}
   * @see {{summary}} Documentation
{{/externalDocs}}
{{#isDeprecated}}
   * @deprecated
{{/isDeprecated}}
   */
  {{#isDeprecated}}
  @Deprecated
  {{/isDeprecated}}
  {{#formParams}}{{#-first}}
  {{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
  @{{httpMethod}}("{{{path}}}")
  {{{returnType}}}{{^returnType}}Void{{/returnType}} {{operationId}}({{^allParams}});{{/allParams}}
    {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}{{^-last}}, {{/-last}}{{#-last}}
  );{{/-last}}{{/allParams}}

  /**
   * {{summary}}
   * Async method
{{#allParams}}
   * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
{{/allParams}}
   * @param cb callback method
{{#externalDocs}}
   * {{description}}
   * @see {{summary}} Documentation
{{/externalDocs}}
{{#isDeprecated}}
   * @deprecated
{{/isDeprecated}}
   */
  {{#isDeprecated}}
  @Deprecated
  {{/isDeprecated}}
  {{#formParams}}{{#-first}}
  {{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
  @{{httpMethod}}("{{{path}}}")
  void {{operationId}}(
    {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}, {{/allParams}}Callback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> cb
  );
  {{/operation}}
}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy