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