README.mustache 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Kotlin API client for {{appName}}
  2. ## Requires
  3. {{#jvm}}
  4. * Kotlin 1.3.41
  5. * Gradle 4.9
  6. {{/jvm}}
  7. {{#multiplatform}}
  8. * Kotlin 1.3.50
  9. {{/multiplatform}}
  10. ## Build
  11. {{#jvm}}
  12. First, create the gradle wrapper script:
  13. ```
  14. gradle wrapper
  15. ```
  16. Then, run:
  17. {{/jvm}}
  18. ```
  19. ./gradlew check assemble
  20. ```
  21. This runs all tests and packages the library.
  22. ## Features/Implementation Notes
  23. {{#generateApiDocs}}
  24. <a name="documentation-for-api-endpoints"></a>
  25. ## Documentation for API Endpoints
  26. All URIs are relative to *{{{basePath}}}*. Change it when instantiating `ApiClient(basePath)`.
  27. Class | Method | HTTP request | Description
  28. ------------ | ------------- | ------------- | -------------
  29. {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
  30. {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
  31. {{/generateApiDocs}}
  32. {{#generateModelDocs}}
  33. <a name="documentation-for-models"></a>
  34. ## Documentation for Models
  35. {{#modelPackage}}
  36. {{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
  37. {{/model}}{{/models}}
  38. {{/modelPackage}}
  39. {{^modelPackage}}
  40. No model defined in this package
  41. {{/modelPackage}}
  42. {{/generateModelDocs}}
  43. <a name="documentation-for-authorization"></a>{{! TODO: optional documentation for authorization? }}
  44. ## Documentation for Authorization
  45. {{^authMethods}}
  46. All endpoints do not require authorization.
  47. {{/authMethods}}
  48. {{#authMethods}}
  49. {{#last}}
  50. Authentication schemes defined for the API:
  51. {{/last}}
  52. {{/authMethods}}
  53. {{#authMethods}}
  54. <a name="{{name}}"></a>
  55. ### {{name}}
  56. {{#isApiKey}}- **Type**: API key
  57. - **API key parameter name**: {{keyParamName}}
  58. - **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
  59. {{/isApiKey}}
  60. {{#isBasic}}- **Type**: HTTP basic authentication
  61. {{/isBasic}}
  62. {{#isOAuth}}- **Type**: OAuth
  63. - **Flow**: {{flow}}
  64. - **Authorization URL**: {{authorizationUrl}}
  65. - **Scopes**: {{^scopes}}N/A{{/scopes}}
  66. {{#scopes}} - {{scope}}: {{description}}
  67. {{/scopes}}
  68. {{/isOAuth}}
  69. {{/authMethods}}
  70. ## License
  71. Copyright (C) 2015-2020 PeerTube Contributors
  72. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  73. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
  74. You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses.