weblate 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,1104 @@
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 UsersApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Users API.
23
+ # @param basic_user [BasicUser]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [BasicUser]
26
+ def users_create(basic_user, opts = {})
27
+ data, _status_code, _headers = users_create_with_http_info(basic_user, opts)
28
+ data
29
+ end
30
+
31
+ # Users API.
32
+ # @param basic_user [BasicUser]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(BasicUser, Integer, Hash)>] BasicUser data, response status code and response headers
35
+ def users_create_with_http_info(basic_user, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_create ...'
38
+ end
39
+ # verify the required parameter 'basic_user' is set
40
+ if @api_client.config.client_side_validation && basic_user.nil?
41
+ fail ArgumentError, "Missing the required parameter 'basic_user' when calling UsersApi.users_create"
42
+ end
43
+ # resource path
44
+ local_var_path = '/users/'
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(basic_user)
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'BasicUser'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"UsersApi.users_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: UsersApi#users_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Users API.
89
+ # @param username [String]
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [nil]
92
+ def users_destroy(username, opts = {})
93
+ users_destroy_with_http_info(username, opts)
94
+ nil
95
+ end
96
+
97
+ # Users API.
98
+ # @param username [String]
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
+ def users_destroy_with_http_info(username, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_destroy ...'
104
+ end
105
+ # verify the required parameter 'username' is set
106
+ if @api_client.config.client_side_validation && username.nil?
107
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_destroy"
108
+ end
109
+ pattern = Regexp.new(/^[^\/]+$/)
110
+ if @api_client.config.client_side_validation && username !~ pattern
111
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_destroy, must conform to the pattern #{pattern}."
112
+ end
113
+
114
+ # resource path
115
+ local_var_path = '/users/{username}/'.sub('{' + 'username' + '}', CGI.escape(username.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 => :"UsersApi.users_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: UsersApi#users_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ # Users API.
153
+ # @param username [String]
154
+ # @param basic_user [BasicUser]
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [BasicUser]
157
+ def users_groups_create(username, basic_user, opts = {})
158
+ data, _status_code, _headers = users_groups_create_with_http_info(username, basic_user, opts)
159
+ data
160
+ end
161
+
162
+ # Users API.
163
+ # @param username [String]
164
+ # @param basic_user [BasicUser]
165
+ # @param [Hash] opts the optional parameters
166
+ # @return [Array<(BasicUser, Integer, Hash)>] BasicUser data, response status code and response headers
167
+ def users_groups_create_with_http_info(username, basic_user, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_groups_create ...'
170
+ end
171
+ # verify the required parameter 'username' is set
172
+ if @api_client.config.client_side_validation && username.nil?
173
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_groups_create"
174
+ end
175
+ pattern = Regexp.new(/^[^\/]+$/)
176
+ if @api_client.config.client_side_validation && username !~ pattern
177
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_groups_create, must conform to the pattern #{pattern}."
178
+ end
179
+
180
+ # verify the required parameter 'basic_user' is set
181
+ if @api_client.config.client_side_validation && basic_user.nil?
182
+ fail ArgumentError, "Missing the required parameter 'basic_user' when calling UsersApi.users_groups_create"
183
+ end
184
+ # resource path
185
+ local_var_path = '/users/{username}/groups/'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
186
+
187
+ # query parameters
188
+ query_params = opts[:query_params] || {}
189
+
190
+ # header parameters
191
+ header_params = opts[:header_params] || {}
192
+ # HTTP header 'Accept' (if needed)
193
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
194
+ # HTTP header 'Content-Type'
195
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
196
+ if !content_type.nil?
197
+ header_params['Content-Type'] = content_type
198
+ end
199
+
200
+ # form parameters
201
+ form_params = opts[:form_params] || {}
202
+
203
+ # http body (model)
204
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(basic_user)
205
+
206
+ # return_type
207
+ return_type = opts[:debug_return_type] || 'BasicUser'
208
+
209
+ # auth_names
210
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
211
+
212
+ new_options = opts.merge(
213
+ :operation => :"UsersApi.users_groups_create",
214
+ :header_params => header_params,
215
+ :query_params => query_params,
216
+ :form_params => form_params,
217
+ :body => post_body,
218
+ :auth_names => auth_names,
219
+ :return_type => return_type
220
+ )
221
+
222
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug "API called: UsersApi#users_groups_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ end
226
+ return data, status_code, headers
227
+ end
228
+
229
+ # Users API.
230
+ # @param username [String]
231
+ # @param [Hash] opts the optional parameters
232
+ # @return [nil]
233
+ def users_groups_destroy(username, opts = {})
234
+ users_groups_destroy_with_http_info(username, opts)
235
+ nil
236
+ end
237
+
238
+ # Users API.
239
+ # @param username [String]
240
+ # @param [Hash] opts the optional parameters
241
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
242
+ def users_groups_destroy_with_http_info(username, opts = {})
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_groups_destroy ...'
245
+ end
246
+ # verify the required parameter 'username' is set
247
+ if @api_client.config.client_side_validation && username.nil?
248
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_groups_destroy"
249
+ end
250
+ pattern = Regexp.new(/^[^\/]+$/)
251
+ if @api_client.config.client_side_validation && username !~ pattern
252
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_groups_destroy, must conform to the pattern #{pattern}."
253
+ end
254
+
255
+ # resource path
256
+ local_var_path = '/users/{username}/groups/'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
257
+
258
+ # query parameters
259
+ query_params = opts[:query_params] || {}
260
+
261
+ # header parameters
262
+ header_params = opts[:header_params] || {}
263
+
264
+ # form parameters
265
+ form_params = opts[:form_params] || {}
266
+
267
+ # http body (model)
268
+ post_body = opts[:debug_body]
269
+
270
+ # return_type
271
+ return_type = opts[:debug_return_type]
272
+
273
+ # auth_names
274
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
275
+
276
+ new_options = opts.merge(
277
+ :operation => :"UsersApi.users_groups_destroy",
278
+ :header_params => header_params,
279
+ :query_params => query_params,
280
+ :form_params => form_params,
281
+ :body => post_body,
282
+ :auth_names => auth_names,
283
+ :return_type => return_type
284
+ )
285
+
286
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "API called: UsersApi#users_groups_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ end
290
+ return data, status_code, headers
291
+ end
292
+
293
+ # Users API.
294
+ # @param [Hash] opts the optional parameters
295
+ # @option opts [Integer] :page A page number within the paginated result set.
296
+ # @option opts [Integer] :page_size Number of results to return per page.
297
+ # @option opts [String] :username
298
+ # @return [PaginatedBasicUserList]
299
+ def users_list(opts = {})
300
+ data, _status_code, _headers = users_list_with_http_info(opts)
301
+ data
302
+ end
303
+
304
+ # Users API.
305
+ # @param [Hash] opts the optional parameters
306
+ # @option opts [Integer] :page A page number within the paginated result set.
307
+ # @option opts [Integer] :page_size Number of results to return per page.
308
+ # @option opts [String] :username
309
+ # @return [Array<(PaginatedBasicUserList, Integer, Hash)>] PaginatedBasicUserList data, response status code and response headers
310
+ def users_list_with_http_info(opts = {})
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_list ...'
313
+ end
314
+ # resource path
315
+ local_var_path = '/users/'
316
+
317
+ # query parameters
318
+ query_params = opts[:query_params] || {}
319
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
320
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
321
+ query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil?
322
+
323
+ # header parameters
324
+ header_params = opts[:header_params] || {}
325
+ # HTTP header 'Accept' (if needed)
326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
327
+
328
+ # form parameters
329
+ form_params = opts[:form_params] || {}
330
+
331
+ # http body (model)
332
+ post_body = opts[:debug_body]
333
+
334
+ # return_type
335
+ return_type = opts[:debug_return_type] || 'PaginatedBasicUserList'
336
+
337
+ # auth_names
338
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
339
+
340
+ new_options = opts.merge(
341
+ :operation => :"UsersApi.users_list",
342
+ :header_params => header_params,
343
+ :query_params => query_params,
344
+ :form_params => form_params,
345
+ :body => post_body,
346
+ :auth_names => auth_names,
347
+ :return_type => return_type
348
+ )
349
+
350
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
351
+ if @api_client.config.debugging
352
+ @api_client.config.logger.debug "API called: UsersApi#users_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
353
+ end
354
+ return data, status_code, headers
355
+ end
356
+
357
+ # Users API.
358
+ # @param username [String]
359
+ # @param notification [Notification]
360
+ # @param [Hash] opts the optional parameters
361
+ # @option opts [Integer] :page A page number within the paginated result set.
362
+ # @option opts [Integer] :page_size Number of results to return per page.
363
+ # @option opts [String] :username2
364
+ # @return [PaginatedNotificationList]
365
+ def users_notifications_create(username, notification, opts = {})
366
+ data, _status_code, _headers = users_notifications_create_with_http_info(username, notification, opts)
367
+ data
368
+ end
369
+
370
+ # Users API.
371
+ # @param username [String]
372
+ # @param notification [Notification]
373
+ # @param [Hash] opts the optional parameters
374
+ # @option opts [Integer] :page A page number within the paginated result set.
375
+ # @option opts [Integer] :page_size Number of results to return per page.
376
+ # @option opts [String] :username2
377
+ # @return [Array<(PaginatedNotificationList, Integer, Hash)>] PaginatedNotificationList data, response status code and response headers
378
+ def users_notifications_create_with_http_info(username, notification, opts = {})
379
+ if @api_client.config.debugging
380
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_notifications_create ...'
381
+ end
382
+ # verify the required parameter 'username' is set
383
+ if @api_client.config.client_side_validation && username.nil?
384
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_notifications_create"
385
+ end
386
+ pattern = Regexp.new(/^[^\/]+$/)
387
+ if @api_client.config.client_side_validation && username !~ pattern
388
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_notifications_create, must conform to the pattern #{pattern}."
389
+ end
390
+
391
+ # verify the required parameter 'notification' is set
392
+ if @api_client.config.client_side_validation && notification.nil?
393
+ fail ArgumentError, "Missing the required parameter 'notification' when calling UsersApi.users_notifications_create"
394
+ end
395
+ # resource path
396
+ local_var_path = '/users/{username}/notifications/'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
397
+
398
+ # query parameters
399
+ query_params = opts[:query_params] || {}
400
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
401
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
402
+ query_params[:'username'] = opts[:'username2'] if !opts[:'username2'].nil?
403
+
404
+ # header parameters
405
+ header_params = opts[:header_params] || {}
406
+ # HTTP header 'Accept' (if needed)
407
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
408
+ # HTTP header 'Content-Type'
409
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
410
+ if !content_type.nil?
411
+ header_params['Content-Type'] = content_type
412
+ end
413
+
414
+ # form parameters
415
+ form_params = opts[:form_params] || {}
416
+
417
+ # http body (model)
418
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(notification)
419
+
420
+ # return_type
421
+ return_type = opts[:debug_return_type] || 'PaginatedNotificationList'
422
+
423
+ # auth_names
424
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
425
+
426
+ new_options = opts.merge(
427
+ :operation => :"UsersApi.users_notifications_create",
428
+ :header_params => header_params,
429
+ :query_params => query_params,
430
+ :form_params => form_params,
431
+ :body => post_body,
432
+ :auth_names => auth_names,
433
+ :return_type => return_type
434
+ )
435
+
436
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
437
+ if @api_client.config.debugging
438
+ @api_client.config.logger.debug "API called: UsersApi#users_notifications_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
439
+ end
440
+ return data, status_code, headers
441
+ end
442
+
443
+ # Users API.
444
+ # @param subscription_id [Integer]
445
+ # @param username [String]
446
+ # @param [Hash] opts the optional parameters
447
+ # @return [nil]
448
+ def users_notifications_destroy(subscription_id, username, opts = {})
449
+ users_notifications_destroy_with_http_info(subscription_id, username, opts)
450
+ nil
451
+ end
452
+
453
+ # Users API.
454
+ # @param subscription_id [Integer]
455
+ # @param username [String]
456
+ # @param [Hash] opts the optional parameters
457
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
458
+ def users_notifications_destroy_with_http_info(subscription_id, username, opts = {})
459
+ if @api_client.config.debugging
460
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_notifications_destroy ...'
461
+ end
462
+ # verify the required parameter 'subscription_id' is set
463
+ if @api_client.config.client_side_validation && subscription_id.nil?
464
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling UsersApi.users_notifications_destroy"
465
+ end
466
+ # verify the required parameter 'username' is set
467
+ if @api_client.config.client_side_validation && username.nil?
468
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_notifications_destroy"
469
+ end
470
+ pattern = Regexp.new(/^[^\/]+$/)
471
+ if @api_client.config.client_side_validation && username !~ pattern
472
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_notifications_destroy, must conform to the pattern #{pattern}."
473
+ end
474
+
475
+ # resource path
476
+ local_var_path = '/users/{username}/notifications/{subscription_id}/'.sub('{' + 'subscription_id' + '}', CGI.escape(subscription_id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
477
+
478
+ # query parameters
479
+ query_params = opts[:query_params] || {}
480
+
481
+ # header parameters
482
+ header_params = opts[:header_params] || {}
483
+
484
+ # form parameters
485
+ form_params = opts[:form_params] || {}
486
+
487
+ # http body (model)
488
+ post_body = opts[:debug_body]
489
+
490
+ # return_type
491
+ return_type = opts[:debug_return_type]
492
+
493
+ # auth_names
494
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
495
+
496
+ new_options = opts.merge(
497
+ :operation => :"UsersApi.users_notifications_destroy",
498
+ :header_params => header_params,
499
+ :query_params => query_params,
500
+ :form_params => form_params,
501
+ :body => post_body,
502
+ :auth_names => auth_names,
503
+ :return_type => return_type
504
+ )
505
+
506
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
507
+ if @api_client.config.debugging
508
+ @api_client.config.logger.debug "API called: UsersApi#users_notifications_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
509
+ end
510
+ return data, status_code, headers
511
+ end
512
+
513
+ # Users API.
514
+ # @param username [String]
515
+ # @param [Hash] opts the optional parameters
516
+ # @option opts [Integer] :page A page number within the paginated result set.
517
+ # @option opts [Integer] :page_size Number of results to return per page.
518
+ # @option opts [String] :username2
519
+ # @return [PaginatedNotificationList]
520
+ def users_notifications_list(username, opts = {})
521
+ data, _status_code, _headers = users_notifications_list_with_http_info(username, opts)
522
+ data
523
+ end
524
+
525
+ # Users API.
526
+ # @param username [String]
527
+ # @param [Hash] opts the optional parameters
528
+ # @option opts [Integer] :page A page number within the paginated result set.
529
+ # @option opts [Integer] :page_size Number of results to return per page.
530
+ # @option opts [String] :username2
531
+ # @return [Array<(PaginatedNotificationList, Integer, Hash)>] PaginatedNotificationList data, response status code and response headers
532
+ def users_notifications_list_with_http_info(username, opts = {})
533
+ if @api_client.config.debugging
534
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_notifications_list ...'
535
+ end
536
+ # verify the required parameter 'username' is set
537
+ if @api_client.config.client_side_validation && username.nil?
538
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_notifications_list"
539
+ end
540
+ pattern = Regexp.new(/^[^\/]+$/)
541
+ if @api_client.config.client_side_validation && username !~ pattern
542
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_notifications_list, must conform to the pattern #{pattern}."
543
+ end
544
+
545
+ # resource path
546
+ local_var_path = '/users/{username}/notifications/'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
547
+
548
+ # query parameters
549
+ query_params = opts[:query_params] || {}
550
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
551
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
552
+ query_params[:'username'] = opts[:'username2'] if !opts[:'username2'].nil?
553
+
554
+ # header parameters
555
+ header_params = opts[:header_params] || {}
556
+ # HTTP header 'Accept' (if needed)
557
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
558
+
559
+ # form parameters
560
+ form_params = opts[:form_params] || {}
561
+
562
+ # http body (model)
563
+ post_body = opts[:debug_body]
564
+
565
+ # return_type
566
+ return_type = opts[:debug_return_type] || 'PaginatedNotificationList'
567
+
568
+ # auth_names
569
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
570
+
571
+ new_options = opts.merge(
572
+ :operation => :"UsersApi.users_notifications_list",
573
+ :header_params => header_params,
574
+ :query_params => query_params,
575
+ :form_params => form_params,
576
+ :body => post_body,
577
+ :auth_names => auth_names,
578
+ :return_type => return_type
579
+ )
580
+
581
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
582
+ if @api_client.config.debugging
583
+ @api_client.config.logger.debug "API called: UsersApi#users_notifications_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
584
+ end
585
+ return data, status_code, headers
586
+ end
587
+
588
+ # Users API.
589
+ # @param subscription_id [Integer]
590
+ # @param username [String]
591
+ # @param [Hash] opts the optional parameters
592
+ # @option opts [PatchedNotification] :patched_notification
593
+ # @return [Notification]
594
+ def users_notifications_partial_update(subscription_id, username, opts = {})
595
+ data, _status_code, _headers = users_notifications_partial_update_with_http_info(subscription_id, username, opts)
596
+ data
597
+ end
598
+
599
+ # Users API.
600
+ # @param subscription_id [Integer]
601
+ # @param username [String]
602
+ # @param [Hash] opts the optional parameters
603
+ # @option opts [PatchedNotification] :patched_notification
604
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
605
+ def users_notifications_partial_update_with_http_info(subscription_id, username, opts = {})
606
+ if @api_client.config.debugging
607
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_notifications_partial_update ...'
608
+ end
609
+ # verify the required parameter 'subscription_id' is set
610
+ if @api_client.config.client_side_validation && subscription_id.nil?
611
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling UsersApi.users_notifications_partial_update"
612
+ end
613
+ # verify the required parameter 'username' is set
614
+ if @api_client.config.client_side_validation && username.nil?
615
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_notifications_partial_update"
616
+ end
617
+ pattern = Regexp.new(/^[^\/]+$/)
618
+ if @api_client.config.client_side_validation && username !~ pattern
619
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_notifications_partial_update, must conform to the pattern #{pattern}."
620
+ end
621
+
622
+ # resource path
623
+ local_var_path = '/users/{username}/notifications/{subscription_id}/'.sub('{' + 'subscription_id' + '}', CGI.escape(subscription_id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
624
+
625
+ # query parameters
626
+ query_params = opts[:query_params] || {}
627
+
628
+ # header parameters
629
+ header_params = opts[:header_params] || {}
630
+ # HTTP header 'Accept' (if needed)
631
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
632
+ # HTTP header 'Content-Type'
633
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
634
+ if !content_type.nil?
635
+ header_params['Content-Type'] = content_type
636
+ end
637
+
638
+ # form parameters
639
+ form_params = opts[:form_params] || {}
640
+
641
+ # http body (model)
642
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_notification'])
643
+
644
+ # return_type
645
+ return_type = opts[:debug_return_type] || 'Notification'
646
+
647
+ # auth_names
648
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
649
+
650
+ new_options = opts.merge(
651
+ :operation => :"UsersApi.users_notifications_partial_update",
652
+ :header_params => header_params,
653
+ :query_params => query_params,
654
+ :form_params => form_params,
655
+ :body => post_body,
656
+ :auth_names => auth_names,
657
+ :return_type => return_type
658
+ )
659
+
660
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
661
+ if @api_client.config.debugging
662
+ @api_client.config.logger.debug "API called: UsersApi#users_notifications_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
663
+ end
664
+ return data, status_code, headers
665
+ end
666
+
667
+ # Users API.
668
+ # @param subscription_id [Integer]
669
+ # @param username [String]
670
+ # @param [Hash] opts the optional parameters
671
+ # @return [Notification]
672
+ def users_notifications_retrieve(subscription_id, username, opts = {})
673
+ data, _status_code, _headers = users_notifications_retrieve_with_http_info(subscription_id, username, opts)
674
+ data
675
+ end
676
+
677
+ # Users API.
678
+ # @param subscription_id [Integer]
679
+ # @param username [String]
680
+ # @param [Hash] opts the optional parameters
681
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
682
+ def users_notifications_retrieve_with_http_info(subscription_id, username, opts = {})
683
+ if @api_client.config.debugging
684
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_notifications_retrieve ...'
685
+ end
686
+ # verify the required parameter 'subscription_id' is set
687
+ if @api_client.config.client_side_validation && subscription_id.nil?
688
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling UsersApi.users_notifications_retrieve"
689
+ end
690
+ # verify the required parameter 'username' is set
691
+ if @api_client.config.client_side_validation && username.nil?
692
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_notifications_retrieve"
693
+ end
694
+ pattern = Regexp.new(/^[^\/]+$/)
695
+ if @api_client.config.client_side_validation && username !~ pattern
696
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_notifications_retrieve, must conform to the pattern #{pattern}."
697
+ end
698
+
699
+ # resource path
700
+ local_var_path = '/users/{username}/notifications/{subscription_id}/'.sub('{' + 'subscription_id' + '}', CGI.escape(subscription_id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
701
+
702
+ # query parameters
703
+ query_params = opts[:query_params] || {}
704
+
705
+ # header parameters
706
+ header_params = opts[:header_params] || {}
707
+ # HTTP header 'Accept' (if needed)
708
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
709
+
710
+ # form parameters
711
+ form_params = opts[:form_params] || {}
712
+
713
+ # http body (model)
714
+ post_body = opts[:debug_body]
715
+
716
+ # return_type
717
+ return_type = opts[:debug_return_type] || 'Notification'
718
+
719
+ # auth_names
720
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
721
+
722
+ new_options = opts.merge(
723
+ :operation => :"UsersApi.users_notifications_retrieve",
724
+ :header_params => header_params,
725
+ :query_params => query_params,
726
+ :form_params => form_params,
727
+ :body => post_body,
728
+ :auth_names => auth_names,
729
+ :return_type => return_type
730
+ )
731
+
732
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
733
+ if @api_client.config.debugging
734
+ @api_client.config.logger.debug "API called: UsersApi#users_notifications_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
735
+ end
736
+ return data, status_code, headers
737
+ end
738
+
739
+ # Users API.
740
+ # @param subscription_id [Integer]
741
+ # @param username [String]
742
+ # @param notification [Notification]
743
+ # @param [Hash] opts the optional parameters
744
+ # @return [Notification]
745
+ def users_notifications_update(subscription_id, username, notification, opts = {})
746
+ data, _status_code, _headers = users_notifications_update_with_http_info(subscription_id, username, notification, opts)
747
+ data
748
+ end
749
+
750
+ # Users API.
751
+ # @param subscription_id [Integer]
752
+ # @param username [String]
753
+ # @param notification [Notification]
754
+ # @param [Hash] opts the optional parameters
755
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
756
+ def users_notifications_update_with_http_info(subscription_id, username, notification, opts = {})
757
+ if @api_client.config.debugging
758
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_notifications_update ...'
759
+ end
760
+ # verify the required parameter 'subscription_id' is set
761
+ if @api_client.config.client_side_validation && subscription_id.nil?
762
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling UsersApi.users_notifications_update"
763
+ end
764
+ # verify the required parameter 'username' is set
765
+ if @api_client.config.client_side_validation && username.nil?
766
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_notifications_update"
767
+ end
768
+ pattern = Regexp.new(/^[^\/]+$/)
769
+ if @api_client.config.client_side_validation && username !~ pattern
770
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_notifications_update, must conform to the pattern #{pattern}."
771
+ end
772
+
773
+ # verify the required parameter 'notification' is set
774
+ if @api_client.config.client_side_validation && notification.nil?
775
+ fail ArgumentError, "Missing the required parameter 'notification' when calling UsersApi.users_notifications_update"
776
+ end
777
+ # resource path
778
+ local_var_path = '/users/{username}/notifications/{subscription_id}/'.sub('{' + 'subscription_id' + '}', CGI.escape(subscription_id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
779
+
780
+ # query parameters
781
+ query_params = opts[:query_params] || {}
782
+
783
+ # header parameters
784
+ header_params = opts[:header_params] || {}
785
+ # HTTP header 'Accept' (if needed)
786
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
787
+ # HTTP header 'Content-Type'
788
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
789
+ if !content_type.nil?
790
+ header_params['Content-Type'] = content_type
791
+ end
792
+
793
+ # form parameters
794
+ form_params = opts[:form_params] || {}
795
+
796
+ # http body (model)
797
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(notification)
798
+
799
+ # return_type
800
+ return_type = opts[:debug_return_type] || 'Notification'
801
+
802
+ # auth_names
803
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
804
+
805
+ new_options = opts.merge(
806
+ :operation => :"UsersApi.users_notifications_update",
807
+ :header_params => header_params,
808
+ :query_params => query_params,
809
+ :form_params => form_params,
810
+ :body => post_body,
811
+ :auth_names => auth_names,
812
+ :return_type => return_type
813
+ )
814
+
815
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
816
+ if @api_client.config.debugging
817
+ @api_client.config.logger.debug "API called: UsersApi#users_notifications_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
818
+ end
819
+ return data, status_code, headers
820
+ end
821
+
822
+ # Users API.
823
+ # @param username [String]
824
+ # @param [Hash] opts the optional parameters
825
+ # @option opts [PatchedBasicUser] :patched_basic_user
826
+ # @return [BasicUser]
827
+ def users_partial_update(username, opts = {})
828
+ data, _status_code, _headers = users_partial_update_with_http_info(username, opts)
829
+ data
830
+ end
831
+
832
+ # Users API.
833
+ # @param username [String]
834
+ # @param [Hash] opts the optional parameters
835
+ # @option opts [PatchedBasicUser] :patched_basic_user
836
+ # @return [Array<(BasicUser, Integer, Hash)>] BasicUser data, response status code and response headers
837
+ def users_partial_update_with_http_info(username, opts = {})
838
+ if @api_client.config.debugging
839
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_partial_update ...'
840
+ end
841
+ # verify the required parameter 'username' is set
842
+ if @api_client.config.client_side_validation && username.nil?
843
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_partial_update"
844
+ end
845
+ pattern = Regexp.new(/^[^\/]+$/)
846
+ if @api_client.config.client_side_validation && username !~ pattern
847
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_partial_update, must conform to the pattern #{pattern}."
848
+ end
849
+
850
+ # resource path
851
+ local_var_path = '/users/{username}/'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
852
+
853
+ # query parameters
854
+ query_params = opts[:query_params] || {}
855
+
856
+ # header parameters
857
+ header_params = opts[:header_params] || {}
858
+ # HTTP header 'Accept' (if needed)
859
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
860
+ # HTTP header 'Content-Type'
861
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
862
+ if !content_type.nil?
863
+ header_params['Content-Type'] = content_type
864
+ end
865
+
866
+ # form parameters
867
+ form_params = opts[:form_params] || {}
868
+
869
+ # http body (model)
870
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_basic_user'])
871
+
872
+ # return_type
873
+ return_type = opts[:debug_return_type] || 'BasicUser'
874
+
875
+ # auth_names
876
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
877
+
878
+ new_options = opts.merge(
879
+ :operation => :"UsersApi.users_partial_update",
880
+ :header_params => header_params,
881
+ :query_params => query_params,
882
+ :form_params => form_params,
883
+ :body => post_body,
884
+ :auth_names => auth_names,
885
+ :return_type => return_type
886
+ )
887
+
888
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
889
+ if @api_client.config.debugging
890
+ @api_client.config.logger.debug "API called: UsersApi#users_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
891
+ end
892
+ return data, status_code, headers
893
+ end
894
+
895
+ # Users API.
896
+ # @param username [String]
897
+ # @param [Hash] opts the optional parameters
898
+ # @return [BasicUser]
899
+ def users_retrieve(username, opts = {})
900
+ data, _status_code, _headers = users_retrieve_with_http_info(username, opts)
901
+ data
902
+ end
903
+
904
+ # Users API.
905
+ # @param username [String]
906
+ # @param [Hash] opts the optional parameters
907
+ # @return [Array<(BasicUser, Integer, Hash)>] BasicUser data, response status code and response headers
908
+ def users_retrieve_with_http_info(username, opts = {})
909
+ if @api_client.config.debugging
910
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_retrieve ...'
911
+ end
912
+ # verify the required parameter 'username' is set
913
+ if @api_client.config.client_side_validation && username.nil?
914
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_retrieve"
915
+ end
916
+ pattern = Regexp.new(/^[^\/]+$/)
917
+ if @api_client.config.client_side_validation && username !~ pattern
918
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_retrieve, must conform to the pattern #{pattern}."
919
+ end
920
+
921
+ # resource path
922
+ local_var_path = '/users/{username}/'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
923
+
924
+ # query parameters
925
+ query_params = opts[:query_params] || {}
926
+
927
+ # header parameters
928
+ header_params = opts[:header_params] || {}
929
+ # HTTP header 'Accept' (if needed)
930
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
931
+
932
+ # form parameters
933
+ form_params = opts[:form_params] || {}
934
+
935
+ # http body (model)
936
+ post_body = opts[:debug_body]
937
+
938
+ # return_type
939
+ return_type = opts[:debug_return_type] || 'BasicUser'
940
+
941
+ # auth_names
942
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
943
+
944
+ new_options = opts.merge(
945
+ :operation => :"UsersApi.users_retrieve",
946
+ :header_params => header_params,
947
+ :query_params => query_params,
948
+ :form_params => form_params,
949
+ :body => post_body,
950
+ :auth_names => auth_names,
951
+ :return_type => return_type
952
+ )
953
+
954
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
955
+ if @api_client.config.debugging
956
+ @api_client.config.logger.debug "API called: UsersApi#users_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
957
+ end
958
+ return data, status_code, headers
959
+ end
960
+
961
+ # Users API.
962
+ # @param username [String]
963
+ # @param [Hash] opts the optional parameters
964
+ # @return [BasicUser]
965
+ def users_statistics_retrieve(username, opts = {})
966
+ data, _status_code, _headers = users_statistics_retrieve_with_http_info(username, opts)
967
+ data
968
+ end
969
+
970
+ # Users API.
971
+ # @param username [String]
972
+ # @param [Hash] opts the optional parameters
973
+ # @return [Array<(BasicUser, Integer, Hash)>] BasicUser data, response status code and response headers
974
+ def users_statistics_retrieve_with_http_info(username, opts = {})
975
+ if @api_client.config.debugging
976
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_statistics_retrieve ...'
977
+ end
978
+ # verify the required parameter 'username' is set
979
+ if @api_client.config.client_side_validation && username.nil?
980
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_statistics_retrieve"
981
+ end
982
+ pattern = Regexp.new(/^[^\/]+$/)
983
+ if @api_client.config.client_side_validation && username !~ pattern
984
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_statistics_retrieve, must conform to the pattern #{pattern}."
985
+ end
986
+
987
+ # resource path
988
+ local_var_path = '/users/{username}/statistics/'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
989
+
990
+ # query parameters
991
+ query_params = opts[:query_params] || {}
992
+
993
+ # header parameters
994
+ header_params = opts[:header_params] || {}
995
+ # HTTP header 'Accept' (if needed)
996
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
997
+
998
+ # form parameters
999
+ form_params = opts[:form_params] || {}
1000
+
1001
+ # http body (model)
1002
+ post_body = opts[:debug_body]
1003
+
1004
+ # return_type
1005
+ return_type = opts[:debug_return_type] || 'BasicUser'
1006
+
1007
+ # auth_names
1008
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1009
+
1010
+ new_options = opts.merge(
1011
+ :operation => :"UsersApi.users_statistics_retrieve",
1012
+ :header_params => header_params,
1013
+ :query_params => query_params,
1014
+ :form_params => form_params,
1015
+ :body => post_body,
1016
+ :auth_names => auth_names,
1017
+ :return_type => return_type
1018
+ )
1019
+
1020
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1021
+ if @api_client.config.debugging
1022
+ @api_client.config.logger.debug "API called: UsersApi#users_statistics_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1023
+ end
1024
+ return data, status_code, headers
1025
+ end
1026
+
1027
+ # Users API.
1028
+ # @param username [String]
1029
+ # @param basic_user [BasicUser]
1030
+ # @param [Hash] opts the optional parameters
1031
+ # @return [BasicUser]
1032
+ def users_update(username, basic_user, opts = {})
1033
+ data, _status_code, _headers = users_update_with_http_info(username, basic_user, opts)
1034
+ data
1035
+ end
1036
+
1037
+ # Users API.
1038
+ # @param username [String]
1039
+ # @param basic_user [BasicUser]
1040
+ # @param [Hash] opts the optional parameters
1041
+ # @return [Array<(BasicUser, Integer, Hash)>] BasicUser data, response status code and response headers
1042
+ def users_update_with_http_info(username, basic_user, opts = {})
1043
+ if @api_client.config.debugging
1044
+ @api_client.config.logger.debug 'Calling API: UsersApi.users_update ...'
1045
+ end
1046
+ # verify the required parameter 'username' is set
1047
+ if @api_client.config.client_side_validation && username.nil?
1048
+ fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.users_update"
1049
+ end
1050
+ pattern = Regexp.new(/^[^\/]+$/)
1051
+ if @api_client.config.client_side_validation && username !~ pattern
1052
+ fail ArgumentError, "invalid value for 'username' when calling UsersApi.users_update, must conform to the pattern #{pattern}."
1053
+ end
1054
+
1055
+ # verify the required parameter 'basic_user' is set
1056
+ if @api_client.config.client_side_validation && basic_user.nil?
1057
+ fail ArgumentError, "Missing the required parameter 'basic_user' when calling UsersApi.users_update"
1058
+ end
1059
+ # resource path
1060
+ local_var_path = '/users/{username}/'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
1061
+
1062
+ # query parameters
1063
+ query_params = opts[:query_params] || {}
1064
+
1065
+ # header parameters
1066
+ header_params = opts[:header_params] || {}
1067
+ # HTTP header 'Accept' (if needed)
1068
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1069
+ # HTTP header 'Content-Type'
1070
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
1071
+ if !content_type.nil?
1072
+ header_params['Content-Type'] = content_type
1073
+ end
1074
+
1075
+ # form parameters
1076
+ form_params = opts[:form_params] || {}
1077
+
1078
+ # http body (model)
1079
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(basic_user)
1080
+
1081
+ # return_type
1082
+ return_type = opts[:debug_return_type] || 'BasicUser'
1083
+
1084
+ # auth_names
1085
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
1086
+
1087
+ new_options = opts.merge(
1088
+ :operation => :"UsersApi.users_update",
1089
+ :header_params => header_params,
1090
+ :query_params => query_params,
1091
+ :form_params => form_params,
1092
+ :body => post_body,
1093
+ :auth_names => auth_names,
1094
+ :return_type => return_type
1095
+ )
1096
+
1097
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1098
+ if @api_client.config.debugging
1099
+ @api_client.config.logger.debug "API called: UsersApi#users_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1100
+ end
1101
+ return data, status_code, headers
1102
+ end
1103
+ end
1104
+ end