gopad 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +3 -3
- data/lib/gopad/api/auth_api.rb +99 -47
- data/lib/gopad/api/{team_api.rb → group_api.rb} +175 -185
- data/lib/gopad/api/profile_api.rb +12 -12
- data/lib/gopad/api/user_api.rb +99 -109
- data/lib/gopad/configuration.rb +0 -7
- data/lib/gopad/models/{users.rb → create_group_request.rb} +19 -17
- data/lib/gopad/models/create_user_request.rb +258 -0
- data/lib/gopad/models/{teams.rb → delete_group_from_user_request.rb} +20 -20
- data/lib/gopad/models/{team_users.rb → delete_user_from_group_request.rb} +20 -27
- data/lib/gopad/models/{team.rb → group.rb} +9 -17
- data/lib/gopad/models/{user_team_params.rb → list_group_users200_response.rb} +61 -58
- data/lib/gopad/models/list_groups200_response.rb +260 -0
- data/lib/gopad/models/list_providers200_response.rb +236 -0
- data/lib/gopad/models/{team_user_params.rb → list_user_groups200_response.rb} +59 -56
- data/lib/gopad/models/list_users200_response.rb +260 -0
- data/lib/gopad/models/{auth_login.rb → login_auth_request.rb} +4 -3
- data/lib/gopad/models/permit_group_user_request.rb +232 -0
- data/lib/gopad/models/permit_user_group_request.rb +232 -0
- data/lib/gopad/models/profile.rb +8 -8
- data/lib/gopad/models/{user_teams.rb → provider.rb} +28 -21
- data/lib/gopad/models/update_profile_request.rb +238 -0
- data/lib/gopad/models/update_user_request.rb +254 -0
- data/lib/gopad/models/user.rb +5 -13
- data/lib/gopad/models/{user_team.rb → user_group.rb} +22 -22
- data/lib/gopad/version.rb +1 -1
- data/lib/gopad.rb +18 -10
- metadata +20 -12
@@ -54,7 +54,7 @@ module Gopad
|
|
54
54
|
return_type = opts[:debug_return_type] || 'Profile'
|
55
55
|
|
56
56
|
# auth_names
|
57
|
-
auth_names = opts[:debug_auth_names] || %w[
|
57
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
58
58
|
|
59
59
|
new_options = opts.merge(
|
60
60
|
operation: :'ProfileApi.show_profile',
|
@@ -109,7 +109,7 @@ module Gopad
|
|
109
109
|
return_type = opts[:debug_return_type] || 'AuthToken'
|
110
110
|
|
111
111
|
# auth_names
|
112
|
-
auth_names = opts[:debug_auth_names] || %w[
|
112
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
113
113
|
|
114
114
|
new_options = opts.merge(
|
115
115
|
operation: :'ProfileApi.token_profile',
|
@@ -129,25 +129,25 @@ module Gopad
|
|
129
129
|
end
|
130
130
|
|
131
131
|
# Update your own profile information
|
132
|
-
# @param
|
132
|
+
# @param update_profile_request [UpdateProfileRequest] The profile data to update
|
133
133
|
# @param [Hash] opts the optional parameters
|
134
134
|
# @return [Profile]
|
135
|
-
def update_profile(
|
136
|
-
data, _status_code, _headers = update_profile_with_http_info(
|
135
|
+
def update_profile(update_profile_request, opts = {})
|
136
|
+
data, _status_code, _headers = update_profile_with_http_info(update_profile_request, opts)
|
137
137
|
data
|
138
138
|
end
|
139
139
|
|
140
140
|
# Update your own profile information
|
141
|
-
# @param
|
141
|
+
# @param update_profile_request [UpdateProfileRequest] The profile data to update
|
142
142
|
# @param [Hash] opts the optional parameters
|
143
143
|
# @return [Array<(Profile, Integer, Hash)>] Profile data, response status code and response headers
|
144
|
-
def update_profile_with_http_info(
|
144
|
+
def update_profile_with_http_info(update_profile_request, opts = {})
|
145
145
|
if @api_client.config.debugging
|
146
146
|
@api_client.config.logger.debug 'Calling API: ProfileApi.update_profile ...'
|
147
147
|
end
|
148
|
-
# verify the required parameter '
|
149
|
-
if @api_client.config.client_side_validation &&
|
150
|
-
raise ArgumentError, "Missing the required parameter '
|
148
|
+
# verify the required parameter 'update_profile_request' is set
|
149
|
+
if @api_client.config.client_side_validation && update_profile_request.nil?
|
150
|
+
raise ArgumentError, "Missing the required parameter 'update_profile_request' when calling ProfileApi.update_profile"
|
151
151
|
end
|
152
152
|
|
153
153
|
# resource path
|
@@ -170,13 +170,13 @@ module Gopad
|
|
170
170
|
form_params = opts[:form_params] || {}
|
171
171
|
|
172
172
|
# http body (model)
|
173
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
173
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_profile_request)
|
174
174
|
|
175
175
|
# return_type
|
176
176
|
return_type = opts[:debug_return_type] || 'Profile'
|
177
177
|
|
178
178
|
# auth_names
|
179
|
-
auth_names = opts[:debug_auth_names] || []
|
179
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
180
180
|
|
181
181
|
new_options = opts.merge(
|
182
182
|
operation: :'ProfileApi.update_profile',
|
data/lib/gopad/api/user_api.rb
CHANGED
@@ -18,36 +18,36 @@ module Gopad
|
|
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_user_group_request [PermitUserGroupRequest] 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_user_group_request, opts = {})
|
27
|
+
data, _status_code, _headers = attach_user_to_group_with_http_info(user_id, permit_user_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_user_group_request [PermitUserGroupRequest] 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_user_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_user_group_request' is set
|
45
|
+
if @api_client.config.client_side_validation && permit_user_group_request.nil?
|
46
|
+
raise ArgumentError, "Missing the required parameter 'permit_user_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] || {}
|
@@ -66,16 +66,16 @@ module Gopad
|
|
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_user_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,31 +86,31 @@ module Gopad
|
|
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
94
|
# Create a new user
|
95
|
-
# @param
|
95
|
+
# @param create_user_request [CreateUserRequest] The user data to create
|
96
96
|
# @param [Hash] opts the optional parameters
|
97
97
|
# @return [User]
|
98
|
-
def create_user(
|
99
|
-
data, _status_code, _headers = create_user_with_http_info(
|
98
|
+
def create_user(create_user_request, opts = {})
|
99
|
+
data, _status_code, _headers = create_user_with_http_info(create_user_request, opts)
|
100
100
|
data
|
101
101
|
end
|
102
102
|
|
103
103
|
# Create a new user
|
104
|
-
# @param
|
104
|
+
# @param create_user_request [CreateUserRequest] The user data to create
|
105
105
|
# @param [Hash] opts the optional parameters
|
106
106
|
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
107
|
-
def create_user_with_http_info(
|
107
|
+
def create_user_with_http_info(create_user_request, opts = {})
|
108
108
|
if @api_client.config.debugging
|
109
109
|
@api_client.config.logger.debug 'Calling API: UserApi.create_user ...'
|
110
110
|
end
|
111
|
-
# verify the required parameter '
|
112
|
-
if @api_client.config.client_side_validation &&
|
113
|
-
raise ArgumentError, "Missing the required parameter '
|
111
|
+
# verify the required parameter 'create_user_request' is set
|
112
|
+
if @api_client.config.client_side_validation && create_user_request.nil?
|
113
|
+
raise ArgumentError, "Missing the required parameter 'create_user_request' when calling UserApi.create_user"
|
114
114
|
end
|
115
115
|
|
116
116
|
# resource path
|
@@ -133,13 +133,13 @@ module Gopad
|
|
133
133
|
form_params = opts[:form_params] || {}
|
134
134
|
|
135
135
|
# http body (model)
|
136
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
136
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_user_request)
|
137
137
|
|
138
138
|
# return_type
|
139
139
|
return_type = opts[:debug_return_type] || 'User'
|
140
140
|
|
141
141
|
# auth_names
|
142
|
-
auth_names = opts[:debug_auth_names] || %w[
|
142
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
143
143
|
|
144
144
|
new_options = opts.merge(
|
145
145
|
operation: :'UserApi.create_user',
|
@@ -201,7 +201,7 @@ module Gopad
|
|
201
201
|
return_type = opts[:debug_return_type] || 'Notification'
|
202
202
|
|
203
203
|
# auth_names
|
204
|
-
auth_names = opts[:debug_auth_names] || %w[
|
204
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
205
205
|
|
206
206
|
new_options = opts.merge(
|
207
207
|
operation: :'UserApi.delete_user',
|
@@ -220,36 +220,36 @@ module Gopad
|
|
220
220
|
[data, status_code, headers]
|
221
221
|
end
|
222
222
|
|
223
|
-
# Unlink a
|
223
|
+
# Unlink a group from user
|
224
224
|
# @param user_id [String] A user identifier or slug
|
225
|
-
# @param
|
225
|
+
# @param delete_user_from_group_request [DeleteUserFromGroupRequest] The user group data to unlink
|
226
226
|
# @param [Hash] opts the optional parameters
|
227
227
|
# @return [Notification]
|
228
|
-
def
|
229
|
-
data, _status_code, _headers =
|
228
|
+
def delete_user_from_group(user_id, delete_user_from_group_request, opts = {})
|
229
|
+
data, _status_code, _headers = delete_user_from_group_with_http_info(user_id, delete_user_from_group_request, opts)
|
230
230
|
data
|
231
231
|
end
|
232
232
|
|
233
|
-
# Unlink a
|
233
|
+
# Unlink a group from user
|
234
234
|
# @param user_id [String] A user identifier or slug
|
235
|
-
# @param
|
235
|
+
# @param delete_user_from_group_request [DeleteUserFromGroupRequest] The user group data to unlink
|
236
236
|
# @param [Hash] opts the optional parameters
|
237
237
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
238
|
-
def
|
238
|
+
def delete_user_from_group_with_http_info(user_id, delete_user_from_group_request, opts = {})
|
239
239
|
if @api_client.config.debugging
|
240
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
240
|
+
@api_client.config.logger.debug 'Calling API: UserApi.delete_user_from_group ...'
|
241
241
|
end
|
242
242
|
# verify the required parameter 'user_id' is set
|
243
243
|
if @api_client.config.client_side_validation && user_id.nil?
|
244
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
244
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.delete_user_from_group"
|
245
245
|
end
|
246
|
-
# verify the required parameter '
|
247
|
-
if @api_client.config.client_side_validation &&
|
248
|
-
raise ArgumentError, "Missing the required parameter '
|
246
|
+
# verify the required parameter 'delete_user_from_group_request' is set
|
247
|
+
if @api_client.config.client_side_validation && delete_user_from_group_request.nil?
|
248
|
+
raise ArgumentError, "Missing the required parameter 'delete_user_from_group_request' when calling UserApi.delete_user_from_group"
|
249
249
|
end
|
250
250
|
|
251
251
|
# resource path
|
252
|
-
local_var_path = '/users/{user_id}/
|
252
|
+
local_var_path = '/users/{user_id}/groups'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
253
253
|
|
254
254
|
# query parameters
|
255
255
|
query_params = opts[:query_params] || {}
|
@@ -268,16 +268,16 @@ module Gopad
|
|
268
268
|
form_params = opts[:form_params] || {}
|
269
269
|
|
270
270
|
# http body (model)
|
271
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
271
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_user_from_group_request)
|
272
272
|
|
273
273
|
# return_type
|
274
274
|
return_type = opts[:debug_return_type] || 'Notification'
|
275
275
|
|
276
276
|
# auth_names
|
277
|
-
auth_names = opts[:debug_auth_names] || %w[
|
277
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
278
278
|
|
279
279
|
new_options = opts.merge(
|
280
|
-
operation: :'UserApi.
|
280
|
+
operation: :'UserApi.delete_user_from_group',
|
281
281
|
header_params: header_params,
|
282
282
|
query_params: query_params,
|
283
283
|
form_params: form_params,
|
@@ -288,46 +288,41 @@ module Gopad
|
|
288
288
|
|
289
289
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
290
290
|
if @api_client.config.debugging
|
291
|
-
@api_client.config.logger.debug "API called: UserApi#
|
291
|
+
@api_client.config.logger.debug "API called: UserApi#delete_user_from_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
292
292
|
end
|
293
293
|
[data, status_code, headers]
|
294
294
|
end
|
295
295
|
|
296
|
-
# Fetch all
|
296
|
+
# Fetch all groups attached to user
|
297
297
|
# @param user_id [String] A user identifier or slug
|
298
298
|
# @param [Hash] opts the optional parameters
|
299
299
|
# @option opts [String] :search Search query
|
300
|
-
# @option opts [String] :sort Sorting column
|
300
|
+
# @option opts [String] :sort Sorting column
|
301
301
|
# @option opts [String] :order Sorting order (default to 'asc')
|
302
|
-
# @option opts [Integer] :limit Paging limit
|
303
|
-
# @option opts [Integer] :offset Paging offset
|
304
|
-
# @return [
|
305
|
-
def
|
306
|
-
data, _status_code, _headers =
|
302
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
303
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
304
|
+
# @return [ListUserGroups200Response]
|
305
|
+
def list_user_groups(user_id, opts = {})
|
306
|
+
data, _status_code, _headers = list_user_groups_with_http_info(user_id, opts)
|
307
307
|
data
|
308
308
|
end
|
309
309
|
|
310
|
-
# Fetch all
|
310
|
+
# Fetch all groups attached to user
|
311
311
|
# @param user_id [String] A user identifier or slug
|
312
312
|
# @param [Hash] opts the optional parameters
|
313
313
|
# @option opts [String] :search Search query
|
314
|
-
# @option opts [String] :sort Sorting column
|
314
|
+
# @option opts [String] :sort Sorting column
|
315
315
|
# @option opts [String] :order Sorting order (default to 'asc')
|
316
|
-
# @option opts [Integer] :limit Paging limit
|
317
|
-
# @option opts [Integer] :offset Paging offset
|
318
|
-
# @return [Array<(
|
319
|
-
def
|
316
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
317
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
318
|
+
# @return [Array<(ListUserGroups200Response, Integer, Hash)>] ListUserGroups200Response data, response status code and response headers
|
319
|
+
def list_user_groups_with_http_info(user_id, opts = {})
|
320
320
|
if @api_client.config.debugging
|
321
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
321
|
+
@api_client.config.logger.debug 'Calling API: UserApi.list_user_groups ...'
|
322
322
|
end
|
323
323
|
# verify the required parameter 'user_id' is set
|
324
324
|
if @api_client.config.client_side_validation && user_id.nil?
|
325
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
326
|
-
end
|
327
|
-
|
328
|
-
allowable_values = %w[slug name]
|
329
|
-
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
330
|
-
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
325
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_groups"
|
331
326
|
end
|
332
327
|
|
333
328
|
allowable_values = %w[asc desc]
|
@@ -336,7 +331,7 @@ module Gopad
|
|
336
331
|
end
|
337
332
|
|
338
333
|
# resource path
|
339
|
-
local_var_path = '/users/{user_id}/
|
334
|
+
local_var_path = '/users/{user_id}/groups'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
340
335
|
|
341
336
|
# query parameters
|
342
337
|
query_params = opts[:query_params] || {}
|
@@ -358,13 +353,13 @@ module Gopad
|
|
358
353
|
post_body = opts[:debug_body]
|
359
354
|
|
360
355
|
# return_type
|
361
|
-
return_type = opts[:debug_return_type] || '
|
356
|
+
return_type = opts[:debug_return_type] || 'ListUserGroups200Response'
|
362
357
|
|
363
358
|
# auth_names
|
364
|
-
auth_names = opts[:debug_auth_names] || %w[
|
359
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
365
360
|
|
366
361
|
new_options = opts.merge(
|
367
|
-
operation: :'UserApi.
|
362
|
+
operation: :'UserApi.list_user_groups',
|
368
363
|
header_params: header_params,
|
369
364
|
query_params: query_params,
|
370
365
|
form_params: form_params,
|
@@ -375,7 +370,7 @@ module Gopad
|
|
375
370
|
|
376
371
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
377
372
|
if @api_client.config.debugging
|
378
|
-
@api_client.config.logger.debug "API called: UserApi#
|
373
|
+
@api_client.config.logger.debug "API called: UserApi#list_user_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
379
374
|
end
|
380
375
|
[data, status_code, headers]
|
381
376
|
end
|
@@ -383,11 +378,11 @@ module Gopad
|
|
383
378
|
# Fetch all available users
|
384
379
|
# @param [Hash] opts the optional parameters
|
385
380
|
# @option opts [String] :search Search query
|
386
|
-
# @option opts [String] :sort Sorting column
|
381
|
+
# @option opts [String] :sort Sorting column
|
387
382
|
# @option opts [String] :order Sorting order (default to 'asc')
|
388
383
|
# @option opts [Integer] :limit Paging limit (default to 100)
|
389
384
|
# @option opts [Integer] :offset Paging offset (default to 0)
|
390
|
-
# @return [
|
385
|
+
# @return [ListUsers200Response]
|
391
386
|
def list_users(opts = {})
|
392
387
|
data, _status_code, _headers = list_users_with_http_info(opts)
|
393
388
|
data
|
@@ -396,20 +391,15 @@ module Gopad
|
|
396
391
|
# Fetch all available users
|
397
392
|
# @param [Hash] opts the optional parameters
|
398
393
|
# @option opts [String] :search Search query
|
399
|
-
# @option opts [String] :sort Sorting column
|
394
|
+
# @option opts [String] :sort Sorting column
|
400
395
|
# @option opts [String] :order Sorting order (default to 'asc')
|
401
396
|
# @option opts [Integer] :limit Paging limit (default to 100)
|
402
397
|
# @option opts [Integer] :offset Paging offset (default to 0)
|
403
|
-
# @return [Array<(
|
398
|
+
# @return [Array<(ListUsers200Response, Integer, Hash)>] ListUsers200Response data, response status code and response headers
|
404
399
|
def list_users_with_http_info(opts = {})
|
405
400
|
if @api_client.config.debugging
|
406
401
|
@api_client.config.logger.debug 'Calling API: UserApi.list_users ...'
|
407
402
|
end
|
408
|
-
allowable_values = %w[username email fullname admin active]
|
409
|
-
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
410
|
-
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
411
|
-
end
|
412
|
-
|
413
403
|
allowable_values = %w[asc desc]
|
414
404
|
if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
|
415
405
|
raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
@@ -438,10 +428,10 @@ module Gopad
|
|
438
428
|
post_body = opts[:debug_body]
|
439
429
|
|
440
430
|
# return_type
|
441
|
-
return_type = opts[:debug_return_type] || '
|
431
|
+
return_type = opts[:debug_return_type] || 'ListUsers200Response'
|
442
432
|
|
443
433
|
# auth_names
|
444
|
-
auth_names = opts[:debug_auth_names] || %w[
|
434
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
445
435
|
|
446
436
|
new_options = opts.merge(
|
447
437
|
operation: :'UserApi.list_users',
|
@@ -460,36 +450,36 @@ module Gopad
|
|
460
450
|
[data, status_code, headers]
|
461
451
|
end
|
462
452
|
|
463
|
-
# Update
|
453
|
+
# Update group perms for user
|
464
454
|
# @param user_id [String] A user identifier or slug
|
465
|
-
# @param
|
455
|
+
# @param permit_user_group_request [PermitUserGroupRequest] The user group data to permit
|
466
456
|
# @param [Hash] opts the optional parameters
|
467
457
|
# @return [Notification]
|
468
|
-
def
|
469
|
-
data, _status_code, _headers =
|
458
|
+
def permit_user_group(user_id, permit_user_group_request, opts = {})
|
459
|
+
data, _status_code, _headers = permit_user_group_with_http_info(user_id, permit_user_group_request, opts)
|
470
460
|
data
|
471
461
|
end
|
472
462
|
|
473
|
-
# Update
|
463
|
+
# Update group perms for user
|
474
464
|
# @param user_id [String] A user identifier or slug
|
475
|
-
# @param
|
465
|
+
# @param permit_user_group_request [PermitUserGroupRequest] The user group data to permit
|
476
466
|
# @param [Hash] opts the optional parameters
|
477
467
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
478
|
-
def
|
468
|
+
def permit_user_group_with_http_info(user_id, permit_user_group_request, opts = {})
|
479
469
|
if @api_client.config.debugging
|
480
|
-
@api_client.config.logger.debug 'Calling API: UserApi.
|
470
|
+
@api_client.config.logger.debug 'Calling API: UserApi.permit_user_group ...'
|
481
471
|
end
|
482
472
|
# verify the required parameter 'user_id' is set
|
483
473
|
if @api_client.config.client_side_validation && user_id.nil?
|
484
|
-
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.
|
474
|
+
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.permit_user_group"
|
485
475
|
end
|
486
|
-
# verify the required parameter '
|
487
|
-
if @api_client.config.client_side_validation &&
|
488
|
-
raise ArgumentError, "Missing the required parameter '
|
476
|
+
# verify the required parameter 'permit_user_group_request' is set
|
477
|
+
if @api_client.config.client_side_validation && permit_user_group_request.nil?
|
478
|
+
raise ArgumentError, "Missing the required parameter 'permit_user_group_request' when calling UserApi.permit_user_group"
|
489
479
|
end
|
490
480
|
|
491
481
|
# resource path
|
492
|
-
local_var_path = '/users/{user_id}/
|
482
|
+
local_var_path = '/users/{user_id}/groups'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
493
483
|
|
494
484
|
# query parameters
|
495
485
|
query_params = opts[:query_params] || {}
|
@@ -508,16 +498,16 @@ module Gopad
|
|
508
498
|
form_params = opts[:form_params] || {}
|
509
499
|
|
510
500
|
# http body (model)
|
511
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
501
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(permit_user_group_request)
|
512
502
|
|
513
503
|
# return_type
|
514
504
|
return_type = opts[:debug_return_type] || 'Notification'
|
515
505
|
|
516
506
|
# auth_names
|
517
|
-
auth_names = opts[:debug_auth_names] || %w[
|
507
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
518
508
|
|
519
509
|
new_options = opts.merge(
|
520
|
-
operation: :'UserApi.
|
510
|
+
operation: :'UserApi.permit_user_group',
|
521
511
|
header_params: header_params,
|
522
512
|
query_params: query_params,
|
523
513
|
form_params: form_params,
|
@@ -528,7 +518,7 @@ module Gopad
|
|
528
518
|
|
529
519
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
530
520
|
if @api_client.config.debugging
|
531
|
-
@api_client.config.logger.debug "API called: UserApi#
|
521
|
+
@api_client.config.logger.debug "API called: UserApi#permit_user_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
532
522
|
end
|
533
523
|
[data, status_code, headers]
|
534
524
|
end
|
@@ -576,7 +566,7 @@ module Gopad
|
|
576
566
|
return_type = opts[:debug_return_type] || 'User'
|
577
567
|
|
578
568
|
# auth_names
|
579
|
-
auth_names = opts[:debug_auth_names] || %w[
|
569
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
580
570
|
|
581
571
|
new_options = opts.merge(
|
582
572
|
operation: :'UserApi.show_user',
|
@@ -597,20 +587,20 @@ module Gopad
|
|
597
587
|
|
598
588
|
# Update a specific user
|
599
589
|
# @param user_id [String] A user identifier or slug
|
600
|
-
# @param
|
590
|
+
# @param update_user_request [UpdateUserRequest] The user data to update
|
601
591
|
# @param [Hash] opts the optional parameters
|
602
592
|
# @return [User]
|
603
|
-
def update_user(user_id,
|
604
|
-
data, _status_code, _headers = update_user_with_http_info(user_id,
|
593
|
+
def update_user(user_id, update_user_request, opts = {})
|
594
|
+
data, _status_code, _headers = update_user_with_http_info(user_id, update_user_request, opts)
|
605
595
|
data
|
606
596
|
end
|
607
597
|
|
608
598
|
# Update a specific user
|
609
599
|
# @param user_id [String] A user identifier or slug
|
610
|
-
# @param
|
600
|
+
# @param update_user_request [UpdateUserRequest] The user data to update
|
611
601
|
# @param [Hash] opts the optional parameters
|
612
602
|
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
613
|
-
def update_user_with_http_info(user_id,
|
603
|
+
def update_user_with_http_info(user_id, update_user_request, opts = {})
|
614
604
|
if @api_client.config.debugging
|
615
605
|
@api_client.config.logger.debug 'Calling API: UserApi.update_user ...'
|
616
606
|
end
|
@@ -618,9 +608,9 @@ module Gopad
|
|
618
608
|
if @api_client.config.client_side_validation && user_id.nil?
|
619
609
|
raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.update_user"
|
620
610
|
end
|
621
|
-
# verify the required parameter '
|
622
|
-
if @api_client.config.client_side_validation &&
|
623
|
-
raise ArgumentError, "Missing the required parameter '
|
611
|
+
# verify the required parameter 'update_user_request' is set
|
612
|
+
if @api_client.config.client_side_validation && update_user_request.nil?
|
613
|
+
raise ArgumentError, "Missing the required parameter 'update_user_request' when calling UserApi.update_user"
|
624
614
|
end
|
625
615
|
|
626
616
|
# resource path
|
@@ -643,13 +633,13 @@ module Gopad
|
|
643
633
|
form_params = opts[:form_params] || {}
|
644
634
|
|
645
635
|
# http body (model)
|
646
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
636
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_user_request)
|
647
637
|
|
648
638
|
# return_type
|
649
639
|
return_type = opts[:debug_return_type] || 'User'
|
650
640
|
|
651
641
|
# auth_names
|
652
|
-
auth_names = opts[:debug_auth_names] || %w[
|
642
|
+
auth_names = opts[:debug_auth_names] || %w[Basic Header Bearer]
|
653
643
|
|
654
644
|
new_options = opts.merge(
|
655
645
|
operation: :'UserApi.update_user',
|
data/lib/gopad/configuration.rb
CHANGED