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
@@ -11,43 +11,43 @@
|
|
11
11
|
require 'cgi'
|
12
12
|
|
13
13
|
module Gopad
|
14
|
-
class
|
14
|
+
class GroupApi
|
15
15
|
attr_accessor :api_client
|
16
16
|
|
17
17
|
def initialize(api_client = ApiClient.default)
|
18
18
|
@api_client = api_client
|
19
19
|
end
|
20
20
|
|
21
|
-
# Attach a user to
|
22
|
-
# @param
|
23
|
-
# @param
|
21
|
+
# Attach a user to group
|
22
|
+
# @param group_id [String] A group identifier or slug
|
23
|
+
# @param permit_group_user_request [PermitGroupUserRequest] The group user 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_group_to_user(group_id, permit_group_user_request, opts = {})
|
27
|
+
data, _status_code, _headers = attach_group_to_user_with_http_info(group_id, permit_group_user_request, opts)
|
28
28
|
data
|
29
29
|
end
|
30
30
|
|
31
|
-
# Attach a user to
|
32
|
-
# @param
|
33
|
-
# @param
|
31
|
+
# Attach a user to group
|
32
|
+
# @param group_id [String] A group identifier or slug
|
33
|
+
# @param permit_group_user_request [PermitGroupUserRequest] The group user 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_group_to_user_with_http_info(group_id, permit_group_user_request, opts = {})
|
37
37
|
if @api_client.config.debugging
|
38
|
-
@api_client.config.logger.debug 'Calling API:
|
38
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.attach_group_to_user ...'
|
39
39
|
end
|
40
|
-
# verify the required parameter '
|
41
|
-
if @api_client.config.client_side_validation &&
|
42
|
-
raise ArgumentError, "Missing the required parameter '
|
40
|
+
# verify the required parameter 'group_id' is set
|
41
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
42
|
+
raise ArgumentError, "Missing the required parameter 'group_id' when calling GroupApi.attach_group_to_user"
|
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_group_user_request' is set
|
45
|
+
if @api_client.config.client_side_validation && permit_group_user_request.nil?
|
46
|
+
raise ArgumentError, "Missing the required parameter 'permit_group_user_request' when calling GroupApi.attach_group_to_user"
|
47
47
|
end
|
48
48
|
|
49
49
|
# resource path
|
50
|
-
local_var_path = '/
|
50
|
+
local_var_path = '/groups/{group_id}/users'.sub('{' + 'group_id' + '}', CGI.escape(group_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_group_user_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: :'
|
78
|
+
operation: :'GroupApi.attach_group_to_user',
|
79
79
|
header_params: header_params,
|
80
80
|
query_params: query_params,
|
81
81
|
form_params: form_params,
|
@@ -86,35 +86,35 @@ 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:
|
89
|
+
@api_client.config.logger.debug "API called: GroupApi#attach_group_to_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
90
|
end
|
91
91
|
[data, status_code, headers]
|
92
92
|
end
|
93
93
|
|
94
|
-
# Create a new
|
95
|
-
# @param
|
94
|
+
# Create a new group
|
95
|
+
# @param create_group_request [CreateGroupRequest] The group data to create
|
96
96
|
# @param [Hash] opts the optional parameters
|
97
|
-
# @return [
|
98
|
-
def
|
99
|
-
data, _status_code, _headers =
|
97
|
+
# @return [Group]
|
98
|
+
def create_group(create_group_request, opts = {})
|
99
|
+
data, _status_code, _headers = create_group_with_http_info(create_group_request, opts)
|
100
100
|
data
|
101
101
|
end
|
102
102
|
|
103
|
-
# Create a new
|
104
|
-
# @param
|
103
|
+
# Create a new group
|
104
|
+
# @param create_group_request [CreateGroupRequest] The group data to create
|
105
105
|
# @param [Hash] opts the optional parameters
|
106
|
-
# @return [Array<(
|
107
|
-
def
|
106
|
+
# @return [Array<(Group, Integer, Hash)>] Group data, response status code and response headers
|
107
|
+
def create_group_with_http_info(create_group_request, opts = {})
|
108
108
|
if @api_client.config.debugging
|
109
|
-
@api_client.config.logger.debug 'Calling API:
|
109
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.create_group ...'
|
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_group_request' is set
|
112
|
+
if @api_client.config.client_side_validation && create_group_request.nil?
|
113
|
+
raise ArgumentError, "Missing the required parameter 'create_group_request' when calling GroupApi.create_group"
|
114
114
|
end
|
115
115
|
|
116
116
|
# resource path
|
117
|
-
local_var_path = '/
|
117
|
+
local_var_path = '/groups'
|
118
118
|
|
119
119
|
# query parameters
|
120
120
|
query_params = opts[:query_params] || {}
|
@@ -133,16 +133,16 @@ 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_group_request)
|
137
137
|
|
138
138
|
# return_type
|
139
|
-
return_type = opts[:debug_return_type] || '
|
139
|
+
return_type = opts[:debug_return_type] || 'Group'
|
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
|
-
operation: :'
|
145
|
+
operation: :'GroupApi.create_group',
|
146
146
|
header_params: header_params,
|
147
147
|
query_params: query_params,
|
148
148
|
form_params: form_params,
|
@@ -153,35 +153,35 @@ module Gopad
|
|
153
153
|
|
154
154
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
155
155
|
if @api_client.config.debugging
|
156
|
-
@api_client.config.logger.debug "API called:
|
156
|
+
@api_client.config.logger.debug "API called: GroupApi#create_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
157
157
|
end
|
158
158
|
[data, status_code, headers]
|
159
159
|
end
|
160
160
|
|
161
|
-
# Delete a specific
|
162
|
-
# @param
|
161
|
+
# Delete a specific group
|
162
|
+
# @param group_id [String] A group identifier or slug
|
163
163
|
# @param [Hash] opts the optional parameters
|
164
164
|
# @return [Notification]
|
165
|
-
def
|
166
|
-
data, _status_code, _headers =
|
165
|
+
def delete_group(group_id, opts = {})
|
166
|
+
data, _status_code, _headers = delete_group_with_http_info(group_id, opts)
|
167
167
|
data
|
168
168
|
end
|
169
169
|
|
170
|
-
# Delete a specific
|
171
|
-
# @param
|
170
|
+
# Delete a specific group
|
171
|
+
# @param group_id [String] A group identifier or slug
|
172
172
|
# @param [Hash] opts the optional parameters
|
173
173
|
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
174
|
-
def
|
174
|
+
def delete_group_with_http_info(group_id, opts = {})
|
175
175
|
if @api_client.config.debugging
|
176
|
-
@api_client.config.logger.debug 'Calling API:
|
176
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.delete_group ...'
|
177
177
|
end
|
178
|
-
# verify the required parameter '
|
179
|
-
if @api_client.config.client_side_validation &&
|
180
|
-
raise ArgumentError, "Missing the required parameter '
|
178
|
+
# verify the required parameter 'group_id' is set
|
179
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
180
|
+
raise ArgumentError, "Missing the required parameter 'group_id' when calling GroupApi.delete_group"
|
181
181
|
end
|
182
182
|
|
183
183
|
# resource path
|
184
|
-
local_var_path = '/
|
184
|
+
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
185
185
|
|
186
186
|
# query parameters
|
187
187
|
query_params = opts[:query_params] || {}
|
@@ -201,10 +201,10 @@ 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
|
-
operation: :'
|
207
|
+
operation: :'GroupApi.delete_group',
|
208
208
|
header_params: header_params,
|
209
209
|
query_params: query_params,
|
210
210
|
form_params: form_params,
|
@@ -215,41 +215,41 @@ module Gopad
|
|
215
215
|
|
216
216
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
217
217
|
if @api_client.config.debugging
|
218
|
-
@api_client.config.logger.debug "API called:
|
218
|
+
@api_client.config.logger.debug "API called: GroupApi#delete_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
219
219
|
end
|
220
220
|
[data, status_code, headers]
|
221
221
|
end
|
222
222
|
|
223
|
-
# Unlink a user from
|
224
|
-
# @param
|
225
|
-
# @param
|
223
|
+
# Unlink a user from group
|
224
|
+
# @param group_id [String] A group identifier or slug
|
225
|
+
# @param delete_group_from_user_request [DeleteGroupFromUserRequest] The group user 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_group_from_user(group_id, delete_group_from_user_request, opts = {})
|
229
|
+
data, _status_code, _headers = delete_group_from_user_with_http_info(group_id, delete_group_from_user_request, opts)
|
230
230
|
data
|
231
231
|
end
|
232
232
|
|
233
|
-
# Unlink a user from
|
234
|
-
# @param
|
235
|
-
# @param
|
233
|
+
# Unlink a user from group
|
234
|
+
# @param group_id [String] A group identifier or slug
|
235
|
+
# @param delete_group_from_user_request [DeleteGroupFromUserRequest] The group user 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_group_from_user_with_http_info(group_id, delete_group_from_user_request, opts = {})
|
239
239
|
if @api_client.config.debugging
|
240
|
-
@api_client.config.logger.debug 'Calling API:
|
240
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.delete_group_from_user ...'
|
241
241
|
end
|
242
|
-
# verify the required parameter '
|
243
|
-
if @api_client.config.client_side_validation &&
|
244
|
-
raise ArgumentError, "Missing the required parameter '
|
242
|
+
# verify the required parameter 'group_id' is set
|
243
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
244
|
+
raise ArgumentError, "Missing the required parameter 'group_id' when calling GroupApi.delete_group_from_user"
|
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_group_from_user_request' is set
|
247
|
+
if @api_client.config.client_side_validation && delete_group_from_user_request.nil?
|
248
|
+
raise ArgumentError, "Missing the required parameter 'delete_group_from_user_request' when calling GroupApi.delete_group_from_user"
|
249
249
|
end
|
250
250
|
|
251
251
|
# resource path
|
252
|
-
local_var_path = '/
|
252
|
+
local_var_path = '/groups/{group_id}/users'.sub('{' + 'group_id' + '}', CGI.escape(group_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_group_from_user_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: :'
|
280
|
+
operation: :'GroupApi.delete_group_from_user',
|
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:
|
291
|
+
@api_client.config.logger.debug "API called: GroupApi#delete_group_from_user\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 users attached to
|
297
|
-
# @param
|
296
|
+
# Fetch all users attached to group
|
297
|
+
# @param group_id [String] A group 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
302
|
# @option opts [Integer] :limit Paging limit (default to 100)
|
303
303
|
# @option opts [Integer] :offset Paging offset (default to 0)
|
304
|
-
# @return [
|
305
|
-
def
|
306
|
-
data, _status_code, _headers =
|
304
|
+
# @return [ListGroupUsers200Response]
|
305
|
+
def list_group_users(group_id, opts = {})
|
306
|
+
data, _status_code, _headers = list_group_users_with_http_info(group_id, opts)
|
307
307
|
data
|
308
308
|
end
|
309
309
|
|
310
|
-
# Fetch all users attached to
|
311
|
-
# @param
|
310
|
+
# Fetch all users attached to group
|
311
|
+
# @param group_id [String] A group 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
316
|
# @option opts [Integer] :limit Paging limit (default to 100)
|
317
317
|
# @option opts [Integer] :offset Paging offset (default to 0)
|
318
|
-
# @return [Array<(
|
319
|
-
def
|
318
|
+
# @return [Array<(ListGroupUsers200Response, Integer, Hash)>] ListGroupUsers200Response data, response status code and response headers
|
319
|
+
def list_group_users_with_http_info(group_id, opts = {})
|
320
320
|
if @api_client.config.debugging
|
321
|
-
@api_client.config.logger.debug 'Calling API:
|
321
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.list_group_users ...'
|
322
322
|
end
|
323
|
-
# verify the required parameter '
|
324
|
-
if @api_client.config.client_side_validation &&
|
325
|
-
raise ArgumentError, "Missing the required parameter '
|
326
|
-
end
|
327
|
-
|
328
|
-
allowable_values = %w[username email fullname admin active]
|
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}"
|
323
|
+
# verify the required parameter 'group_id' is set
|
324
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
325
|
+
raise ArgumentError, "Missing the required parameter 'group_id' when calling GroupApi.list_group_users"
|
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 = '/
|
334
|
+
local_var_path = '/groups/{group_id}/users'.sub('{' + 'group_id' + '}', CGI.escape(group_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] || 'ListGroupUsers200Response'
|
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: :'
|
362
|
+
operation: :'GroupApi.list_group_users',
|
368
363
|
header_params: header_params,
|
369
364
|
query_params: query_params,
|
370
365
|
form_params: form_params,
|
@@ -375,48 +370,43 @@ 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:
|
373
|
+
@api_client.config.logger.debug "API called: GroupApi#list_group_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
379
374
|
end
|
380
375
|
[data, status_code, headers]
|
381
376
|
end
|
382
377
|
|
383
|
-
# Fetch all available
|
378
|
+
# Fetch all available groups
|
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 [
|
391
|
-
def
|
392
|
-
data, _status_code, _headers =
|
385
|
+
# @return [ListGroups200Response]
|
386
|
+
def list_groups(opts = {})
|
387
|
+
data, _status_code, _headers = list_groups_with_http_info(opts)
|
393
388
|
data
|
394
389
|
end
|
395
390
|
|
396
|
-
# Fetch all available
|
391
|
+
# Fetch all available groups
|
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<(
|
404
|
-
def
|
398
|
+
# @return [Array<(ListGroups200Response, Integer, Hash)>] ListGroups200Response data, response status code and response headers
|
399
|
+
def list_groups_with_http_info(opts = {})
|
405
400
|
if @api_client.config.debugging
|
406
|
-
@api_client.config.logger.debug 'Calling API:
|
401
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.list_groups ...'
|
407
402
|
end
|
408
|
-
allowable_values = %w[slug name]
|
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}"
|
416
406
|
end
|
417
407
|
|
418
408
|
# resource path
|
419
|
-
local_var_path = '/
|
409
|
+
local_var_path = '/groups'
|
420
410
|
|
421
411
|
# query parameters
|
422
412
|
query_params = opts[:query_params] || {}
|
@@ -438,13 +428,13 @@ 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] || 'ListGroups200Response'
|
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
|
-
operation: :'
|
437
|
+
operation: :'GroupApi.list_groups',
|
448
438
|
header_params: header_params,
|
449
439
|
query_params: query_params,
|
450
440
|
form_params: form_params,
|
@@ -455,41 +445,41 @@ module Gopad
|
|
455
445
|
|
456
446
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
457
447
|
if @api_client.config.debugging
|
458
|
-
@api_client.config.logger.debug "API called:
|
448
|
+
@api_client.config.logger.debug "API called: GroupApi#list_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
459
449
|
end
|
460
450
|
[data, status_code, headers]
|
461
451
|
end
|
462
452
|
|
463
|
-
# Update user perms for
|
464
|
-
# @param
|
465
|
-
# @param
|
453
|
+
# Update user perms for group
|
454
|
+
# @param group_id [String] A group identifier or slug
|
455
|
+
# @param permit_group_user_request [PermitGroupUserRequest] The group user 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_group_user(group_id, permit_group_user_request, opts = {})
|
459
|
+
data, _status_code, _headers = permit_group_user_with_http_info(group_id, permit_group_user_request, opts)
|
470
460
|
data
|
471
461
|
end
|
472
462
|
|
473
|
-
# Update user perms for
|
474
|
-
# @param
|
475
|
-
# @param
|
463
|
+
# Update user perms for group
|
464
|
+
# @param group_id [String] A group identifier or slug
|
465
|
+
# @param permit_group_user_request [PermitGroupUserRequest] The group user 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_group_user_with_http_info(group_id, permit_group_user_request, opts = {})
|
479
469
|
if @api_client.config.debugging
|
480
|
-
@api_client.config.logger.debug 'Calling API:
|
470
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.permit_group_user ...'
|
481
471
|
end
|
482
|
-
# verify the required parameter '
|
483
|
-
if @api_client.config.client_side_validation &&
|
484
|
-
raise ArgumentError, "Missing the required parameter '
|
472
|
+
# verify the required parameter 'group_id' is set
|
473
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
474
|
+
raise ArgumentError, "Missing the required parameter 'group_id' when calling GroupApi.permit_group_user"
|
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_group_user_request' is set
|
477
|
+
if @api_client.config.client_side_validation && permit_group_user_request.nil?
|
478
|
+
raise ArgumentError, "Missing the required parameter 'permit_group_user_request' when calling GroupApi.permit_group_user"
|
489
479
|
end
|
490
480
|
|
491
481
|
# resource path
|
492
|
-
local_var_path = '/
|
482
|
+
local_var_path = '/groups/{group_id}/users'.sub('{' + 'group_id' + '}', CGI.escape(group_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_group_user_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: :'
|
510
|
+
operation: :'GroupApi.permit_group_user',
|
521
511
|
header_params: header_params,
|
522
512
|
query_params: query_params,
|
523
513
|
form_params: form_params,
|
@@ -528,35 +518,35 @@ 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:
|
521
|
+
@api_client.config.logger.debug "API called: GroupApi#permit_group_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
532
522
|
end
|
533
523
|
[data, status_code, headers]
|
534
524
|
end
|
535
525
|
|
536
|
-
# Fetch a specific
|
537
|
-
# @param
|
526
|
+
# Fetch a specific group
|
527
|
+
# @param group_id [String] A group identifier or slug
|
538
528
|
# @param [Hash] opts the optional parameters
|
539
|
-
# @return [
|
540
|
-
def
|
541
|
-
data, _status_code, _headers =
|
529
|
+
# @return [Group]
|
530
|
+
def show_group(group_id, opts = {})
|
531
|
+
data, _status_code, _headers = show_group_with_http_info(group_id, opts)
|
542
532
|
data
|
543
533
|
end
|
544
534
|
|
545
|
-
# Fetch a specific
|
546
|
-
# @param
|
535
|
+
# Fetch a specific group
|
536
|
+
# @param group_id [String] A group identifier or slug
|
547
537
|
# @param [Hash] opts the optional parameters
|
548
|
-
# @return [Array<(
|
549
|
-
def
|
538
|
+
# @return [Array<(Group, Integer, Hash)>] Group data, response status code and response headers
|
539
|
+
def show_group_with_http_info(group_id, opts = {})
|
550
540
|
if @api_client.config.debugging
|
551
|
-
@api_client.config.logger.debug 'Calling API:
|
541
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.show_group ...'
|
552
542
|
end
|
553
|
-
# verify the required parameter '
|
554
|
-
if @api_client.config.client_side_validation &&
|
555
|
-
raise ArgumentError, "Missing the required parameter '
|
543
|
+
# verify the required parameter 'group_id' is set
|
544
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
545
|
+
raise ArgumentError, "Missing the required parameter 'group_id' when calling GroupApi.show_group"
|
556
546
|
end
|
557
547
|
|
558
548
|
# resource path
|
559
|
-
local_var_path = '/
|
549
|
+
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
560
550
|
|
561
551
|
# query parameters
|
562
552
|
query_params = opts[:query_params] || {}
|
@@ -573,13 +563,13 @@ module Gopad
|
|
573
563
|
post_body = opts[:debug_body]
|
574
564
|
|
575
565
|
# return_type
|
576
|
-
return_type = opts[:debug_return_type] || '
|
566
|
+
return_type = opts[:debug_return_type] || 'Group'
|
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
|
-
operation: :'
|
572
|
+
operation: :'GroupApi.show_group',
|
583
573
|
header_params: header_params,
|
584
574
|
query_params: query_params,
|
585
575
|
form_params: form_params,
|
@@ -590,41 +580,41 @@ module Gopad
|
|
590
580
|
|
591
581
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
592
582
|
if @api_client.config.debugging
|
593
|
-
@api_client.config.logger.debug "API called:
|
583
|
+
@api_client.config.logger.debug "API called: GroupApi#show_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
594
584
|
end
|
595
585
|
[data, status_code, headers]
|
596
586
|
end
|
597
587
|
|
598
|
-
# Update a specific
|
599
|
-
# @param
|
600
|
-
# @param
|
588
|
+
# Update a specific group
|
589
|
+
# @param group_id [String] A group identifier or slug
|
590
|
+
# @param create_group_request [CreateGroupRequest] The group data to update
|
601
591
|
# @param [Hash] opts the optional parameters
|
602
|
-
# @return [
|
603
|
-
def
|
604
|
-
data, _status_code, _headers =
|
592
|
+
# @return [Group]
|
593
|
+
def update_group(group_id, create_group_request, opts = {})
|
594
|
+
data, _status_code, _headers = update_group_with_http_info(group_id, create_group_request, opts)
|
605
595
|
data
|
606
596
|
end
|
607
597
|
|
608
|
-
# Update a specific
|
609
|
-
# @param
|
610
|
-
# @param
|
598
|
+
# Update a specific group
|
599
|
+
# @param group_id [String] A group identifier or slug
|
600
|
+
# @param create_group_request [CreateGroupRequest] The group data to update
|
611
601
|
# @param [Hash] opts the optional parameters
|
612
|
-
# @return [Array<(
|
613
|
-
def
|
602
|
+
# @return [Array<(Group, Integer, Hash)>] Group data, response status code and response headers
|
603
|
+
def update_group_with_http_info(group_id, create_group_request, opts = {})
|
614
604
|
if @api_client.config.debugging
|
615
|
-
@api_client.config.logger.debug 'Calling API:
|
605
|
+
@api_client.config.logger.debug 'Calling API: GroupApi.update_group ...'
|
616
606
|
end
|
617
|
-
# verify the required parameter '
|
618
|
-
if @api_client.config.client_side_validation &&
|
619
|
-
raise ArgumentError, "Missing the required parameter '
|
607
|
+
# verify the required parameter 'group_id' is set
|
608
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
609
|
+
raise ArgumentError, "Missing the required parameter 'group_id' when calling GroupApi.update_group"
|
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 'create_group_request' is set
|
612
|
+
if @api_client.config.client_side_validation && create_group_request.nil?
|
613
|
+
raise ArgumentError, "Missing the required parameter 'create_group_request' when calling GroupApi.update_group"
|
624
614
|
end
|
625
615
|
|
626
616
|
# resource path
|
627
|
-
local_var_path = '/
|
617
|
+
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
628
618
|
|
629
619
|
# query parameters
|
630
620
|
query_params = opts[:query_params] || {}
|
@@ -643,16 +633,16 @@ 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(create_group_request)
|
647
637
|
|
648
638
|
# return_type
|
649
|
-
return_type = opts[:debug_return_type] || '
|
639
|
+
return_type = opts[:debug_return_type] || 'Group'
|
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
|
-
operation: :'
|
645
|
+
operation: :'GroupApi.update_group',
|
656
646
|
header_params: header_params,
|
657
647
|
query_params: query_params,
|
658
648
|
form_params: form_params,
|
@@ -663,7 +653,7 @@ module Gopad
|
|
663
653
|
|
664
654
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
665
655
|
if @api_client.config.debugging
|
666
|
-
@api_client.config.logger.debug "API called:
|
656
|
+
@api_client.config.logger.debug "API called: GroupApi#update_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
667
657
|
end
|
668
658
|
[data, status_code, headers]
|
669
659
|
end
|