kleister 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +18 -0
  3. data/CONTRIBUTING.md +121 -0
  4. data/DCO +34 -0
  5. data/LICENSE +202 -0
  6. data/README.md +67 -0
  7. data/lib/kleister/api/auth_api.rb +331 -0
  8. data/lib/kleister/api/fabric_api.rb +367 -0
  9. data/lib/kleister/api/forge_api.rb +367 -0
  10. data/lib/kleister/api/minecraft_api.rb +367 -0
  11. data/lib/kleister/api/mod_api.rb +1603 -0
  12. data/lib/kleister/api/neoforge_api.rb +367 -0
  13. data/lib/kleister/api/pack_api.rb +1603 -0
  14. data/lib/kleister/api/profile_api.rb +198 -0
  15. data/lib/kleister/api/quilt_api.rb +367 -0
  16. data/lib/kleister/api/team_api.rb +1283 -0
  17. data/lib/kleister/api/user_api.rb +1283 -0
  18. data/lib/kleister/api_client.rb +429 -0
  19. data/lib/kleister/api_error.rb +56 -0
  20. data/lib/kleister/configuration.rb +397 -0
  21. data/lib/kleister/models/auth_login.rb +231 -0
  22. data/lib/kleister/models/auth_token.rb +227 -0
  23. data/lib/kleister/models/auth_verify.rb +227 -0
  24. data/lib/kleister/models/build.rb +365 -0
  25. data/lib/kleister/models/build_version.rb +261 -0
  26. data/lib/kleister/models/build_version_params.rb +233 -0
  27. data/lib/kleister/models/build_versions.rb +235 -0
  28. data/lib/kleister/models/builds.rb +227 -0
  29. data/lib/kleister/models/fabric.rb +235 -0
  30. data/lib/kleister/models/fabric_build_params.rb +233 -0
  31. data/lib/kleister/models/fabric_builds.rb +228 -0
  32. data/lib/kleister/models/fabrics.rb +220 -0
  33. data/lib/kleister/models/forge.rb +243 -0
  34. data/lib/kleister/models/forge_build_params.rb +233 -0
  35. data/lib/kleister/models/forge_builds.rb +227 -0
  36. data/lib/kleister/models/forges.rb +220 -0
  37. data/lib/kleister/models/minecraft.rb +243 -0
  38. data/lib/kleister/models/minecraft_build_params.rb +233 -0
  39. data/lib/kleister/models/minecraft_builds.rb +228 -0
  40. data/lib/kleister/models/minecrafts.rb +220 -0
  41. data/lib/kleister/models/mod.rb +350 -0
  42. data/lib/kleister/models/mod_team_params.rb +265 -0
  43. data/lib/kleister/models/mod_teams.rb +227 -0
  44. data/lib/kleister/models/mod_user_params.rb +265 -0
  45. data/lib/kleister/models/mod_users.rb +227 -0
  46. data/lib/kleister/models/mods.rb +220 -0
  47. data/lib/kleister/models/neoforge.rb +243 -0
  48. data/lib/kleister/models/neoforge_build_params.rb +233 -0
  49. data/lib/kleister/models/neoforge_builds.rb +228 -0
  50. data/lib/kleister/models/neoforges.rb +220 -0
  51. data/lib/kleister/models/notification.rb +228 -0
  52. data/lib/kleister/models/pack.rb +334 -0
  53. data/lib/kleister/models/pack_back.rb +289 -0
  54. data/lib/kleister/models/pack_icon.rb +289 -0
  55. data/lib/kleister/models/pack_logo.rb +289 -0
  56. data/lib/kleister/models/pack_team_params.rb +265 -0
  57. data/lib/kleister/models/pack_teams.rb +227 -0
  58. data/lib/kleister/models/pack_user_params.rb +265 -0
  59. data/lib/kleister/models/pack_users.rb +227 -0
  60. data/lib/kleister/models/packs.rb +220 -0
  61. data/lib/kleister/models/profile.rb +313 -0
  62. data/lib/kleister/models/quilt.rb +235 -0
  63. data/lib/kleister/models/quilt_build_params.rb +233 -0
  64. data/lib/kleister/models/quilt_builds.rb +227 -0
  65. data/lib/kleister/models/quilts.rb +220 -0
  66. data/lib/kleister/models/team.rb +267 -0
  67. data/lib/kleister/models/team_mod.rb +304 -0
  68. data/lib/kleister/models/team_mod_params.rb +265 -0
  69. data/lib/kleister/models/team_mods.rb +227 -0
  70. data/lib/kleister/models/team_pack.rb +304 -0
  71. data/lib/kleister/models/team_pack_params.rb +265 -0
  72. data/lib/kleister/models/team_packs.rb +227 -0
  73. data/lib/kleister/models/team_user_params.rb +265 -0
  74. data/lib/kleister/models/team_users.rb +227 -0
  75. data/lib/kleister/models/teams.rb +220 -0
  76. data/lib/kleister/models/user.rb +315 -0
  77. data/lib/kleister/models/user_auth.rb +234 -0
  78. data/lib/kleister/models/user_mod.rb +304 -0
  79. data/lib/kleister/models/user_mod_params.rb +265 -0
  80. data/lib/kleister/models/user_mods.rb +227 -0
  81. data/lib/kleister/models/user_pack.rb +304 -0
  82. data/lib/kleister/models/user_pack_params.rb +265 -0
  83. data/lib/kleister/models/user_packs.rb +227 -0
  84. data/lib/kleister/models/user_team.rb +304 -0
  85. data/lib/kleister/models/user_team_params.rb +265 -0
  86. data/lib/kleister/models/user_teams.rb +227 -0
  87. data/lib/kleister/models/users.rb +220 -0
  88. data/lib/kleister/models/validation.rb +220 -0
  89. data/lib/kleister/models/version.rb +280 -0
  90. data/lib/kleister/models/version_build_params.rb +233 -0
  91. data/lib/kleister/models/version_builds.rb +235 -0
  92. data/lib/kleister/models/version_file.rb +289 -0
  93. data/lib/kleister/models/versions.rb +227 -0
  94. data/lib/kleister/version.rb +13 -0
  95. data/lib/kleister.rb +121 -0
  96. metadata +180 -0
@@ -0,0 +1,1283 @@
1
+ # Kleister OpenAPI
2
+ #
3
+ # API definition for Kleister, manage mod packs for Minecraft
4
+ #
5
+ # The version of the OpenAPI document: 1.0.0-alpha1
6
+ # Contact: kleister@webhippie.de
7
+ # Generated by: https://openapi-generator.tech
8
+ # Generator version: 7.6.0
9
+ #
10
+
11
+ require 'cgi'
12
+
13
+ module Kleister
14
+ class UserApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+
21
+ # Attach a mod to user
22
+ # @param user_id [String] A user identifier or slug
23
+ # @param user_mod_params [UserModParams] The user mod data to attach
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [Notification]
26
+ def attach_user_to_mod(user_id, user_mod_params, opts = {})
27
+ data, _status_code, _headers = attach_user_to_mod_with_http_info(user_id, user_mod_params, opts)
28
+ data
29
+ end
30
+
31
+ # Attach a mod to user
32
+ # @param user_id [String] A user identifier or slug
33
+ # @param user_mod_params [UserModParams] The user mod data to attach
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
36
+ def attach_user_to_mod_with_http_info(user_id, user_mod_params, opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug 'Calling API: UserApi.attach_user_to_mod ...'
39
+ end
40
+ # verify the required parameter 'user_id' is set
41
+ if @api_client.config.client_side_validation && user_id.nil?
42
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.attach_user_to_mod"
43
+ end
44
+ # verify the required parameter 'user_mod_params' is set
45
+ if @api_client.config.client_side_validation && user_mod_params.nil?
46
+ raise ArgumentError, "Missing the required parameter 'user_mod_params' when calling UserApi.attach_user_to_mod"
47
+ end
48
+
49
+ # resource path
50
+ local_var_path = '/users/{user_id}/mods'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+ # HTTP header 'Content-Type'
60
+ content_type = @api_client.select_header_content_type(['application/json'])
61
+ unless content_type.nil?
62
+ header_params['Content-Type'] = content_type
63
+ end
64
+
65
+ # form parameters
66
+ form_params = opts[:form_params] || {}
67
+
68
+ # http body (model)
69
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_mod_params)
70
+
71
+ # return_type
72
+ return_type = opts[:debug_return_type] || 'Notification'
73
+
74
+ # auth_names
75
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
76
+
77
+ new_options = opts.merge(
78
+ operation: :'UserApi.attach_user_to_mod',
79
+ header_params: header_params,
80
+ query_params: query_params,
81
+ form_params: form_params,
82
+ body: post_body,
83
+ auth_names: auth_names,
84
+ return_type: return_type
85
+ )
86
+
87
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: UserApi#attach_user_to_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ [data, status_code, headers]
92
+ end
93
+
94
+ # Attach a pack to user
95
+ # @param user_id [String] A user identifier or slug
96
+ # @param user_pack_params [UserPackParams] The user pack data to attach
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [Notification]
99
+ def attach_user_to_pack(user_id, user_pack_params, opts = {})
100
+ data, _status_code, _headers = attach_user_to_pack_with_http_info(user_id, user_pack_params, opts)
101
+ data
102
+ end
103
+
104
+ # Attach a pack to user
105
+ # @param user_id [String] A user identifier or slug
106
+ # @param user_pack_params [UserPackParams] The user pack data to attach
107
+ # @param [Hash] opts the optional parameters
108
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
109
+ def attach_user_to_pack_with_http_info(user_id, user_pack_params, opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: UserApi.attach_user_to_pack ...'
112
+ end
113
+ # verify the required parameter 'user_id' is set
114
+ if @api_client.config.client_side_validation && user_id.nil?
115
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.attach_user_to_pack"
116
+ end
117
+ # verify the required parameter 'user_pack_params' is set
118
+ if @api_client.config.client_side_validation && user_pack_params.nil?
119
+ raise ArgumentError, "Missing the required parameter 'user_pack_params' when calling UserApi.attach_user_to_pack"
120
+ end
121
+
122
+ # resource path
123
+ local_var_path = '/users/{user_id}/packs'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
124
+
125
+ # query parameters
126
+ query_params = opts[:query_params] || {}
127
+
128
+ # header parameters
129
+ header_params = opts[:header_params] || {}
130
+ # HTTP header 'Accept' (if needed)
131
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
132
+ # HTTP header 'Content-Type'
133
+ content_type = @api_client.select_header_content_type(['application/json'])
134
+ unless content_type.nil?
135
+ header_params['Content-Type'] = content_type
136
+ end
137
+
138
+ # form parameters
139
+ form_params = opts[:form_params] || {}
140
+
141
+ # http body (model)
142
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_pack_params)
143
+
144
+ # return_type
145
+ return_type = opts[:debug_return_type] || 'Notification'
146
+
147
+ # auth_names
148
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
149
+
150
+ new_options = opts.merge(
151
+ operation: :'UserApi.attach_user_to_pack',
152
+ header_params: header_params,
153
+ query_params: query_params,
154
+ form_params: form_params,
155
+ body: post_body,
156
+ auth_names: auth_names,
157
+ return_type: return_type
158
+ )
159
+
160
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug "API called: UserApi#attach_user_to_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
163
+ end
164
+ [data, status_code, headers]
165
+ end
166
+
167
+ # Attach a team to user
168
+ # @param user_id [String] A user identifier or slug
169
+ # @param user_team_params [UserTeamParams] The user team data to attach
170
+ # @param [Hash] opts the optional parameters
171
+ # @return [Notification]
172
+ def attach_user_to_team(user_id, user_team_params, opts = {})
173
+ data, _status_code, _headers = attach_user_to_team_with_http_info(user_id, user_team_params, opts)
174
+ data
175
+ end
176
+
177
+ # Attach a team to user
178
+ # @param user_id [String] A user identifier or slug
179
+ # @param user_team_params [UserTeamParams] The user team data to attach
180
+ # @param [Hash] opts the optional parameters
181
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
182
+ def attach_user_to_team_with_http_info(user_id, user_team_params, opts = {})
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug 'Calling API: UserApi.attach_user_to_team ...'
185
+ end
186
+ # verify the required parameter 'user_id' is set
187
+ if @api_client.config.client_side_validation && user_id.nil?
188
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.attach_user_to_team"
189
+ end
190
+ # verify the required parameter 'user_team_params' is set
191
+ if @api_client.config.client_side_validation && user_team_params.nil?
192
+ raise ArgumentError, "Missing the required parameter 'user_team_params' when calling UserApi.attach_user_to_team"
193
+ end
194
+
195
+ # resource path
196
+ local_var_path = '/users/{user_id}/teams'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
197
+
198
+ # query parameters
199
+ query_params = opts[:query_params] || {}
200
+
201
+ # header parameters
202
+ header_params = opts[:header_params] || {}
203
+ # HTTP header 'Accept' (if needed)
204
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
205
+ # HTTP header 'Content-Type'
206
+ content_type = @api_client.select_header_content_type(['application/json'])
207
+ unless content_type.nil?
208
+ header_params['Content-Type'] = content_type
209
+ end
210
+
211
+ # form parameters
212
+ form_params = opts[:form_params] || {}
213
+
214
+ # http body (model)
215
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_team_params)
216
+
217
+ # return_type
218
+ return_type = opts[:debug_return_type] || 'Notification'
219
+
220
+ # auth_names
221
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
222
+
223
+ new_options = opts.merge(
224
+ operation: :'UserApi.attach_user_to_team',
225
+ header_params: header_params,
226
+ query_params: query_params,
227
+ form_params: form_params,
228
+ body: post_body,
229
+ auth_names: auth_names,
230
+ return_type: return_type
231
+ )
232
+
233
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
234
+ if @api_client.config.debugging
235
+ @api_client.config.logger.debug "API called: UserApi#attach_user_to_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
236
+ end
237
+ [data, status_code, headers]
238
+ end
239
+
240
+ # Create a new user
241
+ # @param user [User] The user data to create
242
+ # @param [Hash] opts the optional parameters
243
+ # @return [User]
244
+ def create_user(user, opts = {})
245
+ data, _status_code, _headers = create_user_with_http_info(user, opts)
246
+ data
247
+ end
248
+
249
+ # Create a new user
250
+ # @param user [User] The user data to create
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
253
+ def create_user_with_http_info(user, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: UserApi.create_user ...'
256
+ end
257
+ # verify the required parameter 'user' is set
258
+ if @api_client.config.client_side_validation && user.nil?
259
+ raise ArgumentError, "Missing the required parameter 'user' when calling UserApi.create_user"
260
+ end
261
+
262
+ # resource path
263
+ local_var_path = '/users'
264
+
265
+ # query parameters
266
+ query_params = opts[:query_params] || {}
267
+
268
+ # header parameters
269
+ header_params = opts[:header_params] || {}
270
+ # HTTP header 'Accept' (if needed)
271
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
272
+ # HTTP header 'Content-Type'
273
+ content_type = @api_client.select_header_content_type(['application/json'])
274
+ unless content_type.nil?
275
+ header_params['Content-Type'] = content_type
276
+ end
277
+
278
+ # form parameters
279
+ form_params = opts[:form_params] || {}
280
+
281
+ # http body (model)
282
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
283
+
284
+ # return_type
285
+ return_type = opts[:debug_return_type] || 'User'
286
+
287
+ # auth_names
288
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
289
+
290
+ new_options = opts.merge(
291
+ operation: :'UserApi.create_user',
292
+ header_params: header_params,
293
+ query_params: query_params,
294
+ form_params: form_params,
295
+ body: post_body,
296
+ auth_names: auth_names,
297
+ return_type: return_type
298
+ )
299
+
300
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug "API called: UserApi#create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
303
+ end
304
+ [data, status_code, headers]
305
+ end
306
+
307
+ # Delete a specific user
308
+ # @param user_id [String] A user identifier or slug
309
+ # @param [Hash] opts the optional parameters
310
+ # @return [Notification]
311
+ def delete_user(user_id, opts = {})
312
+ data, _status_code, _headers = delete_user_with_http_info(user_id, opts)
313
+ data
314
+ end
315
+
316
+ # Delete a specific user
317
+ # @param user_id [String] A user identifier or slug
318
+ # @param [Hash] opts the optional parameters
319
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
320
+ def delete_user_with_http_info(user_id, opts = {})
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug 'Calling API: UserApi.delete_user ...'
323
+ end
324
+ # verify the required parameter 'user_id' is set
325
+ if @api_client.config.client_side_validation && user_id.nil?
326
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.delete_user"
327
+ end
328
+
329
+ # resource path
330
+ local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
331
+
332
+ # query parameters
333
+ query_params = opts[:query_params] || {}
334
+
335
+ # header parameters
336
+ header_params = opts[:header_params] || {}
337
+ # HTTP header 'Accept' (if needed)
338
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
339
+
340
+ # form parameters
341
+ form_params = opts[:form_params] || {}
342
+
343
+ # http body (model)
344
+ post_body = opts[:debug_body]
345
+
346
+ # return_type
347
+ return_type = opts[:debug_return_type] || 'Notification'
348
+
349
+ # auth_names
350
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
351
+
352
+ new_options = opts.merge(
353
+ operation: :'UserApi.delete_user',
354
+ header_params: header_params,
355
+ query_params: query_params,
356
+ form_params: form_params,
357
+ body: post_body,
358
+ auth_names: auth_names,
359
+ return_type: return_type
360
+ )
361
+
362
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
363
+ if @api_client.config.debugging
364
+ @api_client.config.logger.debug "API called: UserApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
365
+ end
366
+ [data, status_code, headers]
367
+ end
368
+
369
+ # Unlink a mod from user
370
+ # @param user_id [String] A user identifier or slug
371
+ # @param user_mod_params [UserModParams] The user mod data to unlink
372
+ # @param [Hash] opts the optional parameters
373
+ # @return [Notification]
374
+ def delete_user_from_mod(user_id, user_mod_params, opts = {})
375
+ data, _status_code, _headers = delete_user_from_mod_with_http_info(user_id, user_mod_params, opts)
376
+ data
377
+ end
378
+
379
+ # Unlink a mod from user
380
+ # @param user_id [String] A user identifier or slug
381
+ # @param user_mod_params [UserModParams] The user mod data to unlink
382
+ # @param [Hash] opts the optional parameters
383
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
384
+ def delete_user_from_mod_with_http_info(user_id, user_mod_params, opts = {})
385
+ if @api_client.config.debugging
386
+ @api_client.config.logger.debug 'Calling API: UserApi.delete_user_from_mod ...'
387
+ end
388
+ # verify the required parameter 'user_id' is set
389
+ if @api_client.config.client_side_validation && user_id.nil?
390
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.delete_user_from_mod"
391
+ end
392
+ # verify the required parameter 'user_mod_params' is set
393
+ if @api_client.config.client_side_validation && user_mod_params.nil?
394
+ raise ArgumentError, "Missing the required parameter 'user_mod_params' when calling UserApi.delete_user_from_mod"
395
+ end
396
+
397
+ # resource path
398
+ local_var_path = '/users/{user_id}/mods'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
399
+
400
+ # query parameters
401
+ query_params = opts[:query_params] || {}
402
+
403
+ # header parameters
404
+ header_params = opts[:header_params] || {}
405
+ # HTTP header 'Accept' (if needed)
406
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
407
+ # HTTP header 'Content-Type'
408
+ content_type = @api_client.select_header_content_type(['application/json'])
409
+ unless content_type.nil?
410
+ header_params['Content-Type'] = content_type
411
+ end
412
+
413
+ # form parameters
414
+ form_params = opts[:form_params] || {}
415
+
416
+ # http body (model)
417
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_mod_params)
418
+
419
+ # return_type
420
+ return_type = opts[:debug_return_type] || 'Notification'
421
+
422
+ # auth_names
423
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
424
+
425
+ new_options = opts.merge(
426
+ operation: :'UserApi.delete_user_from_mod',
427
+ header_params: header_params,
428
+ query_params: query_params,
429
+ form_params: form_params,
430
+ body: post_body,
431
+ auth_names: auth_names,
432
+ return_type: return_type
433
+ )
434
+
435
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug "API called: UserApi#delete_user_from_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
438
+ end
439
+ [data, status_code, headers]
440
+ end
441
+
442
+ # Unlink a pack from user
443
+ # @param user_id [String] A user identifier or slug
444
+ # @param user_pack_params [UserPackParams] The user pack data to unlink
445
+ # @param [Hash] opts the optional parameters
446
+ # @return [Notification]
447
+ def delete_user_from_pack(user_id, user_pack_params, opts = {})
448
+ data, _status_code, _headers = delete_user_from_pack_with_http_info(user_id, user_pack_params, opts)
449
+ data
450
+ end
451
+
452
+ # Unlink a pack from user
453
+ # @param user_id [String] A user identifier or slug
454
+ # @param user_pack_params [UserPackParams] The user pack data to unlink
455
+ # @param [Hash] opts the optional parameters
456
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
457
+ def delete_user_from_pack_with_http_info(user_id, user_pack_params, opts = {})
458
+ if @api_client.config.debugging
459
+ @api_client.config.logger.debug 'Calling API: UserApi.delete_user_from_pack ...'
460
+ end
461
+ # verify the required parameter 'user_id' is set
462
+ if @api_client.config.client_side_validation && user_id.nil?
463
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.delete_user_from_pack"
464
+ end
465
+ # verify the required parameter 'user_pack_params' is set
466
+ if @api_client.config.client_side_validation && user_pack_params.nil?
467
+ raise ArgumentError, "Missing the required parameter 'user_pack_params' when calling UserApi.delete_user_from_pack"
468
+ end
469
+
470
+ # resource path
471
+ local_var_path = '/users/{user_id}/packs'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
472
+
473
+ # query parameters
474
+ query_params = opts[:query_params] || {}
475
+
476
+ # header parameters
477
+ header_params = opts[:header_params] || {}
478
+ # HTTP header 'Accept' (if needed)
479
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
480
+ # HTTP header 'Content-Type'
481
+ content_type = @api_client.select_header_content_type(['application/json'])
482
+ unless content_type.nil?
483
+ header_params['Content-Type'] = content_type
484
+ end
485
+
486
+ # form parameters
487
+ form_params = opts[:form_params] || {}
488
+
489
+ # http body (model)
490
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_pack_params)
491
+
492
+ # return_type
493
+ return_type = opts[:debug_return_type] || 'Notification'
494
+
495
+ # auth_names
496
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
497
+
498
+ new_options = opts.merge(
499
+ operation: :'UserApi.delete_user_from_pack',
500
+ header_params: header_params,
501
+ query_params: query_params,
502
+ form_params: form_params,
503
+ body: post_body,
504
+ auth_names: auth_names,
505
+ return_type: return_type
506
+ )
507
+
508
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
509
+ if @api_client.config.debugging
510
+ @api_client.config.logger.debug "API called: UserApi#delete_user_from_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
511
+ end
512
+ [data, status_code, headers]
513
+ end
514
+
515
+ # Unlink a team from user
516
+ # @param user_id [String] A user identifier or slug
517
+ # @param user_team_params [UserTeamParams] The user team data to unlink
518
+ # @param [Hash] opts the optional parameters
519
+ # @return [Notification]
520
+ def delete_user_from_team(user_id, user_team_params, opts = {})
521
+ data, _status_code, _headers = delete_user_from_team_with_http_info(user_id, user_team_params, opts)
522
+ data
523
+ end
524
+
525
+ # Unlink a team from user
526
+ # @param user_id [String] A user identifier or slug
527
+ # @param user_team_params [UserTeamParams] The user team data to unlink
528
+ # @param [Hash] opts the optional parameters
529
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
530
+ def delete_user_from_team_with_http_info(user_id, user_team_params, opts = {})
531
+ if @api_client.config.debugging
532
+ @api_client.config.logger.debug 'Calling API: UserApi.delete_user_from_team ...'
533
+ end
534
+ # verify the required parameter 'user_id' is set
535
+ if @api_client.config.client_side_validation && user_id.nil?
536
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.delete_user_from_team"
537
+ end
538
+ # verify the required parameter 'user_team_params' is set
539
+ if @api_client.config.client_side_validation && user_team_params.nil?
540
+ raise ArgumentError, "Missing the required parameter 'user_team_params' when calling UserApi.delete_user_from_team"
541
+ end
542
+
543
+ # resource path
544
+ local_var_path = '/users/{user_id}/teams'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
545
+
546
+ # query parameters
547
+ query_params = opts[:query_params] || {}
548
+
549
+ # header parameters
550
+ header_params = opts[:header_params] || {}
551
+ # HTTP header 'Accept' (if needed)
552
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
553
+ # HTTP header 'Content-Type'
554
+ content_type = @api_client.select_header_content_type(['application/json'])
555
+ unless content_type.nil?
556
+ header_params['Content-Type'] = content_type
557
+ end
558
+
559
+ # form parameters
560
+ form_params = opts[:form_params] || {}
561
+
562
+ # http body (model)
563
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_team_params)
564
+
565
+ # return_type
566
+ return_type = opts[:debug_return_type] || 'Notification'
567
+
568
+ # auth_names
569
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
570
+
571
+ new_options = opts.merge(
572
+ operation: :'UserApi.delete_user_from_team',
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(:DELETE, local_var_path, new_options)
582
+ if @api_client.config.debugging
583
+ @api_client.config.logger.debug "API called: UserApi#delete_user_from_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
584
+ end
585
+ [data, status_code, headers]
586
+ end
587
+
588
+ # Fetch all mods attached to user
589
+ # @param user_id [String] A user identifier or slug
590
+ # @param [Hash] opts the optional parameters
591
+ # @option opts [String] :search Search query
592
+ # @option opts [String] :sort Sorting column (default to 'name')
593
+ # @option opts [String] :order Sorting order (default to 'asc')
594
+ # @option opts [Integer] :limit Paging limit
595
+ # @option opts [Integer] :offset Paging offset
596
+ # @return [UserMods]
597
+ def list_user_mods(user_id, opts = {})
598
+ data, _status_code, _headers = list_user_mods_with_http_info(user_id, opts)
599
+ data
600
+ end
601
+
602
+ # Fetch all mods attached to user
603
+ # @param user_id [String] A user identifier or slug
604
+ # @param [Hash] opts the optional parameters
605
+ # @option opts [String] :search Search query
606
+ # @option opts [String] :sort Sorting column (default to 'name')
607
+ # @option opts [String] :order Sorting order (default to 'asc')
608
+ # @option opts [Integer] :limit Paging limit
609
+ # @option opts [Integer] :offset Paging offset
610
+ # @return [Array<(UserMods, Integer, Hash)>] UserMods data, response status code and response headers
611
+ def list_user_mods_with_http_info(user_id, opts = {})
612
+ if @api_client.config.debugging
613
+ @api_client.config.logger.debug 'Calling API: UserApi.list_user_mods ...'
614
+ end
615
+ # verify the required parameter 'user_id' is set
616
+ if @api_client.config.client_side_validation && user_id.nil?
617
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_mods"
618
+ end
619
+
620
+ allowable_values = %w[slug name]
621
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
622
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
623
+ end
624
+
625
+ allowable_values = %w[asc desc]
626
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
627
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
628
+ end
629
+
630
+ # resource path
631
+ local_var_path = '/users/{user_id}/mods'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
632
+
633
+ # query parameters
634
+ query_params = opts[:query_params] || {}
635
+ query_params[:search] = opts[:search] unless opts[:search].nil?
636
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
637
+ query_params[:order] = opts[:order] unless opts[:order].nil?
638
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
639
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
640
+
641
+ # header parameters
642
+ header_params = opts[:header_params] || {}
643
+ # HTTP header 'Accept' (if needed)
644
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
645
+
646
+ # form parameters
647
+ form_params = opts[:form_params] || {}
648
+
649
+ # http body (model)
650
+ post_body = opts[:debug_body]
651
+
652
+ # return_type
653
+ return_type = opts[:debug_return_type] || 'UserMods'
654
+
655
+ # auth_names
656
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
657
+
658
+ new_options = opts.merge(
659
+ operation: :'UserApi.list_user_mods',
660
+ header_params: header_params,
661
+ query_params: query_params,
662
+ form_params: form_params,
663
+ body: post_body,
664
+ auth_names: auth_names,
665
+ return_type: return_type
666
+ )
667
+
668
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
669
+ if @api_client.config.debugging
670
+ @api_client.config.logger.debug "API called: UserApi#list_user_mods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
671
+ end
672
+ [data, status_code, headers]
673
+ end
674
+
675
+ # Fetch all packs attached to user
676
+ # @param user_id [String] A user identifier or slug
677
+ # @param [Hash] opts the optional parameters
678
+ # @option opts [String] :search Search query
679
+ # @option opts [String] :sort Sorting column (default to 'name')
680
+ # @option opts [String] :order Sorting order (default to 'asc')
681
+ # @option opts [Integer] :limit Paging limit
682
+ # @option opts [Integer] :offset Paging offset
683
+ # @return [UserPacks]
684
+ def list_user_packs(user_id, opts = {})
685
+ data, _status_code, _headers = list_user_packs_with_http_info(user_id, opts)
686
+ data
687
+ end
688
+
689
+ # Fetch all packs attached to user
690
+ # @param user_id [String] A user identifier or slug
691
+ # @param [Hash] opts the optional parameters
692
+ # @option opts [String] :search Search query
693
+ # @option opts [String] :sort Sorting column (default to 'name')
694
+ # @option opts [String] :order Sorting order (default to 'asc')
695
+ # @option opts [Integer] :limit Paging limit
696
+ # @option opts [Integer] :offset Paging offset
697
+ # @return [Array<(UserPacks, Integer, Hash)>] UserPacks data, response status code and response headers
698
+ def list_user_packs_with_http_info(user_id, opts = {})
699
+ if @api_client.config.debugging
700
+ @api_client.config.logger.debug 'Calling API: UserApi.list_user_packs ...'
701
+ end
702
+ # verify the required parameter 'user_id' is set
703
+ if @api_client.config.client_side_validation && user_id.nil?
704
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_packs"
705
+ end
706
+
707
+ allowable_values = %w[slug name]
708
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
709
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
710
+ end
711
+
712
+ allowable_values = %w[asc desc]
713
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
714
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
715
+ end
716
+
717
+ # resource path
718
+ local_var_path = '/users/{user_id}/packs'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
719
+
720
+ # query parameters
721
+ query_params = opts[:query_params] || {}
722
+ query_params[:search] = opts[:search] unless opts[:search].nil?
723
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
724
+ query_params[:order] = opts[:order] unless opts[:order].nil?
725
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
726
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
727
+
728
+ # header parameters
729
+ header_params = opts[:header_params] || {}
730
+ # HTTP header 'Accept' (if needed)
731
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
732
+
733
+ # form parameters
734
+ form_params = opts[:form_params] || {}
735
+
736
+ # http body (model)
737
+ post_body = opts[:debug_body]
738
+
739
+ # return_type
740
+ return_type = opts[:debug_return_type] || 'UserPacks'
741
+
742
+ # auth_names
743
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
744
+
745
+ new_options = opts.merge(
746
+ operation: :'UserApi.list_user_packs',
747
+ header_params: header_params,
748
+ query_params: query_params,
749
+ form_params: form_params,
750
+ body: post_body,
751
+ auth_names: auth_names,
752
+ return_type: return_type
753
+ )
754
+
755
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
756
+ if @api_client.config.debugging
757
+ @api_client.config.logger.debug "API called: UserApi#list_user_packs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
758
+ end
759
+ [data, status_code, headers]
760
+ end
761
+
762
+ # Fetch all teams attached to user
763
+ # @param user_id [String] A user identifier or slug
764
+ # @param [Hash] opts the optional parameters
765
+ # @option opts [String] :search Search query
766
+ # @option opts [String] :sort Sorting column (default to 'name')
767
+ # @option opts [String] :order Sorting order (default to 'asc')
768
+ # @option opts [Integer] :limit Paging limit
769
+ # @option opts [Integer] :offset Paging offset
770
+ # @return [UserTeams]
771
+ def list_user_teams(user_id, opts = {})
772
+ data, _status_code, _headers = list_user_teams_with_http_info(user_id, opts)
773
+ data
774
+ end
775
+
776
+ # Fetch all teams attached to user
777
+ # @param user_id [String] A user identifier or slug
778
+ # @param [Hash] opts the optional parameters
779
+ # @option opts [String] :search Search query
780
+ # @option opts [String] :sort Sorting column (default to 'name')
781
+ # @option opts [String] :order Sorting order (default to 'asc')
782
+ # @option opts [Integer] :limit Paging limit
783
+ # @option opts [Integer] :offset Paging offset
784
+ # @return [Array<(UserTeams, Integer, Hash)>] UserTeams data, response status code and response headers
785
+ def list_user_teams_with_http_info(user_id, opts = {})
786
+ if @api_client.config.debugging
787
+ @api_client.config.logger.debug 'Calling API: UserApi.list_user_teams ...'
788
+ end
789
+ # verify the required parameter 'user_id' is set
790
+ if @api_client.config.client_side_validation && user_id.nil?
791
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_teams"
792
+ end
793
+
794
+ allowable_values = %w[slug name]
795
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
796
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
797
+ end
798
+
799
+ allowable_values = %w[asc desc]
800
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
801
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
802
+ end
803
+
804
+ # resource path
805
+ local_var_path = '/users/{user_id}/teams'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
806
+
807
+ # query parameters
808
+ query_params = opts[:query_params] || {}
809
+ query_params[:search] = opts[:search] unless opts[:search].nil?
810
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
811
+ query_params[:order] = opts[:order] unless opts[:order].nil?
812
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
813
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
814
+
815
+ # header parameters
816
+ header_params = opts[:header_params] || {}
817
+ # HTTP header 'Accept' (if needed)
818
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
819
+
820
+ # form parameters
821
+ form_params = opts[:form_params] || {}
822
+
823
+ # http body (model)
824
+ post_body = opts[:debug_body]
825
+
826
+ # return_type
827
+ return_type = opts[:debug_return_type] || 'UserTeams'
828
+
829
+ # auth_names
830
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
831
+
832
+ new_options = opts.merge(
833
+ operation: :'UserApi.list_user_teams',
834
+ header_params: header_params,
835
+ query_params: query_params,
836
+ form_params: form_params,
837
+ body: post_body,
838
+ auth_names: auth_names,
839
+ return_type: return_type
840
+ )
841
+
842
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
843
+ if @api_client.config.debugging
844
+ @api_client.config.logger.debug "API called: UserApi#list_user_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
845
+ end
846
+ [data, status_code, headers]
847
+ end
848
+
849
+ # Fetch all available users
850
+ # @param [Hash] opts the optional parameters
851
+ # @option opts [String] :search Search query
852
+ # @option opts [String] :sort Sorting column (default to 'username')
853
+ # @option opts [String] :order Sorting order (default to 'asc')
854
+ # @option opts [Integer] :limit Paging limit (default to 100)
855
+ # @option opts [Integer] :offset Paging offset (default to 0)
856
+ # @return [Users]
857
+ def list_users(opts = {})
858
+ data, _status_code, _headers = list_users_with_http_info(opts)
859
+ data
860
+ end
861
+
862
+ # Fetch all available users
863
+ # @param [Hash] opts the optional parameters
864
+ # @option opts [String] :search Search query
865
+ # @option opts [String] :sort Sorting column (default to 'username')
866
+ # @option opts [String] :order Sorting order (default to 'asc')
867
+ # @option opts [Integer] :limit Paging limit (default to 100)
868
+ # @option opts [Integer] :offset Paging offset (default to 0)
869
+ # @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers
870
+ def list_users_with_http_info(opts = {})
871
+ if @api_client.config.debugging
872
+ @api_client.config.logger.debug 'Calling API: UserApi.list_users ...'
873
+ end
874
+ allowable_values = %w[username email fullname admin active]
875
+ if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
876
+ raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
877
+ end
878
+
879
+ allowable_values = %w[asc desc]
880
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
881
+ raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
882
+ end
883
+
884
+ # resource path
885
+ local_var_path = '/users'
886
+
887
+ # query parameters
888
+ query_params = opts[:query_params] || {}
889
+ query_params[:search] = opts[:search] unless opts[:search].nil?
890
+ query_params[:sort] = opts[:sort] unless opts[:sort].nil?
891
+ query_params[:order] = opts[:order] unless opts[:order].nil?
892
+ query_params[:limit] = opts[:limit] unless opts[:limit].nil?
893
+ query_params[:offset] = opts[:offset] unless opts[:offset].nil?
894
+
895
+ # header parameters
896
+ header_params = opts[:header_params] || {}
897
+ # HTTP header 'Accept' (if needed)
898
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
899
+
900
+ # form parameters
901
+ form_params = opts[:form_params] || {}
902
+
903
+ # http body (model)
904
+ post_body = opts[:debug_body]
905
+
906
+ # return_type
907
+ return_type = opts[:debug_return_type] || 'Users'
908
+
909
+ # auth_names
910
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
911
+
912
+ new_options = opts.merge(
913
+ operation: :'UserApi.list_users',
914
+ header_params: header_params,
915
+ query_params: query_params,
916
+ form_params: form_params,
917
+ body: post_body,
918
+ auth_names: auth_names,
919
+ return_type: return_type
920
+ )
921
+
922
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
923
+ if @api_client.config.debugging
924
+ @api_client.config.logger.debug "API called: UserApi#list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
925
+ end
926
+ [data, status_code, headers]
927
+ end
928
+
929
+ # Update mod perms for user
930
+ # @param user_id [String] A user identifier or slug
931
+ # @param user_mod_params [UserModParams] The user mod data to update
932
+ # @param [Hash] opts the optional parameters
933
+ # @return [Notification]
934
+ def permit_user_mod(user_id, user_mod_params, opts = {})
935
+ data, _status_code, _headers = permit_user_mod_with_http_info(user_id, user_mod_params, opts)
936
+ data
937
+ end
938
+
939
+ # Update mod perms for user
940
+ # @param user_id [String] A user identifier or slug
941
+ # @param user_mod_params [UserModParams] The user mod data to update
942
+ # @param [Hash] opts the optional parameters
943
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
944
+ def permit_user_mod_with_http_info(user_id, user_mod_params, opts = {})
945
+ if @api_client.config.debugging
946
+ @api_client.config.logger.debug 'Calling API: UserApi.permit_user_mod ...'
947
+ end
948
+ # verify the required parameter 'user_id' is set
949
+ if @api_client.config.client_side_validation && user_id.nil?
950
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.permit_user_mod"
951
+ end
952
+ # verify the required parameter 'user_mod_params' is set
953
+ if @api_client.config.client_side_validation && user_mod_params.nil?
954
+ raise ArgumentError, "Missing the required parameter 'user_mod_params' when calling UserApi.permit_user_mod"
955
+ end
956
+
957
+ # resource path
958
+ local_var_path = '/users/{user_id}/mods'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
959
+
960
+ # query parameters
961
+ query_params = opts[:query_params] || {}
962
+
963
+ # header parameters
964
+ header_params = opts[:header_params] || {}
965
+ # HTTP header 'Accept' (if needed)
966
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
967
+ # HTTP header 'Content-Type'
968
+ content_type = @api_client.select_header_content_type(['application/json'])
969
+ unless content_type.nil?
970
+ header_params['Content-Type'] = content_type
971
+ end
972
+
973
+ # form parameters
974
+ form_params = opts[:form_params] || {}
975
+
976
+ # http body (model)
977
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_mod_params)
978
+
979
+ # return_type
980
+ return_type = opts[:debug_return_type] || 'Notification'
981
+
982
+ # auth_names
983
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
984
+
985
+ new_options = opts.merge(
986
+ operation: :'UserApi.permit_user_mod',
987
+ header_params: header_params,
988
+ query_params: query_params,
989
+ form_params: form_params,
990
+ body: post_body,
991
+ auth_names: auth_names,
992
+ return_type: return_type
993
+ )
994
+
995
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
996
+ if @api_client.config.debugging
997
+ @api_client.config.logger.debug "API called: UserApi#permit_user_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
998
+ end
999
+ [data, status_code, headers]
1000
+ end
1001
+
1002
+ # Update pack perms for user
1003
+ # @param user_id [String] A user identifier or slug
1004
+ # @param user_pack_params [UserPackParams] The user pack data to update
1005
+ # @param [Hash] opts the optional parameters
1006
+ # @return [Notification]
1007
+ def permit_user_pack(user_id, user_pack_params, opts = {})
1008
+ data, _status_code, _headers = permit_user_pack_with_http_info(user_id, user_pack_params, opts)
1009
+ data
1010
+ end
1011
+
1012
+ # Update pack perms for user
1013
+ # @param user_id [String] A user identifier or slug
1014
+ # @param user_pack_params [UserPackParams] The user pack data to update
1015
+ # @param [Hash] opts the optional parameters
1016
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
1017
+ def permit_user_pack_with_http_info(user_id, user_pack_params, opts = {})
1018
+ if @api_client.config.debugging
1019
+ @api_client.config.logger.debug 'Calling API: UserApi.permit_user_pack ...'
1020
+ end
1021
+ # verify the required parameter 'user_id' is set
1022
+ if @api_client.config.client_side_validation && user_id.nil?
1023
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.permit_user_pack"
1024
+ end
1025
+ # verify the required parameter 'user_pack_params' is set
1026
+ if @api_client.config.client_side_validation && user_pack_params.nil?
1027
+ raise ArgumentError, "Missing the required parameter 'user_pack_params' when calling UserApi.permit_user_pack"
1028
+ end
1029
+
1030
+ # resource path
1031
+ local_var_path = '/users/{user_id}/packs'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
1032
+
1033
+ # query parameters
1034
+ query_params = opts[:query_params] || {}
1035
+
1036
+ # header parameters
1037
+ header_params = opts[:header_params] || {}
1038
+ # HTTP header 'Accept' (if needed)
1039
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1040
+ # HTTP header 'Content-Type'
1041
+ content_type = @api_client.select_header_content_type(['application/json'])
1042
+ unless content_type.nil?
1043
+ header_params['Content-Type'] = content_type
1044
+ end
1045
+
1046
+ # form parameters
1047
+ form_params = opts[:form_params] || {}
1048
+
1049
+ # http body (model)
1050
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_pack_params)
1051
+
1052
+ # return_type
1053
+ return_type = opts[:debug_return_type] || 'Notification'
1054
+
1055
+ # auth_names
1056
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1057
+
1058
+ new_options = opts.merge(
1059
+ operation: :'UserApi.permit_user_pack',
1060
+ header_params: header_params,
1061
+ query_params: query_params,
1062
+ form_params: form_params,
1063
+ body: post_body,
1064
+ auth_names: auth_names,
1065
+ return_type: return_type
1066
+ )
1067
+
1068
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1069
+ if @api_client.config.debugging
1070
+ @api_client.config.logger.debug "API called: UserApi#permit_user_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1071
+ end
1072
+ [data, status_code, headers]
1073
+ end
1074
+
1075
+ # Update team perms for user
1076
+ # @param user_id [String] A user identifier or slug
1077
+ # @param user_team_params [UserTeamParams] The user team data to update
1078
+ # @param [Hash] opts the optional parameters
1079
+ # @return [Notification]
1080
+ def permit_user_team(user_id, user_team_params, opts = {})
1081
+ data, _status_code, _headers = permit_user_team_with_http_info(user_id, user_team_params, opts)
1082
+ data
1083
+ end
1084
+
1085
+ # Update team perms for user
1086
+ # @param user_id [String] A user identifier or slug
1087
+ # @param user_team_params [UserTeamParams] The user team data to update
1088
+ # @param [Hash] opts the optional parameters
1089
+ # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
1090
+ def permit_user_team_with_http_info(user_id, user_team_params, opts = {})
1091
+ if @api_client.config.debugging
1092
+ @api_client.config.logger.debug 'Calling API: UserApi.permit_user_team ...'
1093
+ end
1094
+ # verify the required parameter 'user_id' is set
1095
+ if @api_client.config.client_side_validation && user_id.nil?
1096
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.permit_user_team"
1097
+ end
1098
+ # verify the required parameter 'user_team_params' is set
1099
+ if @api_client.config.client_side_validation && user_team_params.nil?
1100
+ raise ArgumentError, "Missing the required parameter 'user_team_params' when calling UserApi.permit_user_team"
1101
+ end
1102
+
1103
+ # resource path
1104
+ local_var_path = '/users/{user_id}/teams'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
1105
+
1106
+ # query parameters
1107
+ query_params = opts[:query_params] || {}
1108
+
1109
+ # header parameters
1110
+ header_params = opts[:header_params] || {}
1111
+ # HTTP header 'Accept' (if needed)
1112
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1113
+ # HTTP header 'Content-Type'
1114
+ content_type = @api_client.select_header_content_type(['application/json'])
1115
+ unless content_type.nil?
1116
+ header_params['Content-Type'] = content_type
1117
+ end
1118
+
1119
+ # form parameters
1120
+ form_params = opts[:form_params] || {}
1121
+
1122
+ # http body (model)
1123
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_team_params)
1124
+
1125
+ # return_type
1126
+ return_type = opts[:debug_return_type] || 'Notification'
1127
+
1128
+ # auth_names
1129
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1130
+
1131
+ new_options = opts.merge(
1132
+ operation: :'UserApi.permit_user_team',
1133
+ header_params: header_params,
1134
+ query_params: query_params,
1135
+ form_params: form_params,
1136
+ body: post_body,
1137
+ auth_names: auth_names,
1138
+ return_type: return_type
1139
+ )
1140
+
1141
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1142
+ if @api_client.config.debugging
1143
+ @api_client.config.logger.debug "API called: UserApi#permit_user_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1144
+ end
1145
+ [data, status_code, headers]
1146
+ end
1147
+
1148
+ # Fetch a specific user
1149
+ # @param user_id [String] A user identifier or slug
1150
+ # @param [Hash] opts the optional parameters
1151
+ # @return [User]
1152
+ def show_user(user_id, opts = {})
1153
+ data, _status_code, _headers = show_user_with_http_info(user_id, opts)
1154
+ data
1155
+ end
1156
+
1157
+ # Fetch a specific user
1158
+ # @param user_id [String] A user identifier or slug
1159
+ # @param [Hash] opts the optional parameters
1160
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1161
+ def show_user_with_http_info(user_id, opts = {})
1162
+ if @api_client.config.debugging
1163
+ @api_client.config.logger.debug 'Calling API: UserApi.show_user ...'
1164
+ end
1165
+ # verify the required parameter 'user_id' is set
1166
+ if @api_client.config.client_side_validation && user_id.nil?
1167
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.show_user"
1168
+ end
1169
+
1170
+ # resource path
1171
+ local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
1172
+
1173
+ # query parameters
1174
+ query_params = opts[:query_params] || {}
1175
+
1176
+ # header parameters
1177
+ header_params = opts[:header_params] || {}
1178
+ # HTTP header 'Accept' (if needed)
1179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1180
+
1181
+ # form parameters
1182
+ form_params = opts[:form_params] || {}
1183
+
1184
+ # http body (model)
1185
+ post_body = opts[:debug_body]
1186
+
1187
+ # return_type
1188
+ return_type = opts[:debug_return_type] || 'User'
1189
+
1190
+ # auth_names
1191
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1192
+
1193
+ new_options = opts.merge(
1194
+ operation: :'UserApi.show_user',
1195
+ header_params: header_params,
1196
+ query_params: query_params,
1197
+ form_params: form_params,
1198
+ body: post_body,
1199
+ auth_names: auth_names,
1200
+ return_type: return_type
1201
+ )
1202
+
1203
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1204
+ if @api_client.config.debugging
1205
+ @api_client.config.logger.debug "API called: UserApi#show_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1206
+ end
1207
+ [data, status_code, headers]
1208
+ end
1209
+
1210
+ # Update a specific user
1211
+ # @param user_id [String] A user identifier or slug
1212
+ # @param user [User] The user data to update
1213
+ # @param [Hash] opts the optional parameters
1214
+ # @return [User]
1215
+ def update_user(user_id, user, opts = {})
1216
+ data, _status_code, _headers = update_user_with_http_info(user_id, user, opts)
1217
+ data
1218
+ end
1219
+
1220
+ # Update a specific user
1221
+ # @param user_id [String] A user identifier or slug
1222
+ # @param user [User] The user data to update
1223
+ # @param [Hash] opts the optional parameters
1224
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
1225
+ def update_user_with_http_info(user_id, user, opts = {})
1226
+ if @api_client.config.debugging
1227
+ @api_client.config.logger.debug 'Calling API: UserApi.update_user ...'
1228
+ end
1229
+ # verify the required parameter 'user_id' is set
1230
+ if @api_client.config.client_side_validation && user_id.nil?
1231
+ raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.update_user"
1232
+ end
1233
+ # verify the required parameter 'user' is set
1234
+ if @api_client.config.client_side_validation && user.nil?
1235
+ raise ArgumentError, "Missing the required parameter 'user' when calling UserApi.update_user"
1236
+ end
1237
+
1238
+ # resource path
1239
+ local_var_path = '/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
1240
+
1241
+ # query parameters
1242
+ query_params = opts[:query_params] || {}
1243
+
1244
+ # header parameters
1245
+ header_params = opts[:header_params] || {}
1246
+ # HTTP header 'Accept' (if needed)
1247
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1248
+ # HTTP header 'Content-Type'
1249
+ content_type = @api_client.select_header_content_type(['application/json'])
1250
+ unless content_type.nil?
1251
+ header_params['Content-Type'] = content_type
1252
+ end
1253
+
1254
+ # form parameters
1255
+ form_params = opts[:form_params] || {}
1256
+
1257
+ # http body (model)
1258
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
1259
+
1260
+ # return_type
1261
+ return_type = opts[:debug_return_type] || 'User'
1262
+
1263
+ # auth_names
1264
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
1265
+
1266
+ new_options = opts.merge(
1267
+ operation: :'UserApi.update_user',
1268
+ header_params: header_params,
1269
+ query_params: query_params,
1270
+ form_params: form_params,
1271
+ body: post_body,
1272
+ auth_names: auth_names,
1273
+ return_type: return_type
1274
+ )
1275
+
1276
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1277
+ if @api_client.config.debugging
1278
+ @api_client.config.logger.debug "API called: UserApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1279
+ end
1280
+ [data, status_code, headers]
1281
+ end
1282
+ end
1283
+ end