kleister 1.14.1 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +3 -3
- data/lib/kleister/api/auth_api.rb +137 -73
- data/lib/kleister/api/fabric_api.rb +37 -42
- data/lib/kleister/api/forge_api.rb +37 -42
- data/lib/kleister/api/{team_api.rb → group_api.rb} +359 -379
- data/lib/kleister/api/minecraft_api.rb +37 -42
- data/lib/kleister/api/mod_api.rb +471 -232
- data/lib/kleister/api/neoforge_api.rb +37 -42
- data/lib/kleister/api/pack_api.rb +215 -240
- data/lib/kleister/api/profile_api.rb +16 -16
- data/lib/kleister/api/quilt_api.rb +37 -42
- data/lib/kleister/api/user_api.rb +259 -279
- data/lib/kleister/api_client.rb +1 -1
- data/lib/kleister/api_error.rb +1 -1
- data/lib/kleister/configuration.rb +1 -8
- data/lib/kleister/models/{build_version_params.rb → attach_build_to_version_request.rb} +8 -20
- data/lib/kleister/models/{quilt_build_params.rb → attach_minecraft_to_build_request.rb} +8 -20
- data/lib/kleister/models/auth_token.rb +1 -1
- data/lib/kleister/models/auth_verify.rb +1 -1
- data/lib/kleister/models/build.rb +3 -13
- data/lib/kleister/models/build_version.rb +2 -3
- data/lib/kleister/models/{pack_back.rb → create_build_request.rb} +76 -58
- data/lib/kleister/models/{mods.rb → create_group_request.rb} +19 -18
- data/lib/kleister/models/{pack_icon.rb → create_mod_request.rb} +48 -54
- data/lib/kleister/models/{forge_builds.rb → create_pack_request.rb} +33 -23
- data/lib/kleister/models/create_user_request.rb +257 -0
- data/lib/kleister/models/{builds.rb → create_version_request.rb} +25 -23
- data/lib/kleister/models/{packs.rb → delete_group_from_mod_request.rb} +20 -21
- data/lib/kleister/models/delete_group_from_pack_request.rb +219 -0
- data/lib/kleister/models/delete_pack_from_group_request.rb +219 -0
- data/lib/kleister/models/{users.rb → delete_pack_from_user_request.rb} +20 -21
- data/lib/kleister/models/fabric.rb +1 -1
- data/lib/kleister/models/forge.rb +1 -1
- data/lib/kleister/models/{team.rb → group.rb} +5 -5
- data/lib/kleister/models/{team_mod.rb → group_mod.rb} +21 -21
- data/lib/kleister/models/{team_pack.rb → group_pack.rb} +21 -21
- data/lib/kleister/models/{build_versions.rb → list_build_versions200_response.rb} +56 -18
- data/lib/kleister/models/{pack_teams.rb → list_builds200_response.rb} +59 -20
- data/lib/kleister/models/{fabric_builds.rb → list_fabric_builds200_response.rb} +56 -18
- data/lib/kleister/models/{fabrics.rb → list_fabrics200_response.rb} +52 -13
- data/lib/kleister/models/list_forge_builds200_response.rb +266 -0
- data/lib/kleister/models/{forges.rb → list_forges200_response.rb} +52 -13
- data/lib/kleister/models/list_group_mods200_response.rb +266 -0
- data/lib/kleister/models/list_group_packs200_response.rb +266 -0
- data/lib/kleister/models/list_group_users200_response.rb +266 -0
- data/lib/kleister/models/list_groups200_response.rb +259 -0
- data/lib/kleister/models/{minecraft_builds.rb → list_minecraft_builds200_response.rb} +56 -18
- data/lib/kleister/models/list_minecrafts200_response.rb +259 -0
- data/lib/kleister/models/list_mod_groups200_response.rb +266 -0
- data/lib/kleister/models/list_mod_users200_response.rb +266 -0
- data/lib/kleister/models/{team_mods.rb → list_mods200_response.rb} +52 -20
- data/lib/kleister/models/{neoforge_builds.rb → list_neoforge_builds200_response.rb} +56 -18
- data/lib/kleister/models/{neoforges.rb → list_neoforges200_response.rb} +52 -13
- data/lib/kleister/models/list_pack_groups200_response.rb +266 -0
- data/lib/kleister/models/{pack_users.rb → list_pack_users200_response.rb} +56 -17
- data/lib/kleister/models/list_packs200_response.rb +259 -0
- data/lib/kleister/models/{mod_teams.rb → list_providers200_response.rb} +31 -23
- data/lib/kleister/models/{quilt_builds.rb → list_quilt_builds200_response.rb} +56 -17
- data/lib/kleister/models/{quilts.rb → list_quilts200_response.rb} +52 -13
- data/lib/kleister/models/list_user_groups200_response.rb +266 -0
- data/lib/kleister/models/{user_teams.rb → list_user_mods200_response.rb} +59 -20
- data/lib/kleister/models/{user_packs.rb → list_user_packs200_response.rb} +56 -17
- data/lib/kleister/models/{team_users.rb → list_users200_response.rb} +52 -20
- data/lib/kleister/models/{version_builds.rb → list_version_builds200_response.rb} +56 -18
- data/lib/kleister/models/{versions.rb → list_versions200_response.rb} +52 -13
- data/lib/kleister/models/{auth_login.rb → login_auth_request.rb} +4 -4
- data/lib/kleister/models/minecraft.rb +1 -1
- data/lib/kleister/models/mod.rb +10 -3
- data/lib/kleister/models/{team_packs.rb → mod_avatar.rb} +32 -23
- data/lib/kleister/models/neoforge.rb +1 -1
- data/lib/kleister/models/notification.rb +2 -3
- data/lib/kleister/models/pack.rb +8 -22
- data/lib/kleister/models/{minecrafts.rb → pack_avatar.rb} +34 -18
- data/lib/kleister/models/{mod_users.rb → permit_group_mod_request.rb} +29 -25
- data/lib/kleister/models/{forge_build_params.rb → permit_group_pack_request.rb} +15 -17
- data/lib/kleister/models/{fabric_build_params.rb → permit_pack_group_request.rb} +24 -26
- data/lib/kleister/models/{user_mods.rb → permit_pack_user_request.rb} +29 -25
- data/lib/kleister/models/profile.rb +20 -20
- data/lib/kleister/models/provider.rb +1 -1
- data/lib/kleister/models/quilt.rb +1 -1
- data/lib/kleister/models/{teams.rb → redirect_auth_request.rb} +20 -21
- data/lib/kleister/models/update_profile_request.rb +237 -0
- data/lib/kleister/models/update_user_request.rb +253 -0
- data/lib/kleister/models/user.rb +1 -1
- data/lib/kleister/models/user_auth.rb +1 -1
- data/lib/kleister/models/{user_team.rb → user_group.rb} +23 -23
- data/lib/kleister/models/user_mod.rb +1 -1
- data/lib/kleister/models/user_pack.rb +1 -1
- data/lib/kleister/models/validation.rb +1 -1
- data/lib/kleister/models/version.rb +3 -11
- data/lib/kleister/models/version_file.rb +3 -18
- data/lib/kleister/version.rb +2 -2
- data/lib/kleister.rb +57 -56
- metadata +58 -57
- data/lib/kleister/models/minecraft_build_params.rb +0 -233
- data/lib/kleister/models/mod_team_params.rb +0 -265
- data/lib/kleister/models/mod_user_params.rb +0 -265
- data/lib/kleister/models/neoforge_build_params.rb +0 -233
- data/lib/kleister/models/pack_logo.rb +0 -275
- data/lib/kleister/models/pack_team_params.rb +0 -265
- data/lib/kleister/models/pack_user_params.rb +0 -265
- data/lib/kleister/models/providers.rb +0 -220
- data/lib/kleister/models/team_mod_params.rb +0 -265
- data/lib/kleister/models/team_pack_params.rb +0 -265
- data/lib/kleister/models/team_user_params.rb +0 -265
- data/lib/kleister/models/user_mod_params.rb +0 -265
- data/lib/kleister/models/user_pack_params.rb +0 -265
- data/lib/kleister/models/user_team_params.rb +0 -265
- data/lib/kleister/models/version_build_params.rb +0 -233
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 1.0.0-alpha1
|
6
6
|
# Contact: kleister@webhippie.de
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# Generator version: 7.
|
8
|
+
# Generator version: 7.12.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'cgi'
|
@@ -18,36 +18,36 @@ module Kleister
|
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
20
|
|
21
|
-
# Attach a
|
21
|
+
# Attach a group to user
|
22
22
|
# @param user_id [String] A user identifier or slug
|
23
|
-
# @param
|
23
|
+
# @param permit_pack_group_request [PermitPackGroupRequest] The user group data to permit
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @return [Notification]
|
26
|
-
def
|
27
|
-
data, _status_code, _headers =
|
26
|
+
def attach_user_to_group(user_id, permit_pack_group_request, opts = {})
|
27
|
+
data, _status_code, _headers = attach_user_to_group_with_http_info(user_id, permit_pack_group_request, opts)
|
28
28
|
data
|
29
29
|
end
|
30
30
|
|
31
|
-
# Attach a
|
31
|
+
# Attach a group to user
|
32
32
|
# @param user_id [String] A user identifier or slug
|
33
|
-
# @param
|
33
|
+
# @param permit_pack_group_request [PermitPackGroupRequest] The user group data to permit
|
34
34
|
# @param [Hash] opts the optional parameters
|
35
35
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
36
|
-
def
|
36
|
+
def attach_user_to_group_with_http_info(user_id, permit_pack_group_request, opts = {})
|
37
37
|
if @api_client.config.debugging
|
38
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
38
|
+
@api_client.config.logger.debug 'Calling API: UserApi.attach_user_to_group ...'
|
39
39
|
end
|
40
40
|
# verify the required parameter 'user_id' is set
|
41
41
|
if @api_client.config.client_side_validation && user_id.nil?
|
42
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
42
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.attach_user_to_group"
|
43
43
|
end
|
44
|
-
# verify the required parameter '
|
45
|
-
if @api_client.config.client_side_validation &&
|
46
|
-
raise ArgumentError, "Missing the required parameter '
|
44
|
+
# verify the required parameter 'permit_pack_group_request' is set
|
45
|
+
if @api_client.config.client_side_validation && permit_pack_group_request.nil?
|
46
|
+
raise ArgumentError, "Missing the required parameter 'permit_pack_group_request' when calling UserApi.attach_user_to_group"
|
47
47
|
end
|
48
48
|
|
49
49
|
# resource path
|
50
|
-
local_var_path = '/users/{user_id}/
|
50
|
+
local_var_path = '/users/{user_id}/groups'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
51
51
|
|
52
52
|
# query parameters
|
53
53
|
query_params = opts[:query_params] || {}
|
@@ -55,7 +55,7 @@ module Kleister
|
|
55
55
|
# header parameters
|
56
56
|
header_params = opts[:header_params] || {}
|
57
57
|
# HTTP header 'Accept' (if needed)
|
58
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
59
59
|
# HTTP header 'Content-Type'
|
60
60
|
content_type = @api_client.select_header_content_type(['application/json'])
|
61
61
|
unless content_type.nil?
|
@@ -66,16 +66,16 @@ module Kleister
|
|
66
66
|
form_params = opts[:form_params] || {}
|
67
67
|
|
68
68
|
# http body (model)
|
69
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
69
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(permit_pack_group_request)
|
70
70
|
|
71
71
|
# return_type
|
72
72
|
return_type = opts[:debug_return_type] || 'Notification'
|
73
73
|
|
74
74
|
# auth_names
|
75
|
-
auth_names = opts[:debug_auth_names] || %w[
|
75
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
76
76
|
|
77
77
|
new_options = opts.merge(
|
78
|
-
operation: :'UserApi.
|
78
|
+
operation: :'UserApi.attach_user_to_group',
|
79
79
|
header_params: header_params,
|
80
80
|
query_params: query_params,
|
81
81
|
form_params: form_params,
|
@@ -86,41 +86,41 @@ module Kleister
|
|
86
86
|
|
87
87
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
88
88
|
if @api_client.config.debugging
|
89
|
-
@api_client.config.logger.debug "API called: UserApi#
|
89
|
+
@api_client.config.logger.debug "API called: UserApi#attach_user_to_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
90
|
end
|
91
91
|
[data, status_code, headers]
|
92
92
|
end
|
93
93
|
|
94
|
-
# Attach a
|
94
|
+
# Attach a mod to user
|
95
95
|
# @param user_id [String] A user identifier or slug
|
96
|
-
# @param
|
96
|
+
# @param permit_group_mod_request [PermitGroupModRequest] The user mod data to permit
|
97
97
|
# @param [Hash] opts the optional parameters
|
98
98
|
# @return [Notification]
|
99
|
-
def
|
100
|
-
data, _status_code, _headers =
|
99
|
+
def attach_user_to_mod(user_id, permit_group_mod_request, opts = {})
|
100
|
+
data, _status_code, _headers = attach_user_to_mod_with_http_info(user_id, permit_group_mod_request, opts)
|
101
101
|
data
|
102
102
|
end
|
103
103
|
|
104
|
-
# Attach a
|
104
|
+
# Attach a mod to user
|
105
105
|
# @param user_id [String] A user identifier or slug
|
106
|
-
# @param
|
106
|
+
# @param permit_group_mod_request [PermitGroupModRequest] The user mod data to permit
|
107
107
|
# @param [Hash] opts the optional parameters
|
108
108
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
109
|
-
def
|
109
|
+
def attach_user_to_mod_with_http_info(user_id, permit_group_mod_request, opts = {})
|
110
110
|
if @api_client.config.debugging
|
111
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
111
|
+
@api_client.config.logger.debug 'Calling API: UserApi.attach_user_to_mod ...'
|
112
112
|
end
|
113
113
|
# verify the required parameter 'user_id' is set
|
114
114
|
if @api_client.config.client_side_validation && user_id.nil?
|
115
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
115
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.attach_user_to_mod"
|
116
116
|
end
|
117
|
-
# verify the required parameter '
|
118
|
-
if @api_client.config.client_side_validation &&
|
119
|
-
raise ArgumentError, "Missing the required parameter '
|
117
|
+
# verify the required parameter 'permit_group_mod_request' is set
|
118
|
+
if @api_client.config.client_side_validation && permit_group_mod_request.nil?
|
119
|
+
raise ArgumentError, "Missing the required parameter 'permit_group_mod_request' when calling UserApi.attach_user_to_mod"
|
120
120
|
end
|
121
121
|
|
122
122
|
# resource path
|
123
|
-
local_var_path = '/users/{user_id}/
|
123
|
+
local_var_path = '/users/{user_id}/mods'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
124
124
|
|
125
125
|
# query parameters
|
126
126
|
query_params = opts[:query_params] || {}
|
@@ -128,7 +128,7 @@ module Kleister
|
|
128
128
|
# header parameters
|
129
129
|
header_params = opts[:header_params] || {}
|
130
130
|
# HTTP header 'Accept' (if needed)
|
131
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
132
132
|
# HTTP header 'Content-Type'
|
133
133
|
content_type = @api_client.select_header_content_type(['application/json'])
|
134
134
|
unless content_type.nil?
|
@@ -139,16 +139,16 @@ module Kleister
|
|
139
139
|
form_params = opts[:form_params] || {}
|
140
140
|
|
141
141
|
# http body (model)
|
142
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
142
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(permit_group_mod_request)
|
143
143
|
|
144
144
|
# return_type
|
145
145
|
return_type = opts[:debug_return_type] || 'Notification'
|
146
146
|
|
147
147
|
# auth_names
|
148
|
-
auth_names = opts[:debug_auth_names] || %w[
|
148
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
149
149
|
|
150
150
|
new_options = opts.merge(
|
151
|
-
operation: :'UserApi.
|
151
|
+
operation: :'UserApi.attach_user_to_mod',
|
152
152
|
header_params: header_params,
|
153
153
|
query_params: query_params,
|
154
154
|
form_params: form_params,
|
@@ -159,41 +159,41 @@ module Kleister
|
|
159
159
|
|
160
160
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
161
161
|
if @api_client.config.debugging
|
162
|
-
@api_client.config.logger.debug "API called: UserApi#
|
162
|
+
@api_client.config.logger.debug "API called: UserApi#attach_user_to_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
163
163
|
end
|
164
164
|
[data, status_code, headers]
|
165
165
|
end
|
166
166
|
|
167
|
-
# Attach a
|
167
|
+
# Attach a pack to user
|
168
168
|
# @param user_id [String] A user identifier or slug
|
169
|
-
# @param
|
169
|
+
# @param permit_group_pack_request [PermitGroupPackRequest] The user pack data to permit
|
170
170
|
# @param [Hash] opts the optional parameters
|
171
171
|
# @return [Notification]
|
172
|
-
def
|
173
|
-
data, _status_code, _headers =
|
172
|
+
def attach_user_to_pack(user_id, permit_group_pack_request, opts = {})
|
173
|
+
data, _status_code, _headers = attach_user_to_pack_with_http_info(user_id, permit_group_pack_request, opts)
|
174
174
|
data
|
175
175
|
end
|
176
176
|
|
177
|
-
# Attach a
|
177
|
+
# Attach a pack to user
|
178
178
|
# @param user_id [String] A user identifier or slug
|
179
|
-
# @param
|
179
|
+
# @param permit_group_pack_request [PermitGroupPackRequest] The user pack data to permit
|
180
180
|
# @param [Hash] opts the optional parameters
|
181
181
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
182
|
-
def
|
182
|
+
def attach_user_to_pack_with_http_info(user_id, permit_group_pack_request, opts = {})
|
183
183
|
if @api_client.config.debugging
|
184
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
184
|
+
@api_client.config.logger.debug 'Calling API: UserApi.attach_user_to_pack ...'
|
185
185
|
end
|
186
186
|
# verify the required parameter 'user_id' is set
|
187
187
|
if @api_client.config.client_side_validation && user_id.nil?
|
188
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
188
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.attach_user_to_pack"
|
189
189
|
end
|
190
|
-
# verify the required parameter '
|
191
|
-
if @api_client.config.client_side_validation &&
|
192
|
-
raise ArgumentError, "Missing the required parameter '
|
190
|
+
# verify the required parameter 'permit_group_pack_request' is set
|
191
|
+
if @api_client.config.client_side_validation && permit_group_pack_request.nil?
|
192
|
+
raise ArgumentError, "Missing the required parameter 'permit_group_pack_request' when calling UserApi.attach_user_to_pack"
|
193
193
|
end
|
194
194
|
|
195
195
|
# resource path
|
196
|
-
local_var_path = '/users/{user_id}/
|
196
|
+
local_var_path = '/users/{user_id}/packs'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
197
197
|
|
198
198
|
# query parameters
|
199
199
|
query_params = opts[:query_params] || {}
|
@@ -201,7 +201,7 @@ module Kleister
|
|
201
201
|
# header parameters
|
202
202
|
header_params = opts[:header_params] || {}
|
203
203
|
# HTTP header 'Accept' (if needed)
|
204
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
205
205
|
# HTTP header 'Content-Type'
|
206
206
|
content_type = @api_client.select_header_content_type(['application/json'])
|
207
207
|
unless content_type.nil?
|
@@ -212,16 +212,16 @@ module Kleister
|
|
212
212
|
form_params = opts[:form_params] || {}
|
213
213
|
|
214
214
|
# http body (model)
|
215
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
215
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(permit_group_pack_request)
|
216
216
|
|
217
217
|
# return_type
|
218
218
|
return_type = opts[:debug_return_type] || 'Notification'
|
219
219
|
|
220
220
|
# auth_names
|
221
|
-
auth_names = opts[:debug_auth_names] || %w[
|
221
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
222
222
|
|
223
223
|
new_options = opts.merge(
|
224
|
-
operation: :'UserApi.
|
224
|
+
operation: :'UserApi.attach_user_to_pack',
|
225
225
|
header_params: header_params,
|
226
226
|
query_params: query_params,
|
227
227
|
form_params: form_params,
|
@@ -232,31 +232,31 @@ module Kleister
|
|
232
232
|
|
233
233
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
234
234
|
if @api_client.config.debugging
|
235
|
-
@api_client.config.logger.debug "API called: UserApi#
|
235
|
+
@api_client.config.logger.debug "API called: UserApi#attach_user_to_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
236
236
|
end
|
237
237
|
[data, status_code, headers]
|
238
238
|
end
|
239
239
|
|
240
240
|
# Create a new user
|
241
|
-
# @param
|
241
|
+
# @param create_user_request [CreateUserRequest] The user data to create
|
242
242
|
# @param [Hash] opts the optional parameters
|
243
243
|
# @return [User]
|
244
|
-
def create_user(
|
245
|
-
data, _status_code, _headers = create_user_with_http_info(
|
244
|
+
def create_user(create_user_request, opts = {})
|
245
|
+
data, _status_code, _headers = create_user_with_http_info(create_user_request, opts)
|
246
246
|
data
|
247
247
|
end
|
248
248
|
|
249
249
|
# Create a new user
|
250
|
-
# @param
|
250
|
+
# @param create_user_request [CreateUserRequest] The user data to create
|
251
251
|
# @param [Hash] opts the optional parameters
|
252
252
|
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
253
|
-
def create_user_with_http_info(
|
253
|
+
def create_user_with_http_info(create_user_request, opts = {})
|
254
254
|
if @api_client.config.debugging
|
255
255
|
@api_client.config.logger.debug 'Calling API: UserApi.create_user ...'
|
256
256
|
end
|
257
|
-
# verify the required parameter '
|
258
|
-
if @api_client.config.client_side_validation &&
|
259
|
-
raise ArgumentError, "Missing the required parameter '
|
257
|
+
# verify the required parameter 'create_user_request' is set
|
258
|
+
if @api_client.config.client_side_validation && create_user_request.nil?
|
259
|
+
raise ArgumentError, "Missing the required parameter 'create_user_request' when calling UserApi.create_user"
|
260
260
|
end
|
261
261
|
|
262
262
|
# resource path
|
@@ -268,7 +268,7 @@ module Kleister
|
|
268
268
|
# header parameters
|
269
269
|
header_params = opts[:header_params] || {}
|
270
270
|
# HTTP header 'Accept' (if needed)
|
271
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
271
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
272
272
|
# HTTP header 'Content-Type'
|
273
273
|
content_type = @api_client.select_header_content_type(['application/json'])
|
274
274
|
unless content_type.nil?
|
@@ -279,13 +279,13 @@ module Kleister
|
|
279
279
|
form_params = opts[:form_params] || {}
|
280
280
|
|
281
281
|
# http body (model)
|
282
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
282
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_user_request)
|
283
283
|
|
284
284
|
# return_type
|
285
285
|
return_type = opts[:debug_return_type] || 'User'
|
286
286
|
|
287
287
|
# auth_names
|
288
|
-
auth_names = opts[:debug_auth_names] || %w[
|
288
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
289
289
|
|
290
290
|
new_options = opts.merge(
|
291
291
|
operation: :'UserApi.create_user',
|
@@ -335,7 +335,7 @@ module Kleister
|
|
335
335
|
# header parameters
|
336
336
|
header_params = opts[:header_params] || {}
|
337
337
|
# HTTP header 'Accept' (if needed)
|
338
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
338
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
339
339
|
|
340
340
|
# form parameters
|
341
341
|
form_params = opts[:form_params] || {}
|
@@ -347,7 +347,7 @@ module Kleister
|
|
347
347
|
return_type = opts[:debug_return_type] || 'Notification'
|
348
348
|
|
349
349
|
# auth_names
|
350
|
-
auth_names = opts[:debug_auth_names] || %w[
|
350
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
351
351
|
|
352
352
|
new_options = opts.merge(
|
353
353
|
operation: :'UserApi.delete_user',
|
@@ -366,36 +366,36 @@ module Kleister
|
|
366
366
|
[data, status_code, headers]
|
367
367
|
end
|
368
368
|
|
369
|
-
# Unlink a
|
369
|
+
# Unlink a group from user
|
370
370
|
# @param user_id [String] A user identifier or slug
|
371
|
-
# @param
|
371
|
+
# @param delete_pack_from_group_request [DeletePackFromGroupRequest] The user group data to unlink
|
372
372
|
# @param [Hash] opts the optional parameters
|
373
373
|
# @return [Notification]
|
374
|
-
def
|
375
|
-
data, _status_code, _headers =
|
374
|
+
def delete_user_from_group(user_id, delete_pack_from_group_request, opts = {})
|
375
|
+
data, _status_code, _headers = delete_user_from_group_with_http_info(user_id, delete_pack_from_group_request, opts)
|
376
376
|
data
|
377
377
|
end
|
378
378
|
|
379
|
-
# Unlink a
|
379
|
+
# Unlink a group from user
|
380
380
|
# @param user_id [String] A user identifier or slug
|
381
|
-
# @param
|
381
|
+
# @param delete_pack_from_group_request [DeletePackFromGroupRequest] The user group data to unlink
|
382
382
|
# @param [Hash] opts the optional parameters
|
383
383
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
384
|
-
def
|
384
|
+
def delete_user_from_group_with_http_info(user_id, delete_pack_from_group_request, opts = {})
|
385
385
|
if @api_client.config.debugging
|
386
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
386
|
+
@api_client.config.logger.debug 'Calling API: UserApi.delete_user_from_group ...'
|
387
387
|
end
|
388
388
|
# verify the required parameter 'user_id' is set
|
389
389
|
if @api_client.config.client_side_validation && user_id.nil?
|
390
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
390
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.delete_user_from_group"
|
391
391
|
end
|
392
|
-
# verify the required parameter '
|
393
|
-
if @api_client.config.client_side_validation &&
|
394
|
-
raise ArgumentError, "Missing the required parameter '
|
392
|
+
# verify the required parameter 'delete_pack_from_group_request' is set
|
393
|
+
if @api_client.config.client_side_validation && delete_pack_from_group_request.nil?
|
394
|
+
raise ArgumentError, "Missing the required parameter 'delete_pack_from_group_request' when calling UserApi.delete_user_from_group"
|
395
395
|
end
|
396
396
|
|
397
397
|
# resource path
|
398
|
-
local_var_path = '/users/{user_id}/
|
398
|
+
local_var_path = '/users/{user_id}/groups'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
399
399
|
|
400
400
|
# query parameters
|
401
401
|
query_params = opts[:query_params] || {}
|
@@ -403,7 +403,7 @@ module Kleister
|
|
403
403
|
# header parameters
|
404
404
|
header_params = opts[:header_params] || {}
|
405
405
|
# HTTP header 'Accept' (if needed)
|
406
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
406
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
407
407
|
# HTTP header 'Content-Type'
|
408
408
|
content_type = @api_client.select_header_content_type(['application/json'])
|
409
409
|
unless content_type.nil?
|
@@ -414,16 +414,16 @@ module Kleister
|
|
414
414
|
form_params = opts[:form_params] || {}
|
415
415
|
|
416
416
|
# http body (model)
|
417
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
417
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_pack_from_group_request)
|
418
418
|
|
419
419
|
# return_type
|
420
420
|
return_type = opts[:debug_return_type] || 'Notification'
|
421
421
|
|
422
422
|
# auth_names
|
423
|
-
auth_names = opts[:debug_auth_names] || %w[
|
423
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
424
424
|
|
425
425
|
new_options = opts.merge(
|
426
|
-
operation: :'UserApi.
|
426
|
+
operation: :'UserApi.delete_user_from_group',
|
427
427
|
header_params: header_params,
|
428
428
|
query_params: query_params,
|
429
429
|
form_params: form_params,
|
@@ -434,41 +434,41 @@ module Kleister
|
|
434
434
|
|
435
435
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
436
436
|
if @api_client.config.debugging
|
437
|
-
@api_client.config.logger.debug "API called: UserApi#
|
437
|
+
@api_client.config.logger.debug "API called: UserApi#delete_user_from_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
438
438
|
end
|
439
439
|
[data, status_code, headers]
|
440
440
|
end
|
441
441
|
|
442
|
-
# Unlink a
|
442
|
+
# Unlink a mod from user
|
443
443
|
# @param user_id [String] A user identifier or slug
|
444
|
-
# @param
|
444
|
+
# @param delete_group_from_mod_request [DeleteGroupFromModRequest] The user mod data to unlink
|
445
445
|
# @param [Hash] opts the optional parameters
|
446
446
|
# @return [Notification]
|
447
|
-
def
|
448
|
-
data, _status_code, _headers =
|
447
|
+
def delete_user_from_mod(user_id, delete_group_from_mod_request, opts = {})
|
448
|
+
data, _status_code, _headers = delete_user_from_mod_with_http_info(user_id, delete_group_from_mod_request, opts)
|
449
449
|
data
|
450
450
|
end
|
451
451
|
|
452
|
-
# Unlink a
|
452
|
+
# Unlink a mod from user
|
453
453
|
# @param user_id [String] A user identifier or slug
|
454
|
-
# @param
|
454
|
+
# @param delete_group_from_mod_request [DeleteGroupFromModRequest] The user mod data to unlink
|
455
455
|
# @param [Hash] opts the optional parameters
|
456
456
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
457
|
-
def
|
457
|
+
def delete_user_from_mod_with_http_info(user_id, delete_group_from_mod_request, opts = {})
|
458
458
|
if @api_client.config.debugging
|
459
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
459
|
+
@api_client.config.logger.debug 'Calling API: UserApi.delete_user_from_mod ...'
|
460
460
|
end
|
461
461
|
# verify the required parameter 'user_id' is set
|
462
462
|
if @api_client.config.client_side_validation && user_id.nil?
|
463
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
463
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.delete_user_from_mod"
|
464
464
|
end
|
465
|
-
# verify the required parameter '
|
466
|
-
if @api_client.config.client_side_validation &&
|
467
|
-
raise ArgumentError, "Missing the required parameter '
|
465
|
+
# verify the required parameter 'delete_group_from_mod_request' is set
|
466
|
+
if @api_client.config.client_side_validation && delete_group_from_mod_request.nil?
|
467
|
+
raise ArgumentError, "Missing the required parameter 'delete_group_from_mod_request' when calling UserApi.delete_user_from_mod"
|
468
468
|
end
|
469
469
|
|
470
470
|
# resource path
|
471
|
-
local_var_path = '/users/{user_id}/
|
471
|
+
local_var_path = '/users/{user_id}/mods'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
472
472
|
|
473
473
|
# query parameters
|
474
474
|
query_params = opts[:query_params] || {}
|
@@ -476,7 +476,7 @@ module Kleister
|
|
476
476
|
# header parameters
|
477
477
|
header_params = opts[:header_params] || {}
|
478
478
|
# HTTP header 'Accept' (if needed)
|
479
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
479
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
480
480
|
# HTTP header 'Content-Type'
|
481
481
|
content_type = @api_client.select_header_content_type(['application/json'])
|
482
482
|
unless content_type.nil?
|
@@ -487,16 +487,16 @@ module Kleister
|
|
487
487
|
form_params = opts[:form_params] || {}
|
488
488
|
|
489
489
|
# http body (model)
|
490
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
490
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_group_from_mod_request)
|
491
491
|
|
492
492
|
# return_type
|
493
493
|
return_type = opts[:debug_return_type] || 'Notification'
|
494
494
|
|
495
495
|
# auth_names
|
496
|
-
auth_names = opts[:debug_auth_names] || %w[
|
496
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
497
497
|
|
498
498
|
new_options = opts.merge(
|
499
|
-
operation: :'UserApi.
|
499
|
+
operation: :'UserApi.delete_user_from_mod',
|
500
500
|
header_params: header_params,
|
501
501
|
query_params: query_params,
|
502
502
|
form_params: form_params,
|
@@ -507,41 +507,41 @@ module Kleister
|
|
507
507
|
|
508
508
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
509
509
|
if @api_client.config.debugging
|
510
|
-
@api_client.config.logger.debug "API called: UserApi#
|
510
|
+
@api_client.config.logger.debug "API called: UserApi#delete_user_from_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
511
511
|
end
|
512
512
|
[data, status_code, headers]
|
513
513
|
end
|
514
514
|
|
515
|
-
# Unlink a
|
515
|
+
# Unlink a pack from user
|
516
516
|
# @param user_id [String] A user identifier or slug
|
517
|
-
# @param
|
517
|
+
# @param delete_group_from_pack_request [DeleteGroupFromPackRequest] The user pack data to unlink
|
518
518
|
# @param [Hash] opts the optional parameters
|
519
519
|
# @return [Notification]
|
520
|
-
def
|
521
|
-
data, _status_code, _headers =
|
520
|
+
def delete_user_from_pack(user_id, delete_group_from_pack_request, opts = {})
|
521
|
+
data, _status_code, _headers = delete_user_from_pack_with_http_info(user_id, delete_group_from_pack_request, opts)
|
522
522
|
data
|
523
523
|
end
|
524
524
|
|
525
|
-
# Unlink a
|
525
|
+
# Unlink a pack from user
|
526
526
|
# @param user_id [String] A user identifier or slug
|
527
|
-
# @param
|
527
|
+
# @param delete_group_from_pack_request [DeleteGroupFromPackRequest] The user pack data to unlink
|
528
528
|
# @param [Hash] opts the optional parameters
|
529
529
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
530
|
-
def
|
530
|
+
def delete_user_from_pack_with_http_info(user_id, delete_group_from_pack_request, opts = {})
|
531
531
|
if @api_client.config.debugging
|
532
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
532
|
+
@api_client.config.logger.debug 'Calling API: UserApi.delete_user_from_pack ...'
|
533
533
|
end
|
534
534
|
# verify the required parameter 'user_id' is set
|
535
535
|
if @api_client.config.client_side_validation && user_id.nil?
|
536
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
536
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.delete_user_from_pack"
|
537
537
|
end
|
538
|
-
# verify the required parameter '
|
539
|
-
if @api_client.config.client_side_validation &&
|
540
|
-
raise ArgumentError, "Missing the required parameter '
|
538
|
+
# verify the required parameter 'delete_group_from_pack_request' is set
|
539
|
+
if @api_client.config.client_side_validation && delete_group_from_pack_request.nil?
|
540
|
+
raise ArgumentError, "Missing the required parameter 'delete_group_from_pack_request' when calling UserApi.delete_user_from_pack"
|
541
541
|
end
|
542
542
|
|
543
543
|
# resource path
|
544
|
-
local_var_path = '/users/{user_id}/
|
544
|
+
local_var_path = '/users/{user_id}/packs'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
545
545
|
|
546
546
|
# query parameters
|
547
547
|
query_params = opts[:query_params] || {}
|
@@ -549,7 +549,7 @@ module Kleister
|
|
549
549
|
# header parameters
|
550
550
|
header_params = opts[:header_params] || {}
|
551
551
|
# HTTP header 'Accept' (if needed)
|
552
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
552
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
553
553
|
# HTTP header 'Content-Type'
|
554
554
|
content_type = @api_client.select_header_content_type(['application/json'])
|
555
555
|
unless content_type.nil?
|
@@ -560,16 +560,16 @@ module Kleister
|
|
560
560
|
form_params = opts[:form_params] || {}
|
561
561
|
|
562
562
|
# http body (model)
|
563
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
563
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_group_from_pack_request)
|
564
564
|
|
565
565
|
# return_type
|
566
566
|
return_type = opts[:debug_return_type] || 'Notification'
|
567
567
|
|
568
568
|
# auth_names
|
569
|
-
auth_names = opts[:debug_auth_names] || %w[
|
569
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
570
570
|
|
571
571
|
new_options = opts.merge(
|
572
|
-
operation: :'UserApi.
|
572
|
+
operation: :'UserApi.delete_user_from_pack',
|
573
573
|
header_params: header_params,
|
574
574
|
query_params: query_params,
|
575
575
|
form_params: form_params,
|
@@ -580,46 +580,41 @@ module Kleister
|
|
580
580
|
|
581
581
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
582
582
|
if @api_client.config.debugging
|
583
|
-
@api_client.config.logger.debug "API called: UserApi#
|
583
|
+
@api_client.config.logger.debug "API called: UserApi#delete_user_from_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
584
584
|
end
|
585
585
|
[data, status_code, headers]
|
586
586
|
end
|
587
587
|
|
588
|
-
# Fetch all
|
588
|
+
# Fetch all groups attached to user
|
589
589
|
# @param user_id [String] A user identifier or slug
|
590
590
|
# @param [Hash] opts the optional parameters
|
591
591
|
# @option opts [String] :search Search query
|
592
|
-
# @option opts [String] :sort Sorting column
|
592
|
+
# @option opts [String] :sort Sorting column
|
593
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 [
|
597
|
-
def
|
598
|
-
data, _status_code, _headers =
|
594
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
595
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
596
|
+
# @return [ListUserGroups200Response]
|
597
|
+
def list_user_groups(user_id, opts = {})
|
598
|
+
data, _status_code, _headers = list_user_groups_with_http_info(user_id, opts)
|
599
599
|
data
|
600
600
|
end
|
601
601
|
|
602
|
-
# Fetch all
|
602
|
+
# Fetch all groups attached to user
|
603
603
|
# @param user_id [String] A user identifier or slug
|
604
604
|
# @param [Hash] opts the optional parameters
|
605
605
|
# @option opts [String] :search Search query
|
606
|
-
# @option opts [String] :sort Sorting column
|
606
|
+
# @option opts [String] :sort Sorting column
|
607
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<(
|
611
|
-
def
|
608
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
609
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
610
|
+
# @return [Array<(ListUserGroups200Response, Integer, Hash)>] ListUserGroups200Response data, response status code and response headers
|
611
|
+
def list_user_groups_with_http_info(user_id, opts = {})
|
612
612
|
if @api_client.config.debugging
|
613
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
613
|
+
@api_client.config.logger.debug 'Calling API: UserApi.list_user_groups ...'
|
614
614
|
end
|
615
615
|
# verify the required parameter 'user_id' is set
|
616
616
|
if @api_client.config.client_side_validation && user_id.nil?
|
617
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
618
|
-
end
|
619
|
-
|
620
|
-
allowable_values = %w[slug name public]
|
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}"
|
617
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_groups"
|
623
618
|
end
|
624
619
|
|
625
620
|
allowable_values = %w[asc desc]
|
@@ -628,7 +623,7 @@ module Kleister
|
|
628
623
|
end
|
629
624
|
|
630
625
|
# resource path
|
631
|
-
local_var_path = '/users/{user_id}/
|
626
|
+
local_var_path = '/users/{user_id}/groups'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
632
627
|
|
633
628
|
# query parameters
|
634
629
|
query_params = opts[:query_params] || {}
|
@@ -641,7 +636,7 @@ module Kleister
|
|
641
636
|
# header parameters
|
642
637
|
header_params = opts[:header_params] || {}
|
643
638
|
# HTTP header 'Accept' (if needed)
|
644
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
639
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
645
640
|
|
646
641
|
# form parameters
|
647
642
|
form_params = opts[:form_params] || {}
|
@@ -650,13 +645,13 @@ module Kleister
|
|
650
645
|
post_body = opts[:debug_body]
|
651
646
|
|
652
647
|
# return_type
|
653
|
-
return_type = opts[:debug_return_type] || '
|
648
|
+
return_type = opts[:debug_return_type] || 'ListUserGroups200Response'
|
654
649
|
|
655
650
|
# auth_names
|
656
|
-
auth_names = opts[:debug_auth_names] || %w[
|
651
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
657
652
|
|
658
653
|
new_options = opts.merge(
|
659
|
-
operation: :'UserApi.
|
654
|
+
operation: :'UserApi.list_user_groups',
|
660
655
|
header_params: header_params,
|
661
656
|
query_params: query_params,
|
662
657
|
form_params: form_params,
|
@@ -667,46 +662,41 @@ module Kleister
|
|
667
662
|
|
668
663
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
669
664
|
if @api_client.config.debugging
|
670
|
-
@api_client.config.logger.debug "API called: UserApi#
|
665
|
+
@api_client.config.logger.debug "API called: UserApi#list_user_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
671
666
|
end
|
672
667
|
[data, status_code, headers]
|
673
668
|
end
|
674
669
|
|
675
|
-
# Fetch all
|
670
|
+
# Fetch all mods attached to user
|
676
671
|
# @param user_id [String] A user identifier or slug
|
677
672
|
# @param [Hash] opts the optional parameters
|
678
673
|
# @option opts [String] :search Search query
|
679
|
-
# @option opts [String] :sort Sorting column
|
674
|
+
# @option opts [String] :sort Sorting column
|
680
675
|
# @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 [
|
684
|
-
def
|
685
|
-
data, _status_code, _headers =
|
676
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
677
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
678
|
+
# @return [ListUserMods200Response]
|
679
|
+
def list_user_mods(user_id, opts = {})
|
680
|
+
data, _status_code, _headers = list_user_mods_with_http_info(user_id, opts)
|
686
681
|
data
|
687
682
|
end
|
688
683
|
|
689
|
-
# Fetch all
|
684
|
+
# Fetch all mods attached to user
|
690
685
|
# @param user_id [String] A user identifier or slug
|
691
686
|
# @param [Hash] opts the optional parameters
|
692
687
|
# @option opts [String] :search Search query
|
693
|
-
# @option opts [String] :sort Sorting column
|
688
|
+
# @option opts [String] :sort Sorting column
|
694
689
|
# @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<(
|
698
|
-
def
|
690
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
691
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
692
|
+
# @return [Array<(ListUserMods200Response, Integer, Hash)>] ListUserMods200Response data, response status code and response headers
|
693
|
+
def list_user_mods_with_http_info(user_id, opts = {})
|
699
694
|
if @api_client.config.debugging
|
700
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
695
|
+
@api_client.config.logger.debug 'Calling API: UserApi.list_user_mods ...'
|
701
696
|
end
|
702
697
|
# verify the required parameter 'user_id' is set
|
703
698
|
if @api_client.config.client_side_validation && user_id.nil?
|
704
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
705
|
-
end
|
706
|
-
|
707
|
-
allowable_values = %w[slug name public]
|
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}"
|
699
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_mods"
|
710
700
|
end
|
711
701
|
|
712
702
|
allowable_values = %w[asc desc]
|
@@ -715,7 +705,7 @@ module Kleister
|
|
715
705
|
end
|
716
706
|
|
717
707
|
# resource path
|
718
|
-
local_var_path = '/users/{user_id}/
|
708
|
+
local_var_path = '/users/{user_id}/mods'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
719
709
|
|
720
710
|
# query parameters
|
721
711
|
query_params = opts[:query_params] || {}
|
@@ -728,7 +718,7 @@ module Kleister
|
|
728
718
|
# header parameters
|
729
719
|
header_params = opts[:header_params] || {}
|
730
720
|
# HTTP header 'Accept' (if needed)
|
731
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
721
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
732
722
|
|
733
723
|
# form parameters
|
734
724
|
form_params = opts[:form_params] || {}
|
@@ -737,13 +727,13 @@ module Kleister
|
|
737
727
|
post_body = opts[:debug_body]
|
738
728
|
|
739
729
|
# return_type
|
740
|
-
return_type = opts[:debug_return_type] || '
|
730
|
+
return_type = opts[:debug_return_type] || 'ListUserMods200Response'
|
741
731
|
|
742
732
|
# auth_names
|
743
|
-
auth_names = opts[:debug_auth_names] || %w[
|
733
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
744
734
|
|
745
735
|
new_options = opts.merge(
|
746
|
-
operation: :'UserApi.
|
736
|
+
operation: :'UserApi.list_user_mods',
|
747
737
|
header_params: header_params,
|
748
738
|
query_params: query_params,
|
749
739
|
form_params: form_params,
|
@@ -754,46 +744,41 @@ module Kleister
|
|
754
744
|
|
755
745
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
756
746
|
if @api_client.config.debugging
|
757
|
-
@api_client.config.logger.debug "API called: UserApi#
|
747
|
+
@api_client.config.logger.debug "API called: UserApi#list_user_mods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
758
748
|
end
|
759
749
|
[data, status_code, headers]
|
760
750
|
end
|
761
751
|
|
762
|
-
# Fetch all
|
752
|
+
# Fetch all packs attached to user
|
763
753
|
# @param user_id [String] A user identifier or slug
|
764
754
|
# @param [Hash] opts the optional parameters
|
765
755
|
# @option opts [String] :search Search query
|
766
|
-
# @option opts [String] :sort Sorting column
|
756
|
+
# @option opts [String] :sort Sorting column
|
767
757
|
# @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 [
|
771
|
-
def
|
772
|
-
data, _status_code, _headers =
|
758
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
759
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
760
|
+
# @return [ListUserPacks200Response]
|
761
|
+
def list_user_packs(user_id, opts = {})
|
762
|
+
data, _status_code, _headers = list_user_packs_with_http_info(user_id, opts)
|
773
763
|
data
|
774
764
|
end
|
775
765
|
|
776
|
-
# Fetch all
|
766
|
+
# Fetch all packs attached to user
|
777
767
|
# @param user_id [String] A user identifier or slug
|
778
768
|
# @param [Hash] opts the optional parameters
|
779
769
|
# @option opts [String] :search Search query
|
780
|
-
# @option opts [String] :sort Sorting column
|
770
|
+
# @option opts [String] :sort Sorting column
|
781
771
|
# @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<(
|
785
|
-
def
|
772
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
773
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
774
|
+
# @return [Array<(ListUserPacks200Response, Integer, Hash)>] ListUserPacks200Response data, response status code and response headers
|
775
|
+
def list_user_packs_with_http_info(user_id, opts = {})
|
786
776
|
if @api_client.config.debugging
|
787
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
777
|
+
@api_client.config.logger.debug 'Calling API: UserApi.list_user_packs ...'
|
788
778
|
end
|
789
779
|
# verify the required parameter 'user_id' is set
|
790
780
|
if @api_client.config.client_side_validation && user_id.nil?
|
791
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
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}"
|
781
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_packs"
|
797
782
|
end
|
798
783
|
|
799
784
|
allowable_values = %w[asc desc]
|
@@ -802,7 +787,7 @@ module Kleister
|
|
802
787
|
end
|
803
788
|
|
804
789
|
# resource path
|
805
|
-
local_var_path = '/users/{user_id}/
|
790
|
+
local_var_path = '/users/{user_id}/packs'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
806
791
|
|
807
792
|
# query parameters
|
808
793
|
query_params = opts[:query_params] || {}
|
@@ -815,7 +800,7 @@ module Kleister
|
|
815
800
|
# header parameters
|
816
801
|
header_params = opts[:header_params] || {}
|
817
802
|
# HTTP header 'Accept' (if needed)
|
818
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
803
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
819
804
|
|
820
805
|
# form parameters
|
821
806
|
form_params = opts[:form_params] || {}
|
@@ -824,13 +809,13 @@ module Kleister
|
|
824
809
|
post_body = opts[:debug_body]
|
825
810
|
|
826
811
|
# return_type
|
827
|
-
return_type = opts[:debug_return_type] || '
|
812
|
+
return_type = opts[:debug_return_type] || 'ListUserPacks200Response'
|
828
813
|
|
829
814
|
# auth_names
|
830
|
-
auth_names = opts[:debug_auth_names] || %w[
|
815
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
831
816
|
|
832
817
|
new_options = opts.merge(
|
833
|
-
operation: :'UserApi.
|
818
|
+
operation: :'UserApi.list_user_packs',
|
834
819
|
header_params: header_params,
|
835
820
|
query_params: query_params,
|
836
821
|
form_params: form_params,
|
@@ -841,7 +826,7 @@ module Kleister
|
|
841
826
|
|
842
827
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
843
828
|
if @api_client.config.debugging
|
844
|
-
@api_client.config.logger.debug "API called: UserApi#
|
829
|
+
@api_client.config.logger.debug "API called: UserApi#list_user_packs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
845
830
|
end
|
846
831
|
[data, status_code, headers]
|
847
832
|
end
|
@@ -849,11 +834,11 @@ module Kleister
|
|
849
834
|
# Fetch all available users
|
850
835
|
# @param [Hash] opts the optional parameters
|
851
836
|
# @option opts [String] :search Search query
|
852
|
-
# @option opts [String] :sort Sorting column
|
837
|
+
# @option opts [String] :sort Sorting column
|
853
838
|
# @option opts [String] :order Sorting order (default to 'asc')
|
854
839
|
# @option opts [Integer] :limit Paging limit (default to 100)
|
855
840
|
# @option opts [Integer] :offset Paging offset (default to 0)
|
856
|
-
# @return [
|
841
|
+
# @return [ListUsers200Response]
|
857
842
|
def list_users(opts = {})
|
858
843
|
data, _status_code, _headers = list_users_with_http_info(opts)
|
859
844
|
data
|
@@ -862,20 +847,15 @@ module Kleister
|
|
862
847
|
# Fetch all available users
|
863
848
|
# @param [Hash] opts the optional parameters
|
864
849
|
# @option opts [String] :search Search query
|
865
|
-
# @option opts [String] :sort Sorting column
|
850
|
+
# @option opts [String] :sort Sorting column
|
866
851
|
# @option opts [String] :order Sorting order (default to 'asc')
|
867
852
|
# @option opts [Integer] :limit Paging limit (default to 100)
|
868
853
|
# @option opts [Integer] :offset Paging offset (default to 0)
|
869
|
-
# @return [Array<(
|
854
|
+
# @return [Array<(ListUsers200Response, Integer, Hash)>] ListUsers200Response data, response status code and response headers
|
870
855
|
def list_users_with_http_info(opts = {})
|
871
856
|
if @api_client.config.debugging
|
872
857
|
@api_client.config.logger.debug 'Calling API: UserApi.list_users ...'
|
873
858
|
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
859
|
allowable_values = %w[asc desc]
|
880
860
|
if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
|
881
861
|
raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
@@ -895,7 +875,7 @@ module Kleister
|
|
895
875
|
# header parameters
|
896
876
|
header_params = opts[:header_params] || {}
|
897
877
|
# HTTP header 'Accept' (if needed)
|
898
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
878
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
899
879
|
|
900
880
|
# form parameters
|
901
881
|
form_params = opts[:form_params] || {}
|
@@ -904,10 +884,10 @@ module Kleister
|
|
904
884
|
post_body = opts[:debug_body]
|
905
885
|
|
906
886
|
# return_type
|
907
|
-
return_type = opts[:debug_return_type] || '
|
887
|
+
return_type = opts[:debug_return_type] || 'ListUsers200Response'
|
908
888
|
|
909
889
|
# auth_names
|
910
|
-
auth_names = opts[:debug_auth_names] || %w[
|
890
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
911
891
|
|
912
892
|
new_options = opts.merge(
|
913
893
|
operation: :'UserApi.list_users',
|
@@ -926,36 +906,36 @@ module Kleister
|
|
926
906
|
[data, status_code, headers]
|
927
907
|
end
|
928
908
|
|
929
|
-
# Update
|
909
|
+
# Update group perms for user
|
930
910
|
# @param user_id [String] A user identifier or slug
|
931
|
-
# @param
|
911
|
+
# @param permit_pack_group_request [PermitPackGroupRequest] The user group data to permit
|
932
912
|
# @param [Hash] opts the optional parameters
|
933
913
|
# @return [Notification]
|
934
|
-
def
|
935
|
-
data, _status_code, _headers =
|
914
|
+
def permit_user_group(user_id, permit_pack_group_request, opts = {})
|
915
|
+
data, _status_code, _headers = permit_user_group_with_http_info(user_id, permit_pack_group_request, opts)
|
936
916
|
data
|
937
917
|
end
|
938
918
|
|
939
|
-
# Update
|
919
|
+
# Update group perms for user
|
940
920
|
# @param user_id [String] A user identifier or slug
|
941
|
-
# @param
|
921
|
+
# @param permit_pack_group_request [PermitPackGroupRequest] The user group data to permit
|
942
922
|
# @param [Hash] opts the optional parameters
|
943
923
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
944
|
-
def
|
924
|
+
def permit_user_group_with_http_info(user_id, permit_pack_group_request, opts = {})
|
945
925
|
if @api_client.config.debugging
|
946
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
926
|
+
@api_client.config.logger.debug 'Calling API: UserApi.permit_user_group ...'
|
947
927
|
end
|
948
928
|
# verify the required parameter 'user_id' is set
|
949
929
|
if @api_client.config.client_side_validation && user_id.nil?
|
950
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
930
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.permit_user_group"
|
951
931
|
end
|
952
|
-
# verify the required parameter '
|
953
|
-
if @api_client.config.client_side_validation &&
|
954
|
-
raise ArgumentError, "Missing the required parameter '
|
932
|
+
# verify the required parameter 'permit_pack_group_request' is set
|
933
|
+
if @api_client.config.client_side_validation && permit_pack_group_request.nil?
|
934
|
+
raise ArgumentError, "Missing the required parameter 'permit_pack_group_request' when calling UserApi.permit_user_group"
|
955
935
|
end
|
956
936
|
|
957
937
|
# resource path
|
958
|
-
local_var_path = '/users/{user_id}/
|
938
|
+
local_var_path = '/users/{user_id}/groups'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
959
939
|
|
960
940
|
# query parameters
|
961
941
|
query_params = opts[:query_params] || {}
|
@@ -963,7 +943,7 @@ module Kleister
|
|
963
943
|
# header parameters
|
964
944
|
header_params = opts[:header_params] || {}
|
965
945
|
# HTTP header 'Accept' (if needed)
|
966
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
946
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
967
947
|
# HTTP header 'Content-Type'
|
968
948
|
content_type = @api_client.select_header_content_type(['application/json'])
|
969
949
|
unless content_type.nil?
|
@@ -974,16 +954,16 @@ module Kleister
|
|
974
954
|
form_params = opts[:form_params] || {}
|
975
955
|
|
976
956
|
# http body (model)
|
977
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
957
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(permit_pack_group_request)
|
978
958
|
|
979
959
|
# return_type
|
980
960
|
return_type = opts[:debug_return_type] || 'Notification'
|
981
961
|
|
982
962
|
# auth_names
|
983
|
-
auth_names = opts[:debug_auth_names] || %w[
|
963
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
984
964
|
|
985
965
|
new_options = opts.merge(
|
986
|
-
operation: :'UserApi.
|
966
|
+
operation: :'UserApi.permit_user_group',
|
987
967
|
header_params: header_params,
|
988
968
|
query_params: query_params,
|
989
969
|
form_params: form_params,
|
@@ -994,41 +974,41 @@ module Kleister
|
|
994
974
|
|
995
975
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
996
976
|
if @api_client.config.debugging
|
997
|
-
@api_client.config.logger.debug "API called: UserApi#
|
977
|
+
@api_client.config.logger.debug "API called: UserApi#permit_user_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
998
978
|
end
|
999
979
|
[data, status_code, headers]
|
1000
980
|
end
|
1001
981
|
|
1002
|
-
# Update
|
982
|
+
# Update mod perms for user
|
1003
983
|
# @param user_id [String] A user identifier or slug
|
1004
|
-
# @param
|
984
|
+
# @param permit_group_mod_request [PermitGroupModRequest] The user mod data to permit
|
1005
985
|
# @param [Hash] opts the optional parameters
|
1006
986
|
# @return [Notification]
|
1007
|
-
def
|
1008
|
-
data, _status_code, _headers =
|
987
|
+
def permit_user_mod(user_id, permit_group_mod_request, opts = {})
|
988
|
+
data, _status_code, _headers = permit_user_mod_with_http_info(user_id, permit_group_mod_request, opts)
|
1009
989
|
data
|
1010
990
|
end
|
1011
991
|
|
1012
|
-
# Update
|
992
|
+
# Update mod perms for user
|
1013
993
|
# @param user_id [String] A user identifier or slug
|
1014
|
-
# @param
|
994
|
+
# @param permit_group_mod_request [PermitGroupModRequest] The user mod data to permit
|
1015
995
|
# @param [Hash] opts the optional parameters
|
1016
996
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
1017
|
-
def
|
997
|
+
def permit_user_mod_with_http_info(user_id, permit_group_mod_request, opts = {})
|
1018
998
|
if @api_client.config.debugging
|
1019
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
999
|
+
@api_client.config.logger.debug 'Calling API: UserApi.permit_user_mod ...'
|
1020
1000
|
end
|
1021
1001
|
# verify the required parameter 'user_id' is set
|
1022
1002
|
if @api_client.config.client_side_validation && user_id.nil?
|
1023
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
1003
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.permit_user_mod"
|
1024
1004
|
end
|
1025
|
-
# verify the required parameter '
|
1026
|
-
if @api_client.config.client_side_validation &&
|
1027
|
-
raise ArgumentError, "Missing the required parameter '
|
1005
|
+
# verify the required parameter 'permit_group_mod_request' is set
|
1006
|
+
if @api_client.config.client_side_validation && permit_group_mod_request.nil?
|
1007
|
+
raise ArgumentError, "Missing the required parameter 'permit_group_mod_request' when calling UserApi.permit_user_mod"
|
1028
1008
|
end
|
1029
1009
|
|
1030
1010
|
# resource path
|
1031
|
-
local_var_path = '/users/{user_id}/
|
1011
|
+
local_var_path = '/users/{user_id}/mods'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1032
1012
|
|
1033
1013
|
# query parameters
|
1034
1014
|
query_params = opts[:query_params] || {}
|
@@ -1036,7 +1016,7 @@ module Kleister
|
|
1036
1016
|
# header parameters
|
1037
1017
|
header_params = opts[:header_params] || {}
|
1038
1018
|
# HTTP header 'Accept' (if needed)
|
1039
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1019
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1040
1020
|
# HTTP header 'Content-Type'
|
1041
1021
|
content_type = @api_client.select_header_content_type(['application/json'])
|
1042
1022
|
unless content_type.nil?
|
@@ -1047,16 +1027,16 @@ module Kleister
|
|
1047
1027
|
form_params = opts[:form_params] || {}
|
1048
1028
|
|
1049
1029
|
# http body (model)
|
1050
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
1030
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(permit_group_mod_request)
|
1051
1031
|
|
1052
1032
|
# return_type
|
1053
1033
|
return_type = opts[:debug_return_type] || 'Notification'
|
1054
1034
|
|
1055
1035
|
# auth_names
|
1056
|
-
auth_names = opts[:debug_auth_names] || %w[
|
1036
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
1057
1037
|
|
1058
1038
|
new_options = opts.merge(
|
1059
|
-
operation: :'UserApi.
|
1039
|
+
operation: :'UserApi.permit_user_mod',
|
1060
1040
|
header_params: header_params,
|
1061
1041
|
query_params: query_params,
|
1062
1042
|
form_params: form_params,
|
@@ -1067,41 +1047,41 @@ module Kleister
|
|
1067
1047
|
|
1068
1048
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1069
1049
|
if @api_client.config.debugging
|
1070
|
-
@api_client.config.logger.debug "API called: UserApi#
|
1050
|
+
@api_client.config.logger.debug "API called: UserApi#permit_user_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1071
1051
|
end
|
1072
1052
|
[data, status_code, headers]
|
1073
1053
|
end
|
1074
1054
|
|
1075
|
-
# Update
|
1055
|
+
# Update pack perms for user
|
1076
1056
|
# @param user_id [String] A user identifier or slug
|
1077
|
-
# @param
|
1057
|
+
# @param permit_group_pack_request [PermitGroupPackRequest] The user pack data to permit
|
1078
1058
|
# @param [Hash] opts the optional parameters
|
1079
1059
|
# @return [Notification]
|
1080
|
-
def
|
1081
|
-
data, _status_code, _headers =
|
1060
|
+
def permit_user_pack(user_id, permit_group_pack_request, opts = {})
|
1061
|
+
data, _status_code, _headers = permit_user_pack_with_http_info(user_id, permit_group_pack_request, opts)
|
1082
1062
|
data
|
1083
1063
|
end
|
1084
1064
|
|
1085
|
-
# Update
|
1065
|
+
# Update pack perms for user
|
1086
1066
|
# @param user_id [String] A user identifier or slug
|
1087
|
-
# @param
|
1067
|
+
# @param permit_group_pack_request [PermitGroupPackRequest] The user pack data to permit
|
1088
1068
|
# @param [Hash] opts the optional parameters
|
1089
1069
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
1090
|
-
def
|
1070
|
+
def permit_user_pack_with_http_info(user_id, permit_group_pack_request, opts = {})
|
1091
1071
|
if @api_client.config.debugging
|
1092
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
1072
|
+
@api_client.config.logger.debug 'Calling API: UserApi.permit_user_pack ...'
|
1093
1073
|
end
|
1094
1074
|
# verify the required parameter 'user_id' is set
|
1095
1075
|
if @api_client.config.client_side_validation && user_id.nil?
|
1096
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
1076
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.permit_user_pack"
|
1097
1077
|
end
|
1098
|
-
# verify the required parameter '
|
1099
|
-
if @api_client.config.client_side_validation &&
|
1100
|
-
raise ArgumentError, "Missing the required parameter '
|
1078
|
+
# verify the required parameter 'permit_group_pack_request' is set
|
1079
|
+
if @api_client.config.client_side_validation && permit_group_pack_request.nil?
|
1080
|
+
raise ArgumentError, "Missing the required parameter 'permit_group_pack_request' when calling UserApi.permit_user_pack"
|
1101
1081
|
end
|
1102
1082
|
|
1103
1083
|
# resource path
|
1104
|
-
local_var_path = '/users/{user_id}/
|
1084
|
+
local_var_path = '/users/{user_id}/packs'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
1105
1085
|
|
1106
1086
|
# query parameters
|
1107
1087
|
query_params = opts[:query_params] || {}
|
@@ -1109,7 +1089,7 @@ module Kleister
|
|
1109
1089
|
# header parameters
|
1110
1090
|
header_params = opts[:header_params] || {}
|
1111
1091
|
# HTTP header 'Accept' (if needed)
|
1112
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1092
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1113
1093
|
# HTTP header 'Content-Type'
|
1114
1094
|
content_type = @api_client.select_header_content_type(['application/json'])
|
1115
1095
|
unless content_type.nil?
|
@@ -1120,16 +1100,16 @@ module Kleister
|
|
1120
1100
|
form_params = opts[:form_params] || {}
|
1121
1101
|
|
1122
1102
|
# http body (model)
|
1123
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
1103
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(permit_group_pack_request)
|
1124
1104
|
|
1125
1105
|
# return_type
|
1126
1106
|
return_type = opts[:debug_return_type] || 'Notification'
|
1127
1107
|
|
1128
1108
|
# auth_names
|
1129
|
-
auth_names = opts[:debug_auth_names] || %w[
|
1109
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
1130
1110
|
|
1131
1111
|
new_options = opts.merge(
|
1132
|
-
operation: :'UserApi.
|
1112
|
+
operation: :'UserApi.permit_user_pack',
|
1133
1113
|
header_params: header_params,
|
1134
1114
|
query_params: query_params,
|
1135
1115
|
form_params: form_params,
|
@@ -1140,7 +1120,7 @@ module Kleister
|
|
1140
1120
|
|
1141
1121
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1142
1122
|
if @api_client.config.debugging
|
1143
|
-
@api_client.config.logger.debug "API called: UserApi#
|
1123
|
+
@api_client.config.logger.debug "API called: UserApi#permit_user_pack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1144
1124
|
end
|
1145
1125
|
[data, status_code, headers]
|
1146
1126
|
end
|
@@ -1176,7 +1156,7 @@ module Kleister
|
|
1176
1156
|
# header parameters
|
1177
1157
|
header_params = opts[:header_params] || {}
|
1178
1158
|
# HTTP header 'Accept' (if needed)
|
1179
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1159
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1180
1160
|
|
1181
1161
|
# form parameters
|
1182
1162
|
form_params = opts[:form_params] || {}
|
@@ -1188,7 +1168,7 @@ module Kleister
|
|
1188
1168
|
return_type = opts[:debug_return_type] || 'User'
|
1189
1169
|
|
1190
1170
|
# auth_names
|
1191
|
-
auth_names = opts[:debug_auth_names] || %w[
|
1171
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
1192
1172
|
|
1193
1173
|
new_options = opts.merge(
|
1194
1174
|
operation: :'UserApi.show_user',
|
@@ -1209,20 +1189,20 @@ module Kleister
|
|
1209
1189
|
|
1210
1190
|
# Update a specific user
|
1211
1191
|
# @param user_id [String] A user identifier or slug
|
1212
|
-
# @param
|
1192
|
+
# @param update_user_request [UpdateUserRequest] The user data to update
|
1213
1193
|
# @param [Hash] opts the optional parameters
|
1214
1194
|
# @return [User]
|
1215
|
-
def update_user(user_id,
|
1216
|
-
data, _status_code, _headers = update_user_with_http_info(user_id,
|
1195
|
+
def update_user(user_id, update_user_request, opts = {})
|
1196
|
+
data, _status_code, _headers = update_user_with_http_info(user_id, update_user_request, opts)
|
1217
1197
|
data
|
1218
1198
|
end
|
1219
1199
|
|
1220
1200
|
# Update a specific user
|
1221
1201
|
# @param user_id [String] A user identifier or slug
|
1222
|
-
# @param
|
1202
|
+
# @param update_user_request [UpdateUserRequest] The user data to update
|
1223
1203
|
# @param [Hash] opts the optional parameters
|
1224
1204
|
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
1225
|
-
def update_user_with_http_info(user_id,
|
1205
|
+
def update_user_with_http_info(user_id, update_user_request, opts = {})
|
1226
1206
|
if @api_client.config.debugging
|
1227
1207
|
@api_client.config.logger.debug 'Calling API: UserApi.update_user ...'
|
1228
1208
|
end
|
@@ -1230,9 +1210,9 @@ module Kleister
|
|
1230
1210
|
if @api_client.config.client_side_validation && user_id.nil?
|
1231
1211
|
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.update_user"
|
1232
1212
|
end
|
1233
|
-
# verify the required parameter '
|
1234
|
-
if @api_client.config.client_side_validation &&
|
1235
|
-
raise ArgumentError, "Missing the required parameter '
|
1213
|
+
# verify the required parameter 'update_user_request' is set
|
1214
|
+
if @api_client.config.client_side_validation && update_user_request.nil?
|
1215
|
+
raise ArgumentError, "Missing the required parameter 'update_user_request' when calling UserApi.update_user"
|
1236
1216
|
end
|
1237
1217
|
|
1238
1218
|
# resource path
|
@@ -1244,7 +1224,7 @@ module Kleister
|
|
1244
1224
|
# header parameters
|
1245
1225
|
header_params = opts[:header_params] || {}
|
1246
1226
|
# HTTP header 'Accept' (if needed)
|
1247
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1227
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1248
1228
|
# HTTP header 'Content-Type'
|
1249
1229
|
content_type = @api_client.select_header_content_type(['application/json'])
|
1250
1230
|
unless content_type.nil?
|
@@ -1255,13 +1235,13 @@ module Kleister
|
|
1255
1235
|
form_params = opts[:form_params] || {}
|
1256
1236
|
|
1257
1237
|
# http body (model)
|
1258
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
1238
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_user_request)
|
1259
1239
|
|
1260
1240
|
# return_type
|
1261
1241
|
return_type = opts[:debug_return_type] || 'User'
|
1262
1242
|
|
1263
1243
|
# auth_names
|
1264
|
-
auth_names = opts[:debug_auth_names] || %w[
|
1244
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
1265
1245
|
|
1266
1246
|
new_options = opts.merge(
|
1267
1247
|
operation: :'UserApi.update_user',
|