weblate 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/COPYING +674 -0
  4. data/Gemfile +8 -0
  5. data/README.md +334 -0
  6. data/Rakefile +49 -0
  7. data/bin/console +11 -0
  8. data/bin/setup +8 -0
  9. data/bin/smoketest +14 -0
  10. data/bin/smoketest~ +0 -0
  11. data/docs/ActionEnum.md +15 -0
  12. data/docs/Addon.md +28 -0
  13. data/docs/AddonsApi.md +366 -0
  14. data/docs/AutoComponentList.md +20 -0
  15. data/docs/BasicUser.md +22 -0
  16. data/docs/BlankEnum.md +15 -0
  17. data/docs/CategoriesApi.md +520 -0
  18. data/docs/Category.md +30 -0
  19. data/docs/Change.md +42 -0
  20. data/docs/ChangesApi.md +163 -0
  21. data/docs/ColorEnum.md +15 -0
  22. data/docs/Component.md +146 -0
  23. data/docs/ComponentLanguageCodeStyle.md +49 -0
  24. data/docs/ComponentList.md +30 -0
  25. data/docs/ComponentListsApi.md +667 -0
  26. data/docs/ComponentsApi.md +1653 -0
  27. data/docs/ConflictsEnum.md +15 -0
  28. data/docs/DirectionEnum.md +15 -0
  29. data/docs/FileFormatEnum.md +15 -0
  30. data/docs/FrequencyEnum.md +15 -0
  31. data/docs/FuzzyEnum.md +15 -0
  32. data/docs/Group.md +40 -0
  33. data/docs/GroupsApi.md +1257 -0
  34. data/docs/Language.md +36 -0
  35. data/docs/LanguageCodeStyleEnum.md +15 -0
  36. data/docs/LanguagePlural.md +26 -0
  37. data/docs/LanguageSelectionEnum.md +15 -0
  38. data/docs/LanguagesApi.md +520 -0
  39. data/docs/LicenseEnum.md +15 -0
  40. data/docs/LockRequest.md +18 -0
  41. data/docs/Memory.md +34 -0
  42. data/docs/MemoryApi.md +448 -0
  43. data/docs/MergeStyleEnum.md +15 -0
  44. data/docs/MethodEnum.md +15 -0
  45. data/docs/Metrics.md +42 -0
  46. data/docs/MetricsApi.md +81 -0
  47. data/docs/NewLangEnum.md +15 -0
  48. data/docs/Notification.md +28 -0
  49. data/docs/NotificationEnum.md +15 -0
  50. data/docs/OperationEnum.md +15 -0
  51. data/docs/PaginatedAddonList.md +24 -0
  52. data/docs/PaginatedBasicUserList.md +24 -0
  53. data/docs/PaginatedCategoryList.md +24 -0
  54. data/docs/PaginatedChangeList.md +24 -0
  55. data/docs/PaginatedComponentList.md +24 -0
  56. data/docs/PaginatedComponentListList.md +24 -0
  57. data/docs/PaginatedGroupList.md +24 -0
  58. data/docs/PaginatedLanguageList.md +24 -0
  59. data/docs/PaginatedMemoryList.md +24 -0
  60. data/docs/PaginatedNotificationList.md +24 -0
  61. data/docs/PaginatedProjectList.md +24 -0
  62. data/docs/PaginatedRoleList.md +24 -0
  63. data/docs/PaginatedScreenshotList.md +24 -0
  64. data/docs/PaginatedTranslationList.md +24 -0
  65. data/docs/PaginatedUnitList.md +24 -0
  66. data/docs/PatchedAddon.md +28 -0
  67. data/docs/PatchedBasicUser.md +22 -0
  68. data/docs/PatchedCategory.md +30 -0
  69. data/docs/PatchedComponent.md +146 -0
  70. data/docs/PatchedComponentList.md +30 -0
  71. data/docs/PatchedGroup.md +40 -0
  72. data/docs/PatchedLanguage.md +36 -0
  73. data/docs/PatchedMemory.md +34 -0
  74. data/docs/PatchedNotification.md +28 -0
  75. data/docs/PatchedProject.md +58 -0
  76. data/docs/PatchedRole.md +24 -0
  77. data/docs/PatchedScreenshot.md +30 -0
  78. data/docs/PatchedUnitWrite.md +26 -0
  79. data/docs/PriorityEnum.md +15 -0
  80. data/docs/Project.md +58 -0
  81. data/docs/ProjectSelectionEnum.md +15 -0
  82. data/docs/ProjectsApi.md +1392 -0
  83. data/docs/RepoRequest.md +18 -0
  84. data/docs/Role.md +24 -0
  85. data/docs/RolesApi.md +448 -0
  86. data/docs/ScopeEnum.md +15 -0
  87. data/docs/Screenshot.md +30 -0
  88. data/docs/ScreenshotFile.md +18 -0
  89. data/docs/ScreenshotsApi.md +815 -0
  90. data/docs/SearchApi.md +75 -0
  91. data/docs/SourceEnum.md +15 -0
  92. data/docs/StateEnum.md +15 -0
  93. data/docs/TasksApi.md +145 -0
  94. data/docs/TextDirection.md +49 -0
  95. data/docs/Translation.md +80 -0
  96. data/docs/TranslationsApi.md +1028 -0
  97. data/docs/Unit.md +76 -0
  98. data/docs/UnitFlatLabels.md +24 -0
  99. data/docs/UnitLabels.md +24 -0
  100. data/docs/UnitWrite.md +26 -0
  101. data/docs/UnitsApi.md +376 -0
  102. data/docs/UploadRequest.md +28 -0
  103. data/docs/UploadRequestConflicts.md +49 -0
  104. data/docs/UploadRequestFuzzy.md +49 -0
  105. data/docs/UsersApi.md +1130 -0
  106. data/docs/VcsEnum.md +15 -0
  107. data/git_push.sh +57 -0
  108. data/lib/weblate/api/addons_api.rb +353 -0
  109. data/lib/weblate/api/categories_api.rb +495 -0
  110. data/lib/weblate/api/changes_api.rb +165 -0
  111. data/lib/weblate/api/component_lists_api.rb +642 -0
  112. data/lib/weblate/api/components_api.rb +1775 -0
  113. data/lib/weblate/api/groups_api.rb +1261 -0
  114. data/lib/weblate/api/languages_api.rb +495 -0
  115. data/lib/weblate/api/memory_api.rb +429 -0
  116. data/lib/weblate/api/metrics_api.rb +84 -0
  117. data/lib/weblate/api/projects_api.rb +1331 -0
  118. data/lib/weblate/api/roles_api.rb +429 -0
  119. data/lib/weblate/api/screenshots_api.rb +803 -0
  120. data/lib/weblate/api/search_api.rb +75 -0
  121. data/lib/weblate/api/tasks_api.rb +146 -0
  122. data/lib/weblate/api/translations_api.rb +1232 -0
  123. data/lib/weblate/api/units_api.rb +363 -0
  124. data/lib/weblate/api/users_api.rb +1104 -0
  125. data/lib/weblate/api_client.rb +437 -0
  126. data/lib/weblate/api_error.rb +58 -0
  127. data/lib/weblate/configuration.rb +392 -0
  128. data/lib/weblate/models/action_enum.rb +108 -0
  129. data/lib/weblate/models/addon.rb +314 -0
  130. data/lib/weblate/models/auto_component_list.rb +263 -0
  131. data/lib/weblate/models/basic_user.rb +292 -0
  132. data/lib/weblate/models/blank_enum.rb +39 -0
  133. data/lib/weblate/models/category.rb +361 -0
  134. data/lib/weblate/models/change.rb +408 -0
  135. data/lib/weblate/models/color_enum.rb +54 -0
  136. data/lib/weblate/models/component.rb +1377 -0
  137. data/lib/weblate/models/component_language_code_style.rb +106 -0
  138. data/lib/weblate/models/component_list.rb +366 -0
  139. data/lib/weblate/models/conflicts_enum.rb +41 -0
  140. data/lib/weblate/models/direction_enum.rb +40 -0
  141. data/lib/weblate/models/file_format_enum.rb +101 -0
  142. data/lib/weblate/models/frequency_enum.rb +43 -0
  143. data/lib/weblate/models/fuzzy_enum.rb +40 -0
  144. data/lib/weblate/models/group.rb +421 -0
  145. data/lib/weblate/models/language.rb +417 -0
  146. data/lib/weblate/models/language_code_style_enum.rb +51 -0
  147. data/lib/weblate/models/language_plural.rb +314 -0
  148. data/lib/weblate/models/language_selection_enum.rb +40 -0
  149. data/lib/weblate/models/license_enum.rb +677 -0
  150. data/lib/weblate/models/lock_request.rb +221 -0
  151. data/lib/weblate/models/memory.rb +329 -0
  152. data/lib/weblate/models/merge_style_enum.rb +41 -0
  153. data/lib/weblate/models/method_enum.rb +45 -0
  154. data/lib/weblate/models/metrics.rb +415 -0
  155. data/lib/weblate/models/new_lang_enum.rb +42 -0
  156. data/lib/weblate/models/notification.rb +323 -0
  157. data/lib/weblate/models/notification_enum.rb +60 -0
  158. data/lib/weblate/models/operation_enum.rb +43 -0
  159. data/lib/weblate/models/paginated_addon_list.rb +259 -0
  160. data/lib/weblate/models/paginated_basic_user_list.rb +259 -0
  161. data/lib/weblate/models/paginated_category_list.rb +259 -0
  162. data/lib/weblate/models/paginated_change_list.rb +259 -0
  163. data/lib/weblate/models/paginated_component_list.rb +259 -0
  164. data/lib/weblate/models/paginated_component_list_list.rb +259 -0
  165. data/lib/weblate/models/paginated_group_list.rb +259 -0
  166. data/lib/weblate/models/paginated_language_list.rb +259 -0
  167. data/lib/weblate/models/paginated_memory_list.rb +259 -0
  168. data/lib/weblate/models/paginated_notification_list.rb +259 -0
  169. data/lib/weblate/models/paginated_project_list.rb +259 -0
  170. data/lib/weblate/models/paginated_role_list.rb +259 -0
  171. data/lib/weblate/models/paginated_screenshot_list.rb +259 -0
  172. data/lib/weblate/models/paginated_translation_list.rb +259 -0
  173. data/lib/weblate/models/paginated_unit_list.rb +259 -0
  174. data/lib/weblate/models/patched_addon.rb +279 -0
  175. data/lib/weblate/models/patched_basic_user.rb +271 -0
  176. data/lib/weblate/models/patched_category.rb +319 -0
  177. data/lib/weblate/models/patched_component.rb +1242 -0
  178. data/lib/weblate/models/patched_component_list.rb +324 -0
  179. data/lib/weblate/models/patched_group.rb +365 -0
  180. data/lib/weblate/models/patched_language.rb +375 -0
  181. data/lib/weblate/models/patched_memory.rb +287 -0
  182. data/lib/weblate/models/patched_notification.rb +281 -0
  183. data/lib/weblate/models/patched_project.rb +472 -0
  184. data/lib/weblate/models/patched_role.rb +262 -0
  185. data/lib/weblate/models/patched_screenshot.rb +309 -0
  186. data/lib/weblate/models/patched_unit_write.rb +279 -0
  187. data/lib/weblate/models/priority_enum.rb +43 -0
  188. data/lib/weblate/models/project.rb +563 -0
  189. data/lib/weblate/models/project_selection_enum.rb +43 -0
  190. data/lib/weblate/models/repo_request.rb +243 -0
  191. data/lib/weblate/models/role.rb +290 -0
  192. data/lib/weblate/models/scope_enum.rb +43 -0
  193. data/lib/weblate/models/screenshot.rb +351 -0
  194. data/lib/weblate/models/screenshot_file.rb +221 -0
  195. data/lib/weblate/models/source_enum.rb +45 -0
  196. data/lib/weblate/models/state_enum.rb +43 -0
  197. data/lib/weblate/models/text_direction.rb +105 -0
  198. data/lib/weblate/models/translation.rb +760 -0
  199. data/lib/weblate/models/unit.rb +757 -0
  200. data/lib/weblate/models/unit_flat_labels.rb +315 -0
  201. data/lib/weblate/models/unit_labels.rb +315 -0
  202. data/lib/weblate/models/unit_write.rb +293 -0
  203. data/lib/weblate/models/upload_request.rb +307 -0
  204. data/lib/weblate/models/upload_request_conflicts.rb +105 -0
  205. data/lib/weblate/models/upload_request_fuzzy.rb +105 -0
  206. data/lib/weblate/models/vcs_enum.rb +46 -0
  207. data/lib/weblate/version.rb +15 -0
  208. data/lib/weblate.rb +135 -0
  209. data/manifest.scm +6 -0
  210. data/schema.patched.yaml +10113 -0
  211. data/schema.yaml +10116 -0
  212. data/sig/weblate.rbs +4 -0
  213. data/spec/api/addons_api_spec.rb +88 -0
  214. data/spec/api/categories_api_spec.rb +115 -0
  215. data/spec/api/changes_api_spec.rb +62 -0
  216. data/spec/api/component_lists_api_spec.rb +139 -0
  217. data/spec/api/components_api_spec.rb +307 -0
  218. data/spec/api/groups_api_spec.rb +236 -0
  219. data/spec/api/languages_api_spec.rb +115 -0
  220. data/spec/api/memory_api_spec.rb +104 -0
  221. data/spec/api/metrics_api_spec.rb +46 -0
  222. data/spec/api/projects_api_spec.rb +251 -0
  223. data/spec/api/roles_api_spec.rb +104 -0
  224. data/spec/api/screenshots_api_spec.rb +163 -0
  225. data/spec/api/search_api_spec.rb +45 -0
  226. data/spec/api/tasks_api_spec.rb +55 -0
  227. data/spec/api/translations_api_spec.rb +218 -0
  228. data/spec/api/units_api_spec.rb +93 -0
  229. data/spec/api/users_api_spec.rb +218 -0
  230. data/spec/models/action_enum_spec.rb +30 -0
  231. data/spec/models/addon_spec.rb +66 -0
  232. data/spec/models/auto_component_list_spec.rb +42 -0
  233. data/spec/models/basic_user_spec.rb +48 -0
  234. data/spec/models/blank_enum_spec.rb +30 -0
  235. data/spec/models/category_spec.rb +72 -0
  236. data/spec/models/change_spec.rb +108 -0
  237. data/spec/models/color_enum_spec.rb +30 -0
  238. data/spec/models/component_language_code_style_spec.rb +32 -0
  239. data/spec/models/component_list_spec.rb +72 -0
  240. data/spec/models/component_spec.rb +420 -0
  241. data/spec/models/conflicts_enum_spec.rb +30 -0
  242. data/spec/models/direction_enum_spec.rb +30 -0
  243. data/spec/models/file_format_enum_spec.rb +30 -0
  244. data/spec/models/frequency_enum_spec.rb +30 -0
  245. data/spec/models/fuzzy_enum_spec.rb +30 -0
  246. data/spec/models/group_spec.rb +102 -0
  247. data/spec/models/language_code_style_enum_spec.rb +30 -0
  248. data/spec/models/language_plural_spec.rb +60 -0
  249. data/spec/models/language_selection_enum_spec.rb +30 -0
  250. data/spec/models/language_spec.rb +90 -0
  251. data/spec/models/license_enum_spec.rb +30 -0
  252. data/spec/models/lock_request_spec.rb +36 -0
  253. data/spec/models/memory_spec.rb +84 -0
  254. data/spec/models/merge_style_enum_spec.rb +30 -0
  255. data/spec/models/method_enum_spec.rb +30 -0
  256. data/spec/models/metrics_spec.rb +108 -0
  257. data/spec/models/new_lang_enum_spec.rb +30 -0
  258. data/spec/models/notification_enum_spec.rb +30 -0
  259. data/spec/models/notification_spec.rb +66 -0
  260. data/spec/models/operation_enum_spec.rb +30 -0
  261. data/spec/models/paginated_addon_list_spec.rb +54 -0
  262. data/spec/models/paginated_basic_user_list_spec.rb +54 -0
  263. data/spec/models/paginated_category_list_spec.rb +54 -0
  264. data/spec/models/paginated_change_list_spec.rb +54 -0
  265. data/spec/models/paginated_component_list_list_spec.rb +54 -0
  266. data/spec/models/paginated_component_list_spec.rb +54 -0
  267. data/spec/models/paginated_group_list_spec.rb +54 -0
  268. data/spec/models/paginated_language_list_spec.rb +54 -0
  269. data/spec/models/paginated_memory_list_spec.rb +54 -0
  270. data/spec/models/paginated_notification_list_spec.rb +54 -0
  271. data/spec/models/paginated_project_list_spec.rb +54 -0
  272. data/spec/models/paginated_role_list_spec.rb +54 -0
  273. data/spec/models/paginated_screenshot_list_spec.rb +54 -0
  274. data/spec/models/paginated_translation_list_spec.rb +54 -0
  275. data/spec/models/paginated_unit_list_spec.rb +54 -0
  276. data/spec/models/patched_addon_spec.rb +66 -0
  277. data/spec/models/patched_basic_user_spec.rb +48 -0
  278. data/spec/models/patched_category_spec.rb +72 -0
  279. data/spec/models/patched_component_list_spec.rb +72 -0
  280. data/spec/models/patched_component_spec.rb +420 -0
  281. data/spec/models/patched_group_spec.rb +102 -0
  282. data/spec/models/patched_language_spec.rb +90 -0
  283. data/spec/models/patched_memory_spec.rb +84 -0
  284. data/spec/models/patched_notification_spec.rb +66 -0
  285. data/spec/models/patched_project_spec.rb +156 -0
  286. data/spec/models/patched_role_spec.rb +54 -0
  287. data/spec/models/patched_screenshot_spec.rb +72 -0
  288. data/spec/models/patched_unit_write_spec.rb +60 -0
  289. data/spec/models/priority_enum_spec.rb +30 -0
  290. data/spec/models/project_selection_enum_spec.rb +30 -0
  291. data/spec/models/project_spec.rb +156 -0
  292. data/spec/models/repo_request_spec.rb +36 -0
  293. data/spec/models/role_spec.rb +54 -0
  294. data/spec/models/scope_enum_spec.rb +30 -0
  295. data/spec/models/screenshot_file_spec.rb +36 -0
  296. data/spec/models/screenshot_spec.rb +72 -0
  297. data/spec/models/source_enum_spec.rb +30 -0
  298. data/spec/models/state_enum_spec.rb +30 -0
  299. data/spec/models/text_direction_spec.rb +32 -0
  300. data/spec/models/translation_spec.rb +222 -0
  301. data/spec/models/unit_flat_labels_spec.rb +54 -0
  302. data/spec/models/unit_labels_spec.rb +54 -0
  303. data/spec/models/unit_spec.rb +210 -0
  304. data/spec/models/unit_write_spec.rb +60 -0
  305. data/spec/models/upload_request_conflicts_spec.rb +32 -0
  306. data/spec/models/upload_request_fuzzy_spec.rb +32 -0
  307. data/spec/models/upload_request_spec.rb +66 -0
  308. data/spec/models/vcs_enum_spec.rb +30 -0
  309. data/spec/spec_helper.rb +111 -0
  310. data/weblate.gemspec +47 -0
  311. metadata +526 -0
@@ -0,0 +1,495 @@
1
+ =begin
2
+ #Weblate's REST API
3
+
4
+ # The API is accessible on the ``/api/`` URL and it is based on [Django REST framework](https://www.django-rest-framework.org/). The OpenAPI specification is available as feature preview, feedback welcome!
5
+
6
+ The version of the OpenAPI document:
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Weblate
16
+ class CategoriesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Category API.
23
+ # @param category [Category]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [Category]
26
+ def categories_create(category, opts = {})
27
+ data, _status_code, _headers = categories_create_with_http_info(category, opts)
28
+ data
29
+ end
30
+
31
+ # Category API.
32
+ # @param category [Category]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(Category, Integer, Hash)>] Category data, response status code and response headers
35
+ def categories_create_with_http_info(category, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_create ...'
38
+ end
39
+ # verify the required parameter 'category' is set
40
+ if @api_client.config.client_side_validation && category.nil?
41
+ fail ArgumentError, "Missing the required parameter 'category' when calling CategoriesApi.categories_create"
42
+ end
43
+ # resource path
44
+ local_var_path = '/categories/'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
+ # HTTP header 'Content-Type'
54
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(category)
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'Category'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"CategoriesApi.categories_create",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: CategoriesApi#categories_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Category API.
89
+ # @param id [String]
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [nil]
92
+ def categories_destroy(id, opts = {})
93
+ categories_destroy_with_http_info(id, opts)
94
+ nil
95
+ end
96
+
97
+ # Category API.
98
+ # @param id [String]
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
+ def categories_destroy_with_http_info(id, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_destroy ...'
104
+ end
105
+ # verify the required parameter 'id' is set
106
+ if @api_client.config.client_side_validation && id.nil?
107
+ fail ArgumentError, "Missing the required parameter 'id' when calling CategoriesApi.categories_destroy"
108
+ end
109
+ pattern = Regexp.new(/^[^\/]+$/)
110
+ if @api_client.config.client_side_validation && id !~ pattern
111
+ fail ArgumentError, "invalid value for 'id' when calling CategoriesApi.categories_destroy, must conform to the pattern #{pattern}."
112
+ end
113
+
114
+ # resource path
115
+ local_var_path = '/categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
116
+
117
+ # query parameters
118
+ query_params = opts[:query_params] || {}
119
+
120
+ # header parameters
121
+ header_params = opts[:header_params] || {}
122
+
123
+ # form parameters
124
+ form_params = opts[:form_params] || {}
125
+
126
+ # http body (model)
127
+ post_body = opts[:debug_body]
128
+
129
+ # return_type
130
+ return_type = opts[:debug_return_type]
131
+
132
+ # auth_names
133
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
134
+
135
+ new_options = opts.merge(
136
+ :operation => :"CategoriesApi.categories_destroy",
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => return_type
143
+ )
144
+
145
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug "API called: CategoriesApi#categories_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ # Category API.
153
+ # @param [Hash] opts the optional parameters
154
+ # @option opts [Integer] :page A page number within the paginated result set.
155
+ # @option opts [Integer] :page_size Number of results to return per page.
156
+ # @return [PaginatedCategoryList]
157
+ def categories_list(opts = {})
158
+ data, _status_code, _headers = categories_list_with_http_info(opts)
159
+ data
160
+ end
161
+
162
+ # Category API.
163
+ # @param [Hash] opts the optional parameters
164
+ # @option opts [Integer] :page A page number within the paginated result set.
165
+ # @option opts [Integer] :page_size Number of results to return per page.
166
+ # @return [Array<(PaginatedCategoryList, Integer, Hash)>] PaginatedCategoryList data, response status code and response headers
167
+ def categories_list_with_http_info(opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_list ...'
170
+ end
171
+ # resource path
172
+ local_var_path = '/categories/'
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
177
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
178
+
179
+ # header parameters
180
+ header_params = opts[:header_params] || {}
181
+ # HTTP header 'Accept' (if needed)
182
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
183
+
184
+ # form parameters
185
+ form_params = opts[:form_params] || {}
186
+
187
+ # http body (model)
188
+ post_body = opts[:debug_body]
189
+
190
+ # return_type
191
+ return_type = opts[:debug_return_type] || 'PaginatedCategoryList'
192
+
193
+ # auth_names
194
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
195
+
196
+ new_options = opts.merge(
197
+ :operation => :"CategoriesApi.categories_list",
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => return_type
204
+ )
205
+
206
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: CategoriesApi#categories_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+
213
+ # Category API.
214
+ # @param id [String]
215
+ # @param [Hash] opts the optional parameters
216
+ # @option opts [PatchedCategory] :patched_category
217
+ # @return [Category]
218
+ def categories_partial_update(id, opts = {})
219
+ data, _status_code, _headers = categories_partial_update_with_http_info(id, opts)
220
+ data
221
+ end
222
+
223
+ # Category API.
224
+ # @param id [String]
225
+ # @param [Hash] opts the optional parameters
226
+ # @option opts [PatchedCategory] :patched_category
227
+ # @return [Array<(Category, Integer, Hash)>] Category data, response status code and response headers
228
+ def categories_partial_update_with_http_info(id, opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_partial_update ...'
231
+ end
232
+ # verify the required parameter 'id' is set
233
+ if @api_client.config.client_side_validation && id.nil?
234
+ fail ArgumentError, "Missing the required parameter 'id' when calling CategoriesApi.categories_partial_update"
235
+ end
236
+ pattern = Regexp.new(/^[^\/]+$/)
237
+ if @api_client.config.client_side_validation && id !~ pattern
238
+ fail ArgumentError, "invalid value for 'id' when calling CategoriesApi.categories_partial_update, must conform to the pattern #{pattern}."
239
+ end
240
+
241
+ # resource path
242
+ local_var_path = '/categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
243
+
244
+ # query parameters
245
+ query_params = opts[:query_params] || {}
246
+
247
+ # header parameters
248
+ header_params = opts[:header_params] || {}
249
+ # HTTP header 'Accept' (if needed)
250
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
251
+ # HTTP header 'Content-Type'
252
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
253
+ if !content_type.nil?
254
+ header_params['Content-Type'] = content_type
255
+ end
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_category'])
262
+
263
+ # return_type
264
+ return_type = opts[:debug_return_type] || 'Category'
265
+
266
+ # auth_names
267
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
268
+
269
+ new_options = opts.merge(
270
+ :operation => :"CategoriesApi.categories_partial_update",
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => return_type
277
+ )
278
+
279
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: CategoriesApi#categories_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+
286
+ # Category API.
287
+ # @param id [String]
288
+ # @param [Hash] opts the optional parameters
289
+ # @return [Category]
290
+ def categories_retrieve(id, opts = {})
291
+ data, _status_code, _headers = categories_retrieve_with_http_info(id, opts)
292
+ data
293
+ end
294
+
295
+ # Category API.
296
+ # @param id [String]
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [Array<(Category, Integer, Hash)>] Category data, response status code and response headers
299
+ def categories_retrieve_with_http_info(id, opts = {})
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_retrieve ...'
302
+ end
303
+ # verify the required parameter 'id' is set
304
+ if @api_client.config.client_side_validation && id.nil?
305
+ fail ArgumentError, "Missing the required parameter 'id' when calling CategoriesApi.categories_retrieve"
306
+ end
307
+ pattern = Regexp.new(/^[^\/]+$/)
308
+ if @api_client.config.client_side_validation && id !~ pattern
309
+ fail ArgumentError, "invalid value for 'id' when calling CategoriesApi.categories_retrieve, must conform to the pattern #{pattern}."
310
+ end
311
+
312
+ # resource path
313
+ local_var_path = '/categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
314
+
315
+ # query parameters
316
+ query_params = opts[:query_params] || {}
317
+
318
+ # header parameters
319
+ header_params = opts[:header_params] || {}
320
+ # HTTP header 'Accept' (if needed)
321
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
322
+
323
+ # form parameters
324
+ form_params = opts[:form_params] || {}
325
+
326
+ # http body (model)
327
+ post_body = opts[:debug_body]
328
+
329
+ # return_type
330
+ return_type = opts[:debug_return_type] || 'Category'
331
+
332
+ # auth_names
333
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
334
+
335
+ new_options = opts.merge(
336
+ :operation => :"CategoriesApi.categories_retrieve",
337
+ :header_params => header_params,
338
+ :query_params => query_params,
339
+ :form_params => form_params,
340
+ :body => post_body,
341
+ :auth_names => auth_names,
342
+ :return_type => return_type
343
+ )
344
+
345
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
346
+ if @api_client.config.debugging
347
+ @api_client.config.logger.debug "API called: CategoriesApi#categories_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
348
+ end
349
+ return data, status_code, headers
350
+ end
351
+
352
+ # Category API.
353
+ # @param id [String]
354
+ # @param [Hash] opts the optional parameters
355
+ # @return [Category]
356
+ def categories_statistics_retrieve(id, opts = {})
357
+ data, _status_code, _headers = categories_statistics_retrieve_with_http_info(id, opts)
358
+ data
359
+ end
360
+
361
+ # Category API.
362
+ # @param id [String]
363
+ # @param [Hash] opts the optional parameters
364
+ # @return [Array<(Category, Integer, Hash)>] Category data, response status code and response headers
365
+ def categories_statistics_retrieve_with_http_info(id, opts = {})
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_statistics_retrieve ...'
368
+ end
369
+ # verify the required parameter 'id' is set
370
+ if @api_client.config.client_side_validation && id.nil?
371
+ fail ArgumentError, "Missing the required parameter 'id' when calling CategoriesApi.categories_statistics_retrieve"
372
+ end
373
+ pattern = Regexp.new(/^[^\/]+$/)
374
+ if @api_client.config.client_side_validation && id !~ pattern
375
+ fail ArgumentError, "invalid value for 'id' when calling CategoriesApi.categories_statistics_retrieve, must conform to the pattern #{pattern}."
376
+ end
377
+
378
+ # resource path
379
+ local_var_path = '/categories/{id}/statistics/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+
384
+ # header parameters
385
+ header_params = opts[:header_params] || {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
388
+
389
+ # form parameters
390
+ form_params = opts[:form_params] || {}
391
+
392
+ # http body (model)
393
+ post_body = opts[:debug_body]
394
+
395
+ # return_type
396
+ return_type = opts[:debug_return_type] || 'Category'
397
+
398
+ # auth_names
399
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
400
+
401
+ new_options = opts.merge(
402
+ :operation => :"CategoriesApi.categories_statistics_retrieve",
403
+ :header_params => header_params,
404
+ :query_params => query_params,
405
+ :form_params => form_params,
406
+ :body => post_body,
407
+ :auth_names => auth_names,
408
+ :return_type => return_type
409
+ )
410
+
411
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: CategoriesApi#categories_statistics_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+
418
+ # Category API.
419
+ # @param id [String]
420
+ # @param category [Category]
421
+ # @param [Hash] opts the optional parameters
422
+ # @return [Category]
423
+ def categories_update(id, category, opts = {})
424
+ data, _status_code, _headers = categories_update_with_http_info(id, category, opts)
425
+ data
426
+ end
427
+
428
+ # Category API.
429
+ # @param id [String]
430
+ # @param category [Category]
431
+ # @param [Hash] opts the optional parameters
432
+ # @return [Array<(Category, Integer, Hash)>] Category data, response status code and response headers
433
+ def categories_update_with_http_info(id, category, opts = {})
434
+ if @api_client.config.debugging
435
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.categories_update ...'
436
+ end
437
+ # verify the required parameter 'id' is set
438
+ if @api_client.config.client_side_validation && id.nil?
439
+ fail ArgumentError, "Missing the required parameter 'id' when calling CategoriesApi.categories_update"
440
+ end
441
+ pattern = Regexp.new(/^[^\/]+$/)
442
+ if @api_client.config.client_side_validation && id !~ pattern
443
+ fail ArgumentError, "invalid value for 'id' when calling CategoriesApi.categories_update, must conform to the pattern #{pattern}."
444
+ end
445
+
446
+ # verify the required parameter 'category' is set
447
+ if @api_client.config.client_side_validation && category.nil?
448
+ fail ArgumentError, "Missing the required parameter 'category' when calling CategoriesApi.categories_update"
449
+ end
450
+ # resource path
451
+ local_var_path = '/categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
452
+
453
+ # query parameters
454
+ query_params = opts[:query_params] || {}
455
+
456
+ # header parameters
457
+ header_params = opts[:header_params] || {}
458
+ # HTTP header 'Accept' (if needed)
459
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
460
+ # HTTP header 'Content-Type'
461
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
462
+ if !content_type.nil?
463
+ header_params['Content-Type'] = content_type
464
+ end
465
+
466
+ # form parameters
467
+ form_params = opts[:form_params] || {}
468
+
469
+ # http body (model)
470
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(category)
471
+
472
+ # return_type
473
+ return_type = opts[:debug_return_type] || 'Category'
474
+
475
+ # auth_names
476
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
477
+
478
+ new_options = opts.merge(
479
+ :operation => :"CategoriesApi.categories_update",
480
+ :header_params => header_params,
481
+ :query_params => query_params,
482
+ :form_params => form_params,
483
+ :body => post_body,
484
+ :auth_names => auth_names,
485
+ :return_type => return_type
486
+ )
487
+
488
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
489
+ if @api_client.config.debugging
490
+ @api_client.config.logger.debug "API called: CategoriesApi#categories_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
491
+ end
492
+ return data, status_code, headers
493
+ end
494
+ end
495
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Weblate's REST API
3
+
4
+ # The API is accessible on the ``/api/`` URL and it is based on [Django REST framework](https://www.django-rest-framework.org/). The OpenAPI specification is available as feature preview, feedback welcome!
5
+
6
+ The version of the OpenAPI document:
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Weblate
16
+ class ChangesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Changes API.
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [Array<Integer>] :action * &#x60;0&#x60; - Resource updated * &#x60;1&#x60; - Translation completed * &#x60;2&#x60; - Translation changed * &#x60;5&#x60; - Translation added * &#x60;3&#x60; - Comment added * &#x60;4&#x60; - Suggestion added * &#x60;6&#x60; - Automatically translated * &#x60;7&#x60; - Suggestion accepted * &#x60;8&#x60; - Translation reverted * &#x60;9&#x60; - Translation uploaded * &#x60;13&#x60; - Source string added * &#x60;14&#x60; - Component locked * &#x60;15&#x60; - Component unlocked * &#x60;17&#x60; - Changes committed * &#x60;18&#x60; - Changes pushed * &#x60;19&#x60; - Repository reset * &#x60;20&#x60; - Repository merged * &#x60;21&#x60; - Repository rebased * &#x60;22&#x60; - Repository merge failed * &#x60;23&#x60; - Repository rebase failed * &#x60;28&#x60; - Repository push failed * &#x60;24&#x60; - Parsing failed * &#x60;25&#x60; - Translation removed * &#x60;26&#x60; - Suggestion removed * &#x60;27&#x60; - Translation replaced * &#x60;29&#x60; - Suggestion removed during cleanup * &#x60;30&#x60; - Source string changed * &#x60;31&#x60; - String added * &#x60;32&#x60; - Bulk status changed * &#x60;33&#x60; - Visibility changed * &#x60;34&#x60; - User added * &#x60;35&#x60; - User removed * &#x60;36&#x60; - Translation approved * &#x60;37&#x60; - Marked for edit * &#x60;38&#x60; - Component removed * &#x60;39&#x60; - Project removed * &#x60;41&#x60; - Project renamed * &#x60;42&#x60; - Component renamed * &#x60;43&#x60; - Moved component * &#x60;45&#x60; - Contributor joined * &#x60;46&#x60; - Announcement posted * &#x60;47&#x60; - Alert triggered * &#x60;48&#x60; - Language added * &#x60;49&#x60; - Language requested * &#x60;50&#x60; - Project created * &#x60;51&#x60; - Component created * &#x60;52&#x60; - User invited * &#x60;53&#x60; - Repository notification received * &#x60;54&#x60; - Translation replaced file by upload * &#x60;55&#x60; - License changed * &#x60;56&#x60; - Contributor agreement changed * &#x60;57&#x60; - Screenshot added * &#x60;58&#x60; - Screenshot uploaded * &#x60;59&#x60; - String updated in the repository * &#x60;60&#x60; - Add-on installed * &#x60;61&#x60; - Add-on configuration changed * &#x60;62&#x60; - Add-on uninstalled * &#x60;63&#x60; - String removed * &#x60;64&#x60; - Comment removed * &#x60;65&#x60; - Comment resolved * &#x60;66&#x60; - Explanation updated * &#x60;67&#x60; - Category removed * &#x60;68&#x60; - Category renamed * &#x60;69&#x60; - Category moved * &#x60;70&#x60; - Saving string failed * &#x60;71&#x60; - String added in the repository * &#x60;72&#x60; - String updated in the upload * &#x60;73&#x60; - String added in the upload * &#x60;74&#x60; - Translation updated by source upload * &#x60;75&#x60; - Component translation completed
25
+ # @option opts [Integer] :page A page number within the paginated result set.
26
+ # @option opts [Integer] :page_size Number of results to return per page.
27
+ # @option opts [Time] :timestamp_after
28
+ # @option opts [Time] :timestamp_before
29
+ # @option opts [String] :user
30
+ # @return [PaginatedChangeList]
31
+ def changes_list(opts = {})
32
+ data, _status_code, _headers = changes_list_with_http_info(opts)
33
+ data
34
+ end
35
+
36
+ # Changes API.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [Array<Integer>] :action * &#x60;0&#x60; - Resource updated * &#x60;1&#x60; - Translation completed * &#x60;2&#x60; - Translation changed * &#x60;5&#x60; - Translation added * &#x60;3&#x60; - Comment added * &#x60;4&#x60; - Suggestion added * &#x60;6&#x60; - Automatically translated * &#x60;7&#x60; - Suggestion accepted * &#x60;8&#x60; - Translation reverted * &#x60;9&#x60; - Translation uploaded * &#x60;13&#x60; - Source string added * &#x60;14&#x60; - Component locked * &#x60;15&#x60; - Component unlocked * &#x60;17&#x60; - Changes committed * &#x60;18&#x60; - Changes pushed * &#x60;19&#x60; - Repository reset * &#x60;20&#x60; - Repository merged * &#x60;21&#x60; - Repository rebased * &#x60;22&#x60; - Repository merge failed * &#x60;23&#x60; - Repository rebase failed * &#x60;28&#x60; - Repository push failed * &#x60;24&#x60; - Parsing failed * &#x60;25&#x60; - Translation removed * &#x60;26&#x60; - Suggestion removed * &#x60;27&#x60; - Translation replaced * &#x60;29&#x60; - Suggestion removed during cleanup * &#x60;30&#x60; - Source string changed * &#x60;31&#x60; - String added * &#x60;32&#x60; - Bulk status changed * &#x60;33&#x60; - Visibility changed * &#x60;34&#x60; - User added * &#x60;35&#x60; - User removed * &#x60;36&#x60; - Translation approved * &#x60;37&#x60; - Marked for edit * &#x60;38&#x60; - Component removed * &#x60;39&#x60; - Project removed * &#x60;41&#x60; - Project renamed * &#x60;42&#x60; - Component renamed * &#x60;43&#x60; - Moved component * &#x60;45&#x60; - Contributor joined * &#x60;46&#x60; - Announcement posted * &#x60;47&#x60; - Alert triggered * &#x60;48&#x60; - Language added * &#x60;49&#x60; - Language requested * &#x60;50&#x60; - Project created * &#x60;51&#x60; - Component created * &#x60;52&#x60; - User invited * &#x60;53&#x60; - Repository notification received * &#x60;54&#x60; - Translation replaced file by upload * &#x60;55&#x60; - License changed * &#x60;56&#x60; - Contributor agreement changed * &#x60;57&#x60; - Screenshot added * &#x60;58&#x60; - Screenshot uploaded * &#x60;59&#x60; - String updated in the repository * &#x60;60&#x60; - Add-on installed * &#x60;61&#x60; - Add-on configuration changed * &#x60;62&#x60; - Add-on uninstalled * &#x60;63&#x60; - String removed * &#x60;64&#x60; - Comment removed * &#x60;65&#x60; - Comment resolved * &#x60;66&#x60; - Explanation updated * &#x60;67&#x60; - Category removed * &#x60;68&#x60; - Category renamed * &#x60;69&#x60; - Category moved * &#x60;70&#x60; - Saving string failed * &#x60;71&#x60; - String added in the repository * &#x60;72&#x60; - String updated in the upload * &#x60;73&#x60; - String added in the upload * &#x60;74&#x60; - Translation updated by source upload * &#x60;75&#x60; - Component translation completed
39
+ # @option opts [Integer] :page A page number within the paginated result set.
40
+ # @option opts [Integer] :page_size Number of results to return per page.
41
+ # @option opts [Time] :timestamp_after
42
+ # @option opts [Time] :timestamp_before
43
+ # @option opts [String] :user
44
+ # @return [Array<(PaginatedChangeList, Integer, Hash)>] PaginatedChangeList data, response status code and response headers
45
+ def changes_list_with_http_info(opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug 'Calling API: ChangesApi.changes_list ...'
48
+ end
49
+ allowable_values = [0, 1, 13, 14, 15, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 41, 42, 43, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 8, 9]
50
+ if @api_client.config.client_side_validation && opts[:'action'] && !opts[:'action'].all? { |item| allowable_values.include?(item) }
51
+ fail ArgumentError, "invalid value for \"action\", must include one of #{allowable_values}"
52
+ end
53
+ # resource path
54
+ local_var_path = '/changes/'
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+ query_params[:'action'] = @api_client.build_collection_param(opts[:'action'], :multi) if !opts[:'action'].nil?
59
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
60
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
61
+ query_params[:'timestamp_after'] = opts[:'timestamp_after'] if !opts[:'timestamp_after'].nil?
62
+ query_params[:'timestamp_before'] = opts[:'timestamp_before'] if !opts[:'timestamp_before'].nil?
63
+ query_params[:'user'] = opts[:'user'] if !opts[:'user'].nil?
64
+
65
+ # header parameters
66
+ header_params = opts[:header_params] || {}
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:debug_body]
75
+
76
+ # return_type
77
+ return_type = opts[:debug_return_type] || 'PaginatedChangeList'
78
+
79
+ # auth_names
80
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
81
+
82
+ new_options = opts.merge(
83
+ :operation => :"ChangesApi.changes_list",
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => return_type
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: ChangesApi#changes_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Changes API.
100
+ # @param id [String]
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [Change]
103
+ def changes_retrieve(id, opts = {})
104
+ data, _status_code, _headers = changes_retrieve_with_http_info(id, opts)
105
+ data
106
+ end
107
+
108
+ # Changes API.
109
+ # @param id [String]
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [Array<(Change, Integer, Hash)>] Change data, response status code and response headers
112
+ def changes_retrieve_with_http_info(id, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug 'Calling API: ChangesApi.changes_retrieve ...'
115
+ end
116
+ # verify the required parameter 'id' is set
117
+ if @api_client.config.client_side_validation && id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'id' when calling ChangesApi.changes_retrieve"
119
+ end
120
+ pattern = Regexp.new(/^[^\/]+$/)
121
+ if @api_client.config.client_side_validation && id !~ pattern
122
+ fail ArgumentError, "invalid value for 'id' when calling ChangesApi.changes_retrieve, must conform to the pattern #{pattern}."
123
+ end
124
+
125
+ # resource path
126
+ local_var_path = '/changes/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # header parameters
132
+ header_params = opts[:header_params] || {}
133
+ # HTTP header 'Accept' (if needed)
134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
135
+
136
+ # form parameters
137
+ form_params = opts[:form_params] || {}
138
+
139
+ # http body (model)
140
+ post_body = opts[:debug_body]
141
+
142
+ # return_type
143
+ return_type = opts[:debug_return_type] || 'Change'
144
+
145
+ # auth_names
146
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
147
+
148
+ new_options = opts.merge(
149
+ :operation => :"ChangesApi.changes_retrieve",
150
+ :header_params => header_params,
151
+ :query_params => query_params,
152
+ :form_params => form_params,
153
+ :body => post_body,
154
+ :auth_names => auth_names,
155
+ :return_type => return_type
156
+ )
157
+
158
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "API called: ChangesApi#changes_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
161
+ end
162
+ return data, status_code, headers
163
+ end
164
+ end
165
+ end