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,1603 @@
|
|
|
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 ModApi
|
|
15
|
+
attr_accessor :api_client
|
|
16
|
+
|
|
17
|
+
def initialize(api_client = ApiClient.default)
|
|
18
|
+
@api_client = api_client
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Attach a team to mod
|
|
22
|
+
# @param mod_id [String] A mod identifier or slug
|
|
23
|
+
# @param mod_team_params [ModTeamParams] The team data to attach
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [Notification]
|
|
26
|
+
def attach_mod_to_team(mod_id, mod_team_params, opts = {})
|
|
27
|
+
data, _status_code, _headers = attach_mod_to_team_with_http_info(mod_id, mod_team_params, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Attach a team to mod
|
|
32
|
+
# @param mod_id [String] A mod identifier or slug
|
|
33
|
+
# @param mod_team_params [ModTeamParams] The team 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_mod_to_team_with_http_info(mod_id, mod_team_params, opts = {})
|
|
37
|
+
if @api_client.config.debugging
|
|
38
|
+
@api_client.config.logger.debug 'Calling API: ModApi.attach_mod_to_team ...'
|
|
39
|
+
end
|
|
40
|
+
# verify the required parameter 'mod_id' is set
|
|
41
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
42
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.attach_mod_to_team"
|
|
43
|
+
end
|
|
44
|
+
# verify the required parameter 'mod_team_params' is set
|
|
45
|
+
if @api_client.config.client_side_validation && mod_team_params.nil?
|
|
46
|
+
raise ArgumentError, "Missing the required parameter 'mod_team_params' when calling ModApi.attach_mod_to_team"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/mods/{mod_id}/teams'.sub('{' + 'mod_id' + '}', CGI.escape(mod_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(mod_team_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: :'ModApi.attach_mod_to_team',
|
|
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: ModApi#attach_mod_to_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
90
|
+
end
|
|
91
|
+
[data, status_code, headers]
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Attach a user to mod
|
|
95
|
+
# @param mod_id [String] A mod identifier or slug
|
|
96
|
+
# @param mod_user_params [ModUserParams] The user data to attach
|
|
97
|
+
# @param [Hash] opts the optional parameters
|
|
98
|
+
# @return [Notification]
|
|
99
|
+
def attach_mod_to_user(mod_id, mod_user_params, opts = {})
|
|
100
|
+
data, _status_code, _headers = attach_mod_to_user_with_http_info(mod_id, mod_user_params, opts)
|
|
101
|
+
data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Attach a user to mod
|
|
105
|
+
# @param mod_id [String] A mod identifier or slug
|
|
106
|
+
# @param mod_user_params [ModUserParams] The user 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_mod_to_user_with_http_info(mod_id, mod_user_params, opts = {})
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: ModApi.attach_mod_to_user ...'
|
|
112
|
+
end
|
|
113
|
+
# verify the required parameter 'mod_id' is set
|
|
114
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
115
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.attach_mod_to_user"
|
|
116
|
+
end
|
|
117
|
+
# verify the required parameter 'mod_user_params' is set
|
|
118
|
+
if @api_client.config.client_side_validation && mod_user_params.nil?
|
|
119
|
+
raise ArgumentError, "Missing the required parameter 'mod_user_params' when calling ModApi.attach_mod_to_user"
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# resource path
|
|
123
|
+
local_var_path = '/mods/{mod_id}/users'.sub('{' + 'mod_id' + '}', CGI.escape(mod_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(mod_user_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: :'ModApi.attach_mod_to_user',
|
|
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: ModApi#attach_mod_to_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
163
|
+
end
|
|
164
|
+
[data, status_code, headers]
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Attach a build to a version
|
|
168
|
+
# @param mod_id [String] A mod identifier or slug
|
|
169
|
+
# @param version_id [String] A version identifier or slug
|
|
170
|
+
# @param version_build_params [VersionBuildParams] The version build data to attach
|
|
171
|
+
# @param [Hash] opts the optional parameters
|
|
172
|
+
# @return [Notification]
|
|
173
|
+
def attach_version_to_build(mod_id, version_id, version_build_params, opts = {})
|
|
174
|
+
data, _status_code, _headers = attach_version_to_build_with_http_info(mod_id, version_id, version_build_params, opts)
|
|
175
|
+
data
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Attach a build to a version
|
|
179
|
+
# @param mod_id [String] A mod identifier or slug
|
|
180
|
+
# @param version_id [String] A version identifier or slug
|
|
181
|
+
# @param version_build_params [VersionBuildParams] The version build data to attach
|
|
182
|
+
# @param [Hash] opts the optional parameters
|
|
183
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
184
|
+
def attach_version_to_build_with_http_info(mod_id, version_id, version_build_params, opts = {})
|
|
185
|
+
if @api_client.config.debugging
|
|
186
|
+
@api_client.config.logger.debug 'Calling API: ModApi.attach_version_to_build ...'
|
|
187
|
+
end
|
|
188
|
+
# verify the required parameter 'mod_id' is set
|
|
189
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
190
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.attach_version_to_build"
|
|
191
|
+
end
|
|
192
|
+
# verify the required parameter 'version_id' is set
|
|
193
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
194
|
+
raise ArgumentError, "Missing the required parameter 'version_id' when calling ModApi.attach_version_to_build"
|
|
195
|
+
end
|
|
196
|
+
# verify the required parameter 'version_build_params' is set
|
|
197
|
+
if @api_client.config.client_side_validation && version_build_params.nil?
|
|
198
|
+
raise ArgumentError, "Missing the required parameter 'version_build_params' when calling ModApi.attach_version_to_build"
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# resource path
|
|
202
|
+
local_var_path = '/mods/{mod_id}/versions/{version_id}/builds'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
|
203
|
+
|
|
204
|
+
# query parameters
|
|
205
|
+
query_params = opts[:query_params] || {}
|
|
206
|
+
|
|
207
|
+
# header parameters
|
|
208
|
+
header_params = opts[:header_params] || {}
|
|
209
|
+
# HTTP header 'Accept' (if needed)
|
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
211
|
+
# HTTP header 'Content-Type'
|
|
212
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
213
|
+
unless content_type.nil?
|
|
214
|
+
header_params['Content-Type'] = content_type
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# form parameters
|
|
218
|
+
form_params = opts[:form_params] || {}
|
|
219
|
+
|
|
220
|
+
# http body (model)
|
|
221
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(version_build_params)
|
|
222
|
+
|
|
223
|
+
# return_type
|
|
224
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
225
|
+
|
|
226
|
+
# auth_names
|
|
227
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
228
|
+
|
|
229
|
+
new_options = opts.merge(
|
|
230
|
+
operation: :'ModApi.attach_version_to_build',
|
|
231
|
+
header_params: header_params,
|
|
232
|
+
query_params: query_params,
|
|
233
|
+
form_params: form_params,
|
|
234
|
+
body: post_body,
|
|
235
|
+
auth_names: auth_names,
|
|
236
|
+
return_type: return_type
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
240
|
+
if @api_client.config.debugging
|
|
241
|
+
@api_client.config.logger.debug "API called: ModApi#attach_version_to_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
242
|
+
end
|
|
243
|
+
[data, status_code, headers]
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Create a new mod
|
|
247
|
+
# @param mod [Mod] The mod data to create
|
|
248
|
+
# @param [Hash] opts the optional parameters
|
|
249
|
+
# @return [User]
|
|
250
|
+
def create_mod(mod, opts = {})
|
|
251
|
+
data, _status_code, _headers = create_mod_with_http_info(mod, opts)
|
|
252
|
+
data
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Create a new mod
|
|
256
|
+
# @param mod [Mod] The mod data to create
|
|
257
|
+
# @param [Hash] opts the optional parameters
|
|
258
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
|
259
|
+
def create_mod_with_http_info(mod, opts = {})
|
|
260
|
+
if @api_client.config.debugging
|
|
261
|
+
@api_client.config.logger.debug 'Calling API: ModApi.create_mod ...'
|
|
262
|
+
end
|
|
263
|
+
# verify the required parameter 'mod' is set
|
|
264
|
+
if @api_client.config.client_side_validation && mod.nil?
|
|
265
|
+
raise ArgumentError, "Missing the required parameter 'mod' when calling ModApi.create_mod"
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# resource path
|
|
269
|
+
local_var_path = '/mods'
|
|
270
|
+
|
|
271
|
+
# query parameters
|
|
272
|
+
query_params = opts[:query_params] || {}
|
|
273
|
+
|
|
274
|
+
# header parameters
|
|
275
|
+
header_params = opts[:header_params] || {}
|
|
276
|
+
# HTTP header 'Accept' (if needed)
|
|
277
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
278
|
+
# HTTP header 'Content-Type'
|
|
279
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
280
|
+
unless content_type.nil?
|
|
281
|
+
header_params['Content-Type'] = content_type
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# form parameters
|
|
285
|
+
form_params = opts[:form_params] || {}
|
|
286
|
+
|
|
287
|
+
# http body (model)
|
|
288
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(mod)
|
|
289
|
+
|
|
290
|
+
# return_type
|
|
291
|
+
return_type = opts[:debug_return_type] || 'User'
|
|
292
|
+
|
|
293
|
+
# auth_names
|
|
294
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
295
|
+
|
|
296
|
+
new_options = opts.merge(
|
|
297
|
+
operation: :'ModApi.create_mod',
|
|
298
|
+
header_params: header_params,
|
|
299
|
+
query_params: query_params,
|
|
300
|
+
form_params: form_params,
|
|
301
|
+
body: post_body,
|
|
302
|
+
auth_names: auth_names,
|
|
303
|
+
return_type: return_type
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
307
|
+
if @api_client.config.debugging
|
|
308
|
+
@api_client.config.logger.debug "API called: ModApi#create_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
309
|
+
end
|
|
310
|
+
[data, status_code, headers]
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Create a new version for a mod
|
|
314
|
+
# @param mod_id [String] A mod identifier or slug
|
|
315
|
+
# @param version [Version] The version data to create
|
|
316
|
+
# @param [Hash] opts the optional parameters
|
|
317
|
+
# @return [Version]
|
|
318
|
+
def create_version(mod_id, version, opts = {})
|
|
319
|
+
data, _status_code, _headers = create_version_with_http_info(mod_id, version, opts)
|
|
320
|
+
data
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Create a new version for a mod
|
|
324
|
+
# @param mod_id [String] A mod identifier or slug
|
|
325
|
+
# @param version [Version] The version data to create
|
|
326
|
+
# @param [Hash] opts the optional parameters
|
|
327
|
+
# @return [Array<(Version, Integer, Hash)>] Version data, response status code and response headers
|
|
328
|
+
def create_version_with_http_info(mod_id, version, opts = {})
|
|
329
|
+
if @api_client.config.debugging
|
|
330
|
+
@api_client.config.logger.debug 'Calling API: ModApi.create_version ...'
|
|
331
|
+
end
|
|
332
|
+
# verify the required parameter 'mod_id' is set
|
|
333
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
334
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.create_version"
|
|
335
|
+
end
|
|
336
|
+
# verify the required parameter 'version' is set
|
|
337
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
338
|
+
raise ArgumentError, "Missing the required parameter 'version' when calling ModApi.create_version"
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# resource path
|
|
342
|
+
local_var_path = '/mods/{mod_id}/versions'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
343
|
+
|
|
344
|
+
# query parameters
|
|
345
|
+
query_params = opts[:query_params] || {}
|
|
346
|
+
|
|
347
|
+
# header parameters
|
|
348
|
+
header_params = opts[:header_params] || {}
|
|
349
|
+
# HTTP header 'Accept' (if needed)
|
|
350
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
351
|
+
# HTTP header 'Content-Type'
|
|
352
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
353
|
+
unless content_type.nil?
|
|
354
|
+
header_params['Content-Type'] = content_type
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# form parameters
|
|
358
|
+
form_params = opts[:form_params] || {}
|
|
359
|
+
|
|
360
|
+
# http body (model)
|
|
361
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(version)
|
|
362
|
+
|
|
363
|
+
# return_type
|
|
364
|
+
return_type = opts[:debug_return_type] || 'Version'
|
|
365
|
+
|
|
366
|
+
# auth_names
|
|
367
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
368
|
+
|
|
369
|
+
new_options = opts.merge(
|
|
370
|
+
operation: :'ModApi.create_version',
|
|
371
|
+
header_params: header_params,
|
|
372
|
+
query_params: query_params,
|
|
373
|
+
form_params: form_params,
|
|
374
|
+
body: post_body,
|
|
375
|
+
auth_names: auth_names,
|
|
376
|
+
return_type: return_type
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
380
|
+
if @api_client.config.debugging
|
|
381
|
+
@api_client.config.logger.debug "API called: ModApi#create_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
382
|
+
end
|
|
383
|
+
[data, status_code, headers]
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Delete a specific mod
|
|
387
|
+
# @param mod_id [String] A mod identifier or slug
|
|
388
|
+
# @param [Hash] opts the optional parameters
|
|
389
|
+
# @return [Notification]
|
|
390
|
+
def delete_mod(mod_id, opts = {})
|
|
391
|
+
data, _status_code, _headers = delete_mod_with_http_info(mod_id, opts)
|
|
392
|
+
data
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# Delete a specific mod
|
|
396
|
+
# @param mod_id [String] A mod identifier or slug
|
|
397
|
+
# @param [Hash] opts the optional parameters
|
|
398
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
399
|
+
def delete_mod_with_http_info(mod_id, opts = {})
|
|
400
|
+
if @api_client.config.debugging
|
|
401
|
+
@api_client.config.logger.debug 'Calling API: ModApi.delete_mod ...'
|
|
402
|
+
end
|
|
403
|
+
# verify the required parameter 'mod_id' is set
|
|
404
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
405
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.delete_mod"
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
# resource path
|
|
409
|
+
local_var_path = '/mods/{mod_id}'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
410
|
+
|
|
411
|
+
# query parameters
|
|
412
|
+
query_params = opts[:query_params] || {}
|
|
413
|
+
|
|
414
|
+
# header parameters
|
|
415
|
+
header_params = opts[:header_params] || {}
|
|
416
|
+
# HTTP header 'Accept' (if needed)
|
|
417
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
418
|
+
|
|
419
|
+
# form parameters
|
|
420
|
+
form_params = opts[:form_params] || {}
|
|
421
|
+
|
|
422
|
+
# http body (model)
|
|
423
|
+
post_body = opts[:debug_body]
|
|
424
|
+
|
|
425
|
+
# return_type
|
|
426
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
427
|
+
|
|
428
|
+
# auth_names
|
|
429
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
430
|
+
|
|
431
|
+
new_options = opts.merge(
|
|
432
|
+
operation: :'ModApi.delete_mod',
|
|
433
|
+
header_params: header_params,
|
|
434
|
+
query_params: query_params,
|
|
435
|
+
form_params: form_params,
|
|
436
|
+
body: post_body,
|
|
437
|
+
auth_names: auth_names,
|
|
438
|
+
return_type: return_type
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
442
|
+
if @api_client.config.debugging
|
|
443
|
+
@api_client.config.logger.debug "API called: ModApi#delete_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
444
|
+
end
|
|
445
|
+
[data, status_code, headers]
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
# Unlink a team from mod
|
|
449
|
+
# @param mod_id [String] A mod identifier or slug
|
|
450
|
+
# @param mod_team_params [ModTeamParams] The mod team data to unlink
|
|
451
|
+
# @param [Hash] opts the optional parameters
|
|
452
|
+
# @return [Notification]
|
|
453
|
+
def delete_mod_from_team(mod_id, mod_team_params, opts = {})
|
|
454
|
+
data, _status_code, _headers = delete_mod_from_team_with_http_info(mod_id, mod_team_params, opts)
|
|
455
|
+
data
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
# Unlink a team from mod
|
|
459
|
+
# @param mod_id [String] A mod identifier or slug
|
|
460
|
+
# @param mod_team_params [ModTeamParams] The mod team data to unlink
|
|
461
|
+
# @param [Hash] opts the optional parameters
|
|
462
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
463
|
+
def delete_mod_from_team_with_http_info(mod_id, mod_team_params, opts = {})
|
|
464
|
+
if @api_client.config.debugging
|
|
465
|
+
@api_client.config.logger.debug 'Calling API: ModApi.delete_mod_from_team ...'
|
|
466
|
+
end
|
|
467
|
+
# verify the required parameter 'mod_id' is set
|
|
468
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
469
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.delete_mod_from_team"
|
|
470
|
+
end
|
|
471
|
+
# verify the required parameter 'mod_team_params' is set
|
|
472
|
+
if @api_client.config.client_side_validation && mod_team_params.nil?
|
|
473
|
+
raise ArgumentError, "Missing the required parameter 'mod_team_params' when calling ModApi.delete_mod_from_team"
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
# resource path
|
|
477
|
+
local_var_path = '/mods/{mod_id}/teams'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
478
|
+
|
|
479
|
+
# query parameters
|
|
480
|
+
query_params = opts[:query_params] || {}
|
|
481
|
+
|
|
482
|
+
# header parameters
|
|
483
|
+
header_params = opts[:header_params] || {}
|
|
484
|
+
# HTTP header 'Accept' (if needed)
|
|
485
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
486
|
+
# HTTP header 'Content-Type'
|
|
487
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
488
|
+
unless content_type.nil?
|
|
489
|
+
header_params['Content-Type'] = content_type
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# form parameters
|
|
493
|
+
form_params = opts[:form_params] || {}
|
|
494
|
+
|
|
495
|
+
# http body (model)
|
|
496
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(mod_team_params)
|
|
497
|
+
|
|
498
|
+
# return_type
|
|
499
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
500
|
+
|
|
501
|
+
# auth_names
|
|
502
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
503
|
+
|
|
504
|
+
new_options = opts.merge(
|
|
505
|
+
operation: :'ModApi.delete_mod_from_team',
|
|
506
|
+
header_params: header_params,
|
|
507
|
+
query_params: query_params,
|
|
508
|
+
form_params: form_params,
|
|
509
|
+
body: post_body,
|
|
510
|
+
auth_names: auth_names,
|
|
511
|
+
return_type: return_type
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
515
|
+
if @api_client.config.debugging
|
|
516
|
+
@api_client.config.logger.debug "API called: ModApi#delete_mod_from_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
517
|
+
end
|
|
518
|
+
[data, status_code, headers]
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
# Unlink a user from mod
|
|
522
|
+
# @param mod_id [String] A mod identifier or slug
|
|
523
|
+
# @param mod_user_params [ModUserParams] The mod user data to unlink
|
|
524
|
+
# @param [Hash] opts the optional parameters
|
|
525
|
+
# @return [Notification]
|
|
526
|
+
def delete_mod_from_user(mod_id, mod_user_params, opts = {})
|
|
527
|
+
data, _status_code, _headers = delete_mod_from_user_with_http_info(mod_id, mod_user_params, opts)
|
|
528
|
+
data
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# Unlink a user from mod
|
|
532
|
+
# @param mod_id [String] A mod identifier or slug
|
|
533
|
+
# @param mod_user_params [ModUserParams] The mod user data to unlink
|
|
534
|
+
# @param [Hash] opts the optional parameters
|
|
535
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
536
|
+
def delete_mod_from_user_with_http_info(mod_id, mod_user_params, opts = {})
|
|
537
|
+
if @api_client.config.debugging
|
|
538
|
+
@api_client.config.logger.debug 'Calling API: ModApi.delete_mod_from_user ...'
|
|
539
|
+
end
|
|
540
|
+
# verify the required parameter 'mod_id' is set
|
|
541
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
542
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.delete_mod_from_user"
|
|
543
|
+
end
|
|
544
|
+
# verify the required parameter 'mod_user_params' is set
|
|
545
|
+
if @api_client.config.client_side_validation && mod_user_params.nil?
|
|
546
|
+
raise ArgumentError, "Missing the required parameter 'mod_user_params' when calling ModApi.delete_mod_from_user"
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
# resource path
|
|
550
|
+
local_var_path = '/mods/{mod_id}/users'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
551
|
+
|
|
552
|
+
# query parameters
|
|
553
|
+
query_params = opts[:query_params] || {}
|
|
554
|
+
|
|
555
|
+
# header parameters
|
|
556
|
+
header_params = opts[:header_params] || {}
|
|
557
|
+
# HTTP header 'Accept' (if needed)
|
|
558
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
559
|
+
# HTTP header 'Content-Type'
|
|
560
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
561
|
+
unless content_type.nil?
|
|
562
|
+
header_params['Content-Type'] = content_type
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
# form parameters
|
|
566
|
+
form_params = opts[:form_params] || {}
|
|
567
|
+
|
|
568
|
+
# http body (model)
|
|
569
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(mod_user_params)
|
|
570
|
+
|
|
571
|
+
# return_type
|
|
572
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
573
|
+
|
|
574
|
+
# auth_names
|
|
575
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
576
|
+
|
|
577
|
+
new_options = opts.merge(
|
|
578
|
+
operation: :'ModApi.delete_mod_from_user',
|
|
579
|
+
header_params: header_params,
|
|
580
|
+
query_params: query_params,
|
|
581
|
+
form_params: form_params,
|
|
582
|
+
body: post_body,
|
|
583
|
+
auth_names: auth_names,
|
|
584
|
+
return_type: return_type
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
588
|
+
if @api_client.config.debugging
|
|
589
|
+
@api_client.config.logger.debug "API called: ModApi#delete_mod_from_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
590
|
+
end
|
|
591
|
+
[data, status_code, headers]
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Delete a specific version for a mod
|
|
595
|
+
# @param mod_id [String] A mod identifier or slug
|
|
596
|
+
# @param version_id [String] A version identifier or slug
|
|
597
|
+
# @param [Hash] opts the optional parameters
|
|
598
|
+
# @return [Notification]
|
|
599
|
+
def delete_version(mod_id, version_id, opts = {})
|
|
600
|
+
data, _status_code, _headers = delete_version_with_http_info(mod_id, version_id, opts)
|
|
601
|
+
data
|
|
602
|
+
end
|
|
603
|
+
|
|
604
|
+
# Delete a specific version for a mod
|
|
605
|
+
# @param mod_id [String] A mod identifier or slug
|
|
606
|
+
# @param version_id [String] A version identifier or slug
|
|
607
|
+
# @param [Hash] opts the optional parameters
|
|
608
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
609
|
+
def delete_version_with_http_info(mod_id, version_id, opts = {})
|
|
610
|
+
if @api_client.config.debugging
|
|
611
|
+
@api_client.config.logger.debug 'Calling API: ModApi.delete_version ...'
|
|
612
|
+
end
|
|
613
|
+
# verify the required parameter 'mod_id' is set
|
|
614
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
615
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.delete_version"
|
|
616
|
+
end
|
|
617
|
+
# verify the required parameter 'version_id' is set
|
|
618
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
619
|
+
raise ArgumentError, "Missing the required parameter 'version_id' when calling ModApi.delete_version"
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
# resource path
|
|
623
|
+
local_var_path = '/mods/{mod_id}/versions/{version_id}'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
|
624
|
+
|
|
625
|
+
# query parameters
|
|
626
|
+
query_params = opts[:query_params] || {}
|
|
627
|
+
|
|
628
|
+
# header parameters
|
|
629
|
+
header_params = opts[:header_params] || {}
|
|
630
|
+
# HTTP header 'Accept' (if needed)
|
|
631
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
632
|
+
|
|
633
|
+
# form parameters
|
|
634
|
+
form_params = opts[:form_params] || {}
|
|
635
|
+
|
|
636
|
+
# http body (model)
|
|
637
|
+
post_body = opts[:debug_body]
|
|
638
|
+
|
|
639
|
+
# return_type
|
|
640
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
641
|
+
|
|
642
|
+
# auth_names
|
|
643
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
644
|
+
|
|
645
|
+
new_options = opts.merge(
|
|
646
|
+
operation: :'ModApi.delete_version',
|
|
647
|
+
header_params: header_params,
|
|
648
|
+
query_params: query_params,
|
|
649
|
+
form_params: form_params,
|
|
650
|
+
body: post_body,
|
|
651
|
+
auth_names: auth_names,
|
|
652
|
+
return_type: return_type
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
656
|
+
if @api_client.config.debugging
|
|
657
|
+
@api_client.config.logger.debug "API called: ModApi#delete_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
658
|
+
end
|
|
659
|
+
[data, status_code, headers]
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
# Unlink a build from a version
|
|
663
|
+
# @param mod_id [String] A mod identifier or slug
|
|
664
|
+
# @param version_id [String] A version identifier or slug
|
|
665
|
+
# @param version_build_params [VersionBuildParams] The version build data to unlink
|
|
666
|
+
# @param [Hash] opts the optional parameters
|
|
667
|
+
# @return [Notification]
|
|
668
|
+
def delete_version_from_build(mod_id, version_id, version_build_params, opts = {})
|
|
669
|
+
data, _status_code, _headers = delete_version_from_build_with_http_info(mod_id, version_id, version_build_params, opts)
|
|
670
|
+
data
|
|
671
|
+
end
|
|
672
|
+
|
|
673
|
+
# Unlink a build from a version
|
|
674
|
+
# @param mod_id [String] A mod identifier or slug
|
|
675
|
+
# @param version_id [String] A version identifier or slug
|
|
676
|
+
# @param version_build_params [VersionBuildParams] The version build data to unlink
|
|
677
|
+
# @param [Hash] opts the optional parameters
|
|
678
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
679
|
+
def delete_version_from_build_with_http_info(mod_id, version_id, version_build_params, opts = {})
|
|
680
|
+
if @api_client.config.debugging
|
|
681
|
+
@api_client.config.logger.debug 'Calling API: ModApi.delete_version_from_build ...'
|
|
682
|
+
end
|
|
683
|
+
# verify the required parameter 'mod_id' is set
|
|
684
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
685
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.delete_version_from_build"
|
|
686
|
+
end
|
|
687
|
+
# verify the required parameter 'version_id' is set
|
|
688
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
689
|
+
raise ArgumentError, "Missing the required parameter 'version_id' when calling ModApi.delete_version_from_build"
|
|
690
|
+
end
|
|
691
|
+
# verify the required parameter 'version_build_params' is set
|
|
692
|
+
if @api_client.config.client_side_validation && version_build_params.nil?
|
|
693
|
+
raise ArgumentError, "Missing the required parameter 'version_build_params' when calling ModApi.delete_version_from_build"
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
# resource path
|
|
697
|
+
local_var_path = '/mods/{mod_id}/versions/{version_id}/builds'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
|
698
|
+
|
|
699
|
+
# query parameters
|
|
700
|
+
query_params = opts[:query_params] || {}
|
|
701
|
+
|
|
702
|
+
# header parameters
|
|
703
|
+
header_params = opts[:header_params] || {}
|
|
704
|
+
# HTTP header 'Accept' (if needed)
|
|
705
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
706
|
+
# HTTP header 'Content-Type'
|
|
707
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
708
|
+
unless content_type.nil?
|
|
709
|
+
header_params['Content-Type'] = content_type
|
|
710
|
+
end
|
|
711
|
+
|
|
712
|
+
# form parameters
|
|
713
|
+
form_params = opts[:form_params] || {}
|
|
714
|
+
|
|
715
|
+
# http body (model)
|
|
716
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(version_build_params)
|
|
717
|
+
|
|
718
|
+
# return_type
|
|
719
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
720
|
+
|
|
721
|
+
# auth_names
|
|
722
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
723
|
+
|
|
724
|
+
new_options = opts.merge(
|
|
725
|
+
operation: :'ModApi.delete_version_from_build',
|
|
726
|
+
header_params: header_params,
|
|
727
|
+
query_params: query_params,
|
|
728
|
+
form_params: form_params,
|
|
729
|
+
body: post_body,
|
|
730
|
+
auth_names: auth_names,
|
|
731
|
+
return_type: return_type
|
|
732
|
+
)
|
|
733
|
+
|
|
734
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
735
|
+
if @api_client.config.debugging
|
|
736
|
+
@api_client.config.logger.debug "API called: ModApi#delete_version_from_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
737
|
+
end
|
|
738
|
+
[data, status_code, headers]
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
# Fetch all teams attached to mod
|
|
742
|
+
# @param mod_id [String] A mod identifier or slug
|
|
743
|
+
# @param [Hash] opts the optional parameters
|
|
744
|
+
# @option opts [String] :search Search query
|
|
745
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
|
746
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
747
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
748
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
749
|
+
# @return [ModTeams]
|
|
750
|
+
def list_mod_teams(mod_id, opts = {})
|
|
751
|
+
data, _status_code, _headers = list_mod_teams_with_http_info(mod_id, opts)
|
|
752
|
+
data
|
|
753
|
+
end
|
|
754
|
+
|
|
755
|
+
# Fetch all teams attached to mod
|
|
756
|
+
# @param mod_id [String] A mod identifier or slug
|
|
757
|
+
# @param [Hash] opts the optional parameters
|
|
758
|
+
# @option opts [String] :search Search query
|
|
759
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
|
760
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
761
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
762
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
763
|
+
# @return [Array<(ModTeams, Integer, Hash)>] ModTeams data, response status code and response headers
|
|
764
|
+
def list_mod_teams_with_http_info(mod_id, opts = {})
|
|
765
|
+
if @api_client.config.debugging
|
|
766
|
+
@api_client.config.logger.debug 'Calling API: ModApi.list_mod_teams ...'
|
|
767
|
+
end
|
|
768
|
+
# verify the required parameter 'mod_id' is set
|
|
769
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
770
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.list_mod_teams"
|
|
771
|
+
end
|
|
772
|
+
|
|
773
|
+
allowable_values = %w[slug name]
|
|
774
|
+
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
|
775
|
+
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
allowable_values = %w[asc desc]
|
|
779
|
+
if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
|
|
780
|
+
raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
781
|
+
end
|
|
782
|
+
|
|
783
|
+
# resource path
|
|
784
|
+
local_var_path = '/mods/{mod_id}/teams'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
785
|
+
|
|
786
|
+
# query parameters
|
|
787
|
+
query_params = opts[:query_params] || {}
|
|
788
|
+
query_params[:search] = opts[:search] unless opts[:search].nil?
|
|
789
|
+
query_params[:sort] = opts[:sort] unless opts[:sort].nil?
|
|
790
|
+
query_params[:order] = opts[:order] unless opts[:order].nil?
|
|
791
|
+
query_params[:limit] = opts[:limit] unless opts[:limit].nil?
|
|
792
|
+
query_params[:offset] = opts[:offset] unless opts[:offset].nil?
|
|
793
|
+
|
|
794
|
+
# header parameters
|
|
795
|
+
header_params = opts[:header_params] || {}
|
|
796
|
+
# HTTP header 'Accept' (if needed)
|
|
797
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
798
|
+
|
|
799
|
+
# form parameters
|
|
800
|
+
form_params = opts[:form_params] || {}
|
|
801
|
+
|
|
802
|
+
# http body (model)
|
|
803
|
+
post_body = opts[:debug_body]
|
|
804
|
+
|
|
805
|
+
# return_type
|
|
806
|
+
return_type = opts[:debug_return_type] || 'ModTeams'
|
|
807
|
+
|
|
808
|
+
# auth_names
|
|
809
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
810
|
+
|
|
811
|
+
new_options = opts.merge(
|
|
812
|
+
operation: :'ModApi.list_mod_teams',
|
|
813
|
+
header_params: header_params,
|
|
814
|
+
query_params: query_params,
|
|
815
|
+
form_params: form_params,
|
|
816
|
+
body: post_body,
|
|
817
|
+
auth_names: auth_names,
|
|
818
|
+
return_type: return_type
|
|
819
|
+
)
|
|
820
|
+
|
|
821
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
822
|
+
if @api_client.config.debugging
|
|
823
|
+
@api_client.config.logger.debug "API called: ModApi#list_mod_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
824
|
+
end
|
|
825
|
+
[data, status_code, headers]
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
# Fetch all users attached to mod
|
|
829
|
+
# @param mod_id [String] A mod identifier or slug
|
|
830
|
+
# @param [Hash] opts the optional parameters
|
|
831
|
+
# @option opts [String] :search Search query
|
|
832
|
+
# @option opts [String] :sort Sorting column (default to 'username')
|
|
833
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
834
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
835
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
836
|
+
# @return [ModUsers]
|
|
837
|
+
def list_mod_users(mod_id, opts = {})
|
|
838
|
+
data, _status_code, _headers = list_mod_users_with_http_info(mod_id, opts)
|
|
839
|
+
data
|
|
840
|
+
end
|
|
841
|
+
|
|
842
|
+
# Fetch all users attached to mod
|
|
843
|
+
# @param mod_id [String] A mod identifier or slug
|
|
844
|
+
# @param [Hash] opts the optional parameters
|
|
845
|
+
# @option opts [String] :search Search query
|
|
846
|
+
# @option opts [String] :sort Sorting column (default to 'username')
|
|
847
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
848
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
849
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
850
|
+
# @return [Array<(ModUsers, Integer, Hash)>] ModUsers data, response status code and response headers
|
|
851
|
+
def list_mod_users_with_http_info(mod_id, opts = {})
|
|
852
|
+
if @api_client.config.debugging
|
|
853
|
+
@api_client.config.logger.debug 'Calling API: ModApi.list_mod_users ...'
|
|
854
|
+
end
|
|
855
|
+
# verify the required parameter 'mod_id' is set
|
|
856
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
857
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.list_mod_users"
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
allowable_values = %w[username email fullname admin active]
|
|
861
|
+
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
|
862
|
+
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
863
|
+
end
|
|
864
|
+
|
|
865
|
+
allowable_values = %w[asc desc]
|
|
866
|
+
if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
|
|
867
|
+
raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
868
|
+
end
|
|
869
|
+
|
|
870
|
+
# resource path
|
|
871
|
+
local_var_path = '/mods/{mod_id}/users'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
872
|
+
|
|
873
|
+
# query parameters
|
|
874
|
+
query_params = opts[:query_params] || {}
|
|
875
|
+
query_params[:search] = opts[:search] unless opts[:search].nil?
|
|
876
|
+
query_params[:sort] = opts[:sort] unless opts[:sort].nil?
|
|
877
|
+
query_params[:order] = opts[:order] unless opts[:order].nil?
|
|
878
|
+
query_params[:limit] = opts[:limit] unless opts[:limit].nil?
|
|
879
|
+
query_params[:offset] = opts[:offset] unless opts[:offset].nil?
|
|
880
|
+
|
|
881
|
+
# header parameters
|
|
882
|
+
header_params = opts[:header_params] || {}
|
|
883
|
+
# HTTP header 'Accept' (if needed)
|
|
884
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
885
|
+
|
|
886
|
+
# form parameters
|
|
887
|
+
form_params = opts[:form_params] || {}
|
|
888
|
+
|
|
889
|
+
# http body (model)
|
|
890
|
+
post_body = opts[:debug_body]
|
|
891
|
+
|
|
892
|
+
# return_type
|
|
893
|
+
return_type = opts[:debug_return_type] || 'ModUsers'
|
|
894
|
+
|
|
895
|
+
# auth_names
|
|
896
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
897
|
+
|
|
898
|
+
new_options = opts.merge(
|
|
899
|
+
operation: :'ModApi.list_mod_users',
|
|
900
|
+
header_params: header_params,
|
|
901
|
+
query_params: query_params,
|
|
902
|
+
form_params: form_params,
|
|
903
|
+
body: post_body,
|
|
904
|
+
auth_names: auth_names,
|
|
905
|
+
return_type: return_type
|
|
906
|
+
)
|
|
907
|
+
|
|
908
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
909
|
+
if @api_client.config.debugging
|
|
910
|
+
@api_client.config.logger.debug "API called: ModApi#list_mod_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
911
|
+
end
|
|
912
|
+
[data, status_code, headers]
|
|
913
|
+
end
|
|
914
|
+
|
|
915
|
+
# Fetch all available mods
|
|
916
|
+
# @param [Hash] opts the optional parameters
|
|
917
|
+
# @option opts [String] :search Search query
|
|
918
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
|
919
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
920
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
921
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
922
|
+
# @return [Mods]
|
|
923
|
+
def list_mods(opts = {})
|
|
924
|
+
data, _status_code, _headers = list_mods_with_http_info(opts)
|
|
925
|
+
data
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
# Fetch all available mods
|
|
929
|
+
# @param [Hash] opts the optional parameters
|
|
930
|
+
# @option opts [String] :search Search query
|
|
931
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
|
932
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
933
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
934
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
935
|
+
# @return [Array<(Mods, Integer, Hash)>] Mods data, response status code and response headers
|
|
936
|
+
def list_mods_with_http_info(opts = {})
|
|
937
|
+
if @api_client.config.debugging
|
|
938
|
+
@api_client.config.logger.debug 'Calling API: ModApi.list_mods ...'
|
|
939
|
+
end
|
|
940
|
+
allowable_values = %w[name public]
|
|
941
|
+
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
|
942
|
+
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
943
|
+
end
|
|
944
|
+
|
|
945
|
+
allowable_values = %w[asc desc]
|
|
946
|
+
if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
|
|
947
|
+
raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
948
|
+
end
|
|
949
|
+
|
|
950
|
+
# resource path
|
|
951
|
+
local_var_path = '/mods'
|
|
952
|
+
|
|
953
|
+
# query parameters
|
|
954
|
+
query_params = opts[:query_params] || {}
|
|
955
|
+
query_params[:search] = opts[:search] unless opts[:search].nil?
|
|
956
|
+
query_params[:sort] = opts[:sort] unless opts[:sort].nil?
|
|
957
|
+
query_params[:order] = opts[:order] unless opts[:order].nil?
|
|
958
|
+
query_params[:limit] = opts[:limit] unless opts[:limit].nil?
|
|
959
|
+
query_params[:offset] = opts[:offset] unless opts[:offset].nil?
|
|
960
|
+
|
|
961
|
+
# header parameters
|
|
962
|
+
header_params = opts[:header_params] || {}
|
|
963
|
+
# HTTP header 'Accept' (if needed)
|
|
964
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
965
|
+
|
|
966
|
+
# form parameters
|
|
967
|
+
form_params = opts[:form_params] || {}
|
|
968
|
+
|
|
969
|
+
# http body (model)
|
|
970
|
+
post_body = opts[:debug_body]
|
|
971
|
+
|
|
972
|
+
# return_type
|
|
973
|
+
return_type = opts[:debug_return_type] || 'Mods'
|
|
974
|
+
|
|
975
|
+
# auth_names
|
|
976
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
977
|
+
|
|
978
|
+
new_options = opts.merge(
|
|
979
|
+
operation: :'ModApi.list_mods',
|
|
980
|
+
header_params: header_params,
|
|
981
|
+
query_params: query_params,
|
|
982
|
+
form_params: form_params,
|
|
983
|
+
body: post_body,
|
|
984
|
+
auth_names: auth_names,
|
|
985
|
+
return_type: return_type
|
|
986
|
+
)
|
|
987
|
+
|
|
988
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
989
|
+
if @api_client.config.debugging
|
|
990
|
+
@api_client.config.logger.debug "API called: ModApi#list_mods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
991
|
+
end
|
|
992
|
+
[data, status_code, headers]
|
|
993
|
+
end
|
|
994
|
+
|
|
995
|
+
# Fetch all builds attached to version
|
|
996
|
+
# @param mod_id [String] A mod identifier or slug
|
|
997
|
+
# @param version_id [String] A version identifier or slug
|
|
998
|
+
# @param [Hash] opts the optional parameters
|
|
999
|
+
# @option opts [String] :search Search query
|
|
1000
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
|
1001
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
1002
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
1003
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
1004
|
+
# @return [VersionBuilds]
|
|
1005
|
+
def list_version_builds(mod_id, version_id, opts = {})
|
|
1006
|
+
data, _status_code, _headers = list_version_builds_with_http_info(mod_id, version_id, opts)
|
|
1007
|
+
data
|
|
1008
|
+
end
|
|
1009
|
+
|
|
1010
|
+
# Fetch all builds attached to version
|
|
1011
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1012
|
+
# @param version_id [String] A version identifier or slug
|
|
1013
|
+
# @param [Hash] opts the optional parameters
|
|
1014
|
+
# @option opts [String] :search Search query
|
|
1015
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
|
1016
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
1017
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
1018
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
1019
|
+
# @return [Array<(VersionBuilds, Integer, Hash)>] VersionBuilds data, response status code and response headers
|
|
1020
|
+
def list_version_builds_with_http_info(mod_id, version_id, opts = {})
|
|
1021
|
+
if @api_client.config.debugging
|
|
1022
|
+
@api_client.config.logger.debug 'Calling API: ModApi.list_version_builds ...'
|
|
1023
|
+
end
|
|
1024
|
+
# verify the required parameter 'mod_id' is set
|
|
1025
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
1026
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.list_version_builds"
|
|
1027
|
+
end
|
|
1028
|
+
# verify the required parameter 'version_id' is set
|
|
1029
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
1030
|
+
raise ArgumentError, "Missing the required parameter 'version_id' when calling ModApi.list_version_builds"
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
allowable_values = %w[slug name]
|
|
1034
|
+
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
|
1035
|
+
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
1036
|
+
end
|
|
1037
|
+
|
|
1038
|
+
allowable_values = %w[asc desc]
|
|
1039
|
+
if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
|
|
1040
|
+
raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
1041
|
+
end
|
|
1042
|
+
|
|
1043
|
+
# resource path
|
|
1044
|
+
local_var_path = '/mods/{mod_id}/versions/{version_id}/builds'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
|
1045
|
+
|
|
1046
|
+
# query parameters
|
|
1047
|
+
query_params = opts[:query_params] || {}
|
|
1048
|
+
query_params[:search] = opts[:search] unless opts[:search].nil?
|
|
1049
|
+
query_params[:sort] = opts[:sort] unless opts[:sort].nil?
|
|
1050
|
+
query_params[:order] = opts[:order] unless opts[:order].nil?
|
|
1051
|
+
query_params[:limit] = opts[:limit] unless opts[:limit].nil?
|
|
1052
|
+
query_params[:offset] = opts[:offset] unless opts[:offset].nil?
|
|
1053
|
+
|
|
1054
|
+
# header parameters
|
|
1055
|
+
header_params = opts[:header_params] || {}
|
|
1056
|
+
# HTTP header 'Accept' (if needed)
|
|
1057
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1058
|
+
|
|
1059
|
+
# form parameters
|
|
1060
|
+
form_params = opts[:form_params] || {}
|
|
1061
|
+
|
|
1062
|
+
# http body (model)
|
|
1063
|
+
post_body = opts[:debug_body]
|
|
1064
|
+
|
|
1065
|
+
# return_type
|
|
1066
|
+
return_type = opts[:debug_return_type] || 'VersionBuilds'
|
|
1067
|
+
|
|
1068
|
+
# auth_names
|
|
1069
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
1070
|
+
|
|
1071
|
+
new_options = opts.merge(
|
|
1072
|
+
operation: :'ModApi.list_version_builds',
|
|
1073
|
+
header_params: header_params,
|
|
1074
|
+
query_params: query_params,
|
|
1075
|
+
form_params: form_params,
|
|
1076
|
+
body: post_body,
|
|
1077
|
+
auth_names: auth_names,
|
|
1078
|
+
return_type: return_type
|
|
1079
|
+
)
|
|
1080
|
+
|
|
1081
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1082
|
+
if @api_client.config.debugging
|
|
1083
|
+
@api_client.config.logger.debug "API called: ModApi#list_version_builds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1084
|
+
end
|
|
1085
|
+
[data, status_code, headers]
|
|
1086
|
+
end
|
|
1087
|
+
|
|
1088
|
+
# Fetch all available versions for a mod
|
|
1089
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1090
|
+
# @param [Hash] opts the optional parameters
|
|
1091
|
+
# @option opts [String] :search Search query
|
|
1092
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
|
1093
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
1094
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
1095
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
1096
|
+
# @return [Versions]
|
|
1097
|
+
def list_versions(mod_id, opts = {})
|
|
1098
|
+
data, _status_code, _headers = list_versions_with_http_info(mod_id, opts)
|
|
1099
|
+
data
|
|
1100
|
+
end
|
|
1101
|
+
|
|
1102
|
+
# Fetch all available versions for a mod
|
|
1103
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1104
|
+
# @param [Hash] opts the optional parameters
|
|
1105
|
+
# @option opts [String] :search Search query
|
|
1106
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
|
1107
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
|
1108
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
|
1109
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
|
1110
|
+
# @return [Array<(Versions, Integer, Hash)>] Versions data, response status code and response headers
|
|
1111
|
+
def list_versions_with_http_info(mod_id, opts = {})
|
|
1112
|
+
if @api_client.config.debugging
|
|
1113
|
+
@api_client.config.logger.debug 'Calling API: ModApi.list_versions ...'
|
|
1114
|
+
end
|
|
1115
|
+
# verify the required parameter 'mod_id' is set
|
|
1116
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
1117
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.list_versions"
|
|
1118
|
+
end
|
|
1119
|
+
|
|
1120
|
+
allowable_values = %w[slug name]
|
|
1121
|
+
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
|
1122
|
+
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
1123
|
+
end
|
|
1124
|
+
|
|
1125
|
+
allowable_values = %w[asc desc]
|
|
1126
|
+
if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
|
|
1127
|
+
raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
1128
|
+
end
|
|
1129
|
+
|
|
1130
|
+
# resource path
|
|
1131
|
+
local_var_path = '/mods/{mod_id}/versions'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
1132
|
+
|
|
1133
|
+
# query parameters
|
|
1134
|
+
query_params = opts[:query_params] || {}
|
|
1135
|
+
query_params[:search] = opts[:search] unless opts[:search].nil?
|
|
1136
|
+
query_params[:sort] = opts[:sort] unless opts[:sort].nil?
|
|
1137
|
+
query_params[:order] = opts[:order] unless opts[:order].nil?
|
|
1138
|
+
query_params[:limit] = opts[:limit] unless opts[:limit].nil?
|
|
1139
|
+
query_params[:offset] = opts[:offset] unless opts[:offset].nil?
|
|
1140
|
+
|
|
1141
|
+
# header parameters
|
|
1142
|
+
header_params = opts[:header_params] || {}
|
|
1143
|
+
# HTTP header 'Accept' (if needed)
|
|
1144
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1145
|
+
|
|
1146
|
+
# form parameters
|
|
1147
|
+
form_params = opts[:form_params] || {}
|
|
1148
|
+
|
|
1149
|
+
# http body (model)
|
|
1150
|
+
post_body = opts[:debug_body]
|
|
1151
|
+
|
|
1152
|
+
# return_type
|
|
1153
|
+
return_type = opts[:debug_return_type] || 'Versions'
|
|
1154
|
+
|
|
1155
|
+
# auth_names
|
|
1156
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
1157
|
+
|
|
1158
|
+
new_options = opts.merge(
|
|
1159
|
+
operation: :'ModApi.list_versions',
|
|
1160
|
+
header_params: header_params,
|
|
1161
|
+
query_params: query_params,
|
|
1162
|
+
form_params: form_params,
|
|
1163
|
+
body: post_body,
|
|
1164
|
+
auth_names: auth_names,
|
|
1165
|
+
return_type: return_type
|
|
1166
|
+
)
|
|
1167
|
+
|
|
1168
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1169
|
+
if @api_client.config.debugging
|
|
1170
|
+
@api_client.config.logger.debug "API called: ModApi#list_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1171
|
+
end
|
|
1172
|
+
[data, status_code, headers]
|
|
1173
|
+
end
|
|
1174
|
+
|
|
1175
|
+
# Update team perms for mod
|
|
1176
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1177
|
+
# @param mod_team_params [ModTeamParams] The team data to update
|
|
1178
|
+
# @param [Hash] opts the optional parameters
|
|
1179
|
+
# @return [Notification]
|
|
1180
|
+
def permit_mod_team(mod_id, mod_team_params, opts = {})
|
|
1181
|
+
data, _status_code, _headers = permit_mod_team_with_http_info(mod_id, mod_team_params, opts)
|
|
1182
|
+
data
|
|
1183
|
+
end
|
|
1184
|
+
|
|
1185
|
+
# Update team perms for mod
|
|
1186
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1187
|
+
# @param mod_team_params [ModTeamParams] The team data to update
|
|
1188
|
+
# @param [Hash] opts the optional parameters
|
|
1189
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
1190
|
+
def permit_mod_team_with_http_info(mod_id, mod_team_params, opts = {})
|
|
1191
|
+
if @api_client.config.debugging
|
|
1192
|
+
@api_client.config.logger.debug 'Calling API: ModApi.permit_mod_team ...'
|
|
1193
|
+
end
|
|
1194
|
+
# verify the required parameter 'mod_id' is set
|
|
1195
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
1196
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.permit_mod_team"
|
|
1197
|
+
end
|
|
1198
|
+
# verify the required parameter 'mod_team_params' is set
|
|
1199
|
+
if @api_client.config.client_side_validation && mod_team_params.nil?
|
|
1200
|
+
raise ArgumentError, "Missing the required parameter 'mod_team_params' when calling ModApi.permit_mod_team"
|
|
1201
|
+
end
|
|
1202
|
+
|
|
1203
|
+
# resource path
|
|
1204
|
+
local_var_path = '/mods/{mod_id}/teams'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
1205
|
+
|
|
1206
|
+
# query parameters
|
|
1207
|
+
query_params = opts[:query_params] || {}
|
|
1208
|
+
|
|
1209
|
+
# header parameters
|
|
1210
|
+
header_params = opts[:header_params] || {}
|
|
1211
|
+
# HTTP header 'Accept' (if needed)
|
|
1212
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1213
|
+
# HTTP header 'Content-Type'
|
|
1214
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1215
|
+
unless content_type.nil?
|
|
1216
|
+
header_params['Content-Type'] = content_type
|
|
1217
|
+
end
|
|
1218
|
+
|
|
1219
|
+
# form parameters
|
|
1220
|
+
form_params = opts[:form_params] || {}
|
|
1221
|
+
|
|
1222
|
+
# http body (model)
|
|
1223
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(mod_team_params)
|
|
1224
|
+
|
|
1225
|
+
# return_type
|
|
1226
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
1227
|
+
|
|
1228
|
+
# auth_names
|
|
1229
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
1230
|
+
|
|
1231
|
+
new_options = opts.merge(
|
|
1232
|
+
operation: :'ModApi.permit_mod_team',
|
|
1233
|
+
header_params: header_params,
|
|
1234
|
+
query_params: query_params,
|
|
1235
|
+
form_params: form_params,
|
|
1236
|
+
body: post_body,
|
|
1237
|
+
auth_names: auth_names,
|
|
1238
|
+
return_type: return_type
|
|
1239
|
+
)
|
|
1240
|
+
|
|
1241
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1242
|
+
if @api_client.config.debugging
|
|
1243
|
+
@api_client.config.logger.debug "API called: ModApi#permit_mod_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1244
|
+
end
|
|
1245
|
+
[data, status_code, headers]
|
|
1246
|
+
end
|
|
1247
|
+
|
|
1248
|
+
# Update user perms for mod
|
|
1249
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1250
|
+
# @param mod_user_params [ModUserParams] The user data to update
|
|
1251
|
+
# @param [Hash] opts the optional parameters
|
|
1252
|
+
# @return [Notification]
|
|
1253
|
+
def permit_mod_user(mod_id, mod_user_params, opts = {})
|
|
1254
|
+
data, _status_code, _headers = permit_mod_user_with_http_info(mod_id, mod_user_params, opts)
|
|
1255
|
+
data
|
|
1256
|
+
end
|
|
1257
|
+
|
|
1258
|
+
# Update user perms for mod
|
|
1259
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1260
|
+
# @param mod_user_params [ModUserParams] The user data to update
|
|
1261
|
+
# @param [Hash] opts the optional parameters
|
|
1262
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
1263
|
+
def permit_mod_user_with_http_info(mod_id, mod_user_params, opts = {})
|
|
1264
|
+
if @api_client.config.debugging
|
|
1265
|
+
@api_client.config.logger.debug 'Calling API: ModApi.permit_mod_user ...'
|
|
1266
|
+
end
|
|
1267
|
+
# verify the required parameter 'mod_id' is set
|
|
1268
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
1269
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.permit_mod_user"
|
|
1270
|
+
end
|
|
1271
|
+
# verify the required parameter 'mod_user_params' is set
|
|
1272
|
+
if @api_client.config.client_side_validation && mod_user_params.nil?
|
|
1273
|
+
raise ArgumentError, "Missing the required parameter 'mod_user_params' when calling ModApi.permit_mod_user"
|
|
1274
|
+
end
|
|
1275
|
+
|
|
1276
|
+
# resource path
|
|
1277
|
+
local_var_path = '/mods/{mod_id}/users'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
1278
|
+
|
|
1279
|
+
# query parameters
|
|
1280
|
+
query_params = opts[:query_params] || {}
|
|
1281
|
+
|
|
1282
|
+
# header parameters
|
|
1283
|
+
header_params = opts[:header_params] || {}
|
|
1284
|
+
# HTTP header 'Accept' (if needed)
|
|
1285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1286
|
+
# HTTP header 'Content-Type'
|
|
1287
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1288
|
+
unless content_type.nil?
|
|
1289
|
+
header_params['Content-Type'] = content_type
|
|
1290
|
+
end
|
|
1291
|
+
|
|
1292
|
+
# form parameters
|
|
1293
|
+
form_params = opts[:form_params] || {}
|
|
1294
|
+
|
|
1295
|
+
# http body (model)
|
|
1296
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(mod_user_params)
|
|
1297
|
+
|
|
1298
|
+
# return_type
|
|
1299
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
1300
|
+
|
|
1301
|
+
# auth_names
|
|
1302
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
1303
|
+
|
|
1304
|
+
new_options = opts.merge(
|
|
1305
|
+
operation: :'ModApi.permit_mod_user',
|
|
1306
|
+
header_params: header_params,
|
|
1307
|
+
query_params: query_params,
|
|
1308
|
+
form_params: form_params,
|
|
1309
|
+
body: post_body,
|
|
1310
|
+
auth_names: auth_names,
|
|
1311
|
+
return_type: return_type
|
|
1312
|
+
)
|
|
1313
|
+
|
|
1314
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1315
|
+
if @api_client.config.debugging
|
|
1316
|
+
@api_client.config.logger.debug "API called: ModApi#permit_mod_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1317
|
+
end
|
|
1318
|
+
[data, status_code, headers]
|
|
1319
|
+
end
|
|
1320
|
+
|
|
1321
|
+
# Fetch a specific mod
|
|
1322
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1323
|
+
# @param [Hash] opts the optional parameters
|
|
1324
|
+
# @return [Mod]
|
|
1325
|
+
def show_mod(mod_id, opts = {})
|
|
1326
|
+
data, _status_code, _headers = show_mod_with_http_info(mod_id, opts)
|
|
1327
|
+
data
|
|
1328
|
+
end
|
|
1329
|
+
|
|
1330
|
+
# Fetch a specific mod
|
|
1331
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1332
|
+
# @param [Hash] opts the optional parameters
|
|
1333
|
+
# @return [Array<(Mod, Integer, Hash)>] Mod data, response status code and response headers
|
|
1334
|
+
def show_mod_with_http_info(mod_id, opts = {})
|
|
1335
|
+
if @api_client.config.debugging
|
|
1336
|
+
@api_client.config.logger.debug 'Calling API: ModApi.show_mod ...'
|
|
1337
|
+
end
|
|
1338
|
+
# verify the required parameter 'mod_id' is set
|
|
1339
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
1340
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.show_mod"
|
|
1341
|
+
end
|
|
1342
|
+
|
|
1343
|
+
# resource path
|
|
1344
|
+
local_var_path = '/mods/{mod_id}'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
1345
|
+
|
|
1346
|
+
# query parameters
|
|
1347
|
+
query_params = opts[:query_params] || {}
|
|
1348
|
+
|
|
1349
|
+
# header parameters
|
|
1350
|
+
header_params = opts[:header_params] || {}
|
|
1351
|
+
# HTTP header 'Accept' (if needed)
|
|
1352
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1353
|
+
|
|
1354
|
+
# form parameters
|
|
1355
|
+
form_params = opts[:form_params] || {}
|
|
1356
|
+
|
|
1357
|
+
# http body (model)
|
|
1358
|
+
post_body = opts[:debug_body]
|
|
1359
|
+
|
|
1360
|
+
# return_type
|
|
1361
|
+
return_type = opts[:debug_return_type] || 'Mod'
|
|
1362
|
+
|
|
1363
|
+
# auth_names
|
|
1364
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
1365
|
+
|
|
1366
|
+
new_options = opts.merge(
|
|
1367
|
+
operation: :'ModApi.show_mod',
|
|
1368
|
+
header_params: header_params,
|
|
1369
|
+
query_params: query_params,
|
|
1370
|
+
form_params: form_params,
|
|
1371
|
+
body: post_body,
|
|
1372
|
+
auth_names: auth_names,
|
|
1373
|
+
return_type: return_type
|
|
1374
|
+
)
|
|
1375
|
+
|
|
1376
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1377
|
+
if @api_client.config.debugging
|
|
1378
|
+
@api_client.config.logger.debug "API called: ModApi#show_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1379
|
+
end
|
|
1380
|
+
[data, status_code, headers]
|
|
1381
|
+
end
|
|
1382
|
+
|
|
1383
|
+
# Fetch a specific version for a mod
|
|
1384
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1385
|
+
# @param version_id [String] A version identifier or slug
|
|
1386
|
+
# @param [Hash] opts the optional parameters
|
|
1387
|
+
# @return [Version]
|
|
1388
|
+
def show_version(mod_id, version_id, opts = {})
|
|
1389
|
+
data, _status_code, _headers = show_version_with_http_info(mod_id, version_id, opts)
|
|
1390
|
+
data
|
|
1391
|
+
end
|
|
1392
|
+
|
|
1393
|
+
# Fetch a specific version for a mod
|
|
1394
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1395
|
+
# @param version_id [String] A version identifier or slug
|
|
1396
|
+
# @param [Hash] opts the optional parameters
|
|
1397
|
+
# @return [Array<(Version, Integer, Hash)>] Version data, response status code and response headers
|
|
1398
|
+
def show_version_with_http_info(mod_id, version_id, opts = {})
|
|
1399
|
+
if @api_client.config.debugging
|
|
1400
|
+
@api_client.config.logger.debug 'Calling API: ModApi.show_version ...'
|
|
1401
|
+
end
|
|
1402
|
+
# verify the required parameter 'mod_id' is set
|
|
1403
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
1404
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.show_version"
|
|
1405
|
+
end
|
|
1406
|
+
# verify the required parameter 'version_id' is set
|
|
1407
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
1408
|
+
raise ArgumentError, "Missing the required parameter 'version_id' when calling ModApi.show_version"
|
|
1409
|
+
end
|
|
1410
|
+
|
|
1411
|
+
# resource path
|
|
1412
|
+
local_var_path = '/mods/{mod_id}/versions/{version_id}'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
|
1413
|
+
|
|
1414
|
+
# query parameters
|
|
1415
|
+
query_params = opts[:query_params] || {}
|
|
1416
|
+
|
|
1417
|
+
# header parameters
|
|
1418
|
+
header_params = opts[:header_params] || {}
|
|
1419
|
+
# HTTP header 'Accept' (if needed)
|
|
1420
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1421
|
+
|
|
1422
|
+
# form parameters
|
|
1423
|
+
form_params = opts[:form_params] || {}
|
|
1424
|
+
|
|
1425
|
+
# http body (model)
|
|
1426
|
+
post_body = opts[:debug_body]
|
|
1427
|
+
|
|
1428
|
+
# return_type
|
|
1429
|
+
return_type = opts[:debug_return_type] || 'Version'
|
|
1430
|
+
|
|
1431
|
+
# auth_names
|
|
1432
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
1433
|
+
|
|
1434
|
+
new_options = opts.merge(
|
|
1435
|
+
operation: :'ModApi.show_version',
|
|
1436
|
+
header_params: header_params,
|
|
1437
|
+
query_params: query_params,
|
|
1438
|
+
form_params: form_params,
|
|
1439
|
+
body: post_body,
|
|
1440
|
+
auth_names: auth_names,
|
|
1441
|
+
return_type: return_type
|
|
1442
|
+
)
|
|
1443
|
+
|
|
1444
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1445
|
+
if @api_client.config.debugging
|
|
1446
|
+
@api_client.config.logger.debug "API called: ModApi#show_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1447
|
+
end
|
|
1448
|
+
[data, status_code, headers]
|
|
1449
|
+
end
|
|
1450
|
+
|
|
1451
|
+
# Update a specific mod
|
|
1452
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1453
|
+
# @param mod [Mod] The mod data to update
|
|
1454
|
+
# @param [Hash] opts the optional parameters
|
|
1455
|
+
# @return [Mod]
|
|
1456
|
+
def update_mod(mod_id, mod, opts = {})
|
|
1457
|
+
data, _status_code, _headers = update_mod_with_http_info(mod_id, mod, opts)
|
|
1458
|
+
data
|
|
1459
|
+
end
|
|
1460
|
+
|
|
1461
|
+
# Update a specific mod
|
|
1462
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1463
|
+
# @param mod [Mod] The mod data to update
|
|
1464
|
+
# @param [Hash] opts the optional parameters
|
|
1465
|
+
# @return [Array<(Mod, Integer, Hash)>] Mod data, response status code and response headers
|
|
1466
|
+
def update_mod_with_http_info(mod_id, mod, opts = {})
|
|
1467
|
+
if @api_client.config.debugging
|
|
1468
|
+
@api_client.config.logger.debug 'Calling API: ModApi.update_mod ...'
|
|
1469
|
+
end
|
|
1470
|
+
# verify the required parameter 'mod_id' is set
|
|
1471
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
1472
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.update_mod"
|
|
1473
|
+
end
|
|
1474
|
+
# verify the required parameter 'mod' is set
|
|
1475
|
+
if @api_client.config.client_side_validation && mod.nil?
|
|
1476
|
+
raise ArgumentError, "Missing the required parameter 'mod' when calling ModApi.update_mod"
|
|
1477
|
+
end
|
|
1478
|
+
|
|
1479
|
+
# resource path
|
|
1480
|
+
local_var_path = '/mods/{mod_id}'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s))
|
|
1481
|
+
|
|
1482
|
+
# query parameters
|
|
1483
|
+
query_params = opts[:query_params] || {}
|
|
1484
|
+
|
|
1485
|
+
# header parameters
|
|
1486
|
+
header_params = opts[:header_params] || {}
|
|
1487
|
+
# HTTP header 'Accept' (if needed)
|
|
1488
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1489
|
+
# HTTP header 'Content-Type'
|
|
1490
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1491
|
+
unless content_type.nil?
|
|
1492
|
+
header_params['Content-Type'] = content_type
|
|
1493
|
+
end
|
|
1494
|
+
|
|
1495
|
+
# form parameters
|
|
1496
|
+
form_params = opts[:form_params] || {}
|
|
1497
|
+
|
|
1498
|
+
# http body (model)
|
|
1499
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(mod)
|
|
1500
|
+
|
|
1501
|
+
# return_type
|
|
1502
|
+
return_type = opts[:debug_return_type] || 'Mod'
|
|
1503
|
+
|
|
1504
|
+
# auth_names
|
|
1505
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
1506
|
+
|
|
1507
|
+
new_options = opts.merge(
|
|
1508
|
+
operation: :'ModApi.update_mod',
|
|
1509
|
+
header_params: header_params,
|
|
1510
|
+
query_params: query_params,
|
|
1511
|
+
form_params: form_params,
|
|
1512
|
+
body: post_body,
|
|
1513
|
+
auth_names: auth_names,
|
|
1514
|
+
return_type: return_type
|
|
1515
|
+
)
|
|
1516
|
+
|
|
1517
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1518
|
+
if @api_client.config.debugging
|
|
1519
|
+
@api_client.config.logger.debug "API called: ModApi#update_mod\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1520
|
+
end
|
|
1521
|
+
[data, status_code, headers]
|
|
1522
|
+
end
|
|
1523
|
+
|
|
1524
|
+
# Update a specific version for a mod
|
|
1525
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1526
|
+
# @param version_id [String] A version identifier or slug
|
|
1527
|
+
# @param version [Version] The version data to update
|
|
1528
|
+
# @param [Hash] opts the optional parameters
|
|
1529
|
+
# @return [Version]
|
|
1530
|
+
def update_version(mod_id, version_id, version, opts = {})
|
|
1531
|
+
data, _status_code, _headers = update_version_with_http_info(mod_id, version_id, version, opts)
|
|
1532
|
+
data
|
|
1533
|
+
end
|
|
1534
|
+
|
|
1535
|
+
# Update a specific version for a mod
|
|
1536
|
+
# @param mod_id [String] A mod identifier or slug
|
|
1537
|
+
# @param version_id [String] A version identifier or slug
|
|
1538
|
+
# @param version [Version] The version data to update
|
|
1539
|
+
# @param [Hash] opts the optional parameters
|
|
1540
|
+
# @return [Array<(Version, Integer, Hash)>] Version data, response status code and response headers
|
|
1541
|
+
def update_version_with_http_info(mod_id, version_id, version, opts = {})
|
|
1542
|
+
if @api_client.config.debugging
|
|
1543
|
+
@api_client.config.logger.debug 'Calling API: ModApi.update_version ...'
|
|
1544
|
+
end
|
|
1545
|
+
# verify the required parameter 'mod_id' is set
|
|
1546
|
+
if @api_client.config.client_side_validation && mod_id.nil?
|
|
1547
|
+
raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.update_version"
|
|
1548
|
+
end
|
|
1549
|
+
# verify the required parameter 'version_id' is set
|
|
1550
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
1551
|
+
raise ArgumentError, "Missing the required parameter 'version_id' when calling ModApi.update_version"
|
|
1552
|
+
end
|
|
1553
|
+
# verify the required parameter 'version' is set
|
|
1554
|
+
if @api_client.config.client_side_validation && version.nil?
|
|
1555
|
+
raise ArgumentError, "Missing the required parameter 'version' when calling ModApi.update_version"
|
|
1556
|
+
end
|
|
1557
|
+
|
|
1558
|
+
# resource path
|
|
1559
|
+
local_var_path = '/mods/{mod_id}/versions/{version_id}'.sub('{' + 'mod_id' + '}', CGI.escape(mod_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
|
1560
|
+
|
|
1561
|
+
# query parameters
|
|
1562
|
+
query_params = opts[:query_params] || {}
|
|
1563
|
+
|
|
1564
|
+
# header parameters
|
|
1565
|
+
header_params = opts[:header_params] || {}
|
|
1566
|
+
# HTTP header 'Accept' (if needed)
|
|
1567
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1568
|
+
# HTTP header 'Content-Type'
|
|
1569
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1570
|
+
unless content_type.nil?
|
|
1571
|
+
header_params['Content-Type'] = content_type
|
|
1572
|
+
end
|
|
1573
|
+
|
|
1574
|
+
# form parameters
|
|
1575
|
+
form_params = opts[:form_params] || {}
|
|
1576
|
+
|
|
1577
|
+
# http body (model)
|
|
1578
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(version)
|
|
1579
|
+
|
|
1580
|
+
# return_type
|
|
1581
|
+
return_type = opts[:debug_return_type] || 'Version'
|
|
1582
|
+
|
|
1583
|
+
# auth_names
|
|
1584
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
|
1585
|
+
|
|
1586
|
+
new_options = opts.merge(
|
|
1587
|
+
operation: :'ModApi.update_version',
|
|
1588
|
+
header_params: header_params,
|
|
1589
|
+
query_params: query_params,
|
|
1590
|
+
form_params: form_params,
|
|
1591
|
+
body: post_body,
|
|
1592
|
+
auth_names: auth_names,
|
|
1593
|
+
return_type: return_type
|
|
1594
|
+
)
|
|
1595
|
+
|
|
1596
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1597
|
+
if @api_client.config.debugging
|
|
1598
|
+
@api_client.config.logger.debug "API called: ModApi#update_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1599
|
+
end
|
|
1600
|
+
[data, status_code, headers]
|
|
1601
|
+
end
|
|
1602
|
+
end
|
|
1603
|
+
end
|