kleister 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,198 @@
|
|
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 ProfileApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
|
21
|
+
# Fetch profile details of the personal account
|
22
|
+
# @param [Hash] opts the optional parameters
|
23
|
+
# @return [Profile]
|
24
|
+
def show_profile(opts = {})
|
25
|
+
data, _status_code, _headers = show_profile_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# Fetch profile details of the personal account
|
30
|
+
# @param [Hash] opts the optional parameters
|
31
|
+
# @return [Array<(Profile, Integer, Hash)>] Profile data, response status code and response headers
|
32
|
+
def show_profile_with_http_info(opts = {})
|
33
|
+
if @api_client.config.debugging
|
34
|
+
@api_client.config.logger.debug 'Calling API: ProfileApi.show_profile ...'
|
35
|
+
end
|
36
|
+
# resource path
|
37
|
+
local_var_path = '/profile/self'
|
38
|
+
|
39
|
+
# query parameters
|
40
|
+
query_params = opts[:query_params] || {}
|
41
|
+
|
42
|
+
# header parameters
|
43
|
+
header_params = opts[:header_params] || {}
|
44
|
+
# HTTP header 'Accept' (if needed)
|
45
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
46
|
+
|
47
|
+
# form parameters
|
48
|
+
form_params = opts[:form_params] || {}
|
49
|
+
|
50
|
+
# http body (model)
|
51
|
+
post_body = opts[:debug_body]
|
52
|
+
|
53
|
+
# return_type
|
54
|
+
return_type = opts[:debug_return_type] || 'Profile'
|
55
|
+
|
56
|
+
# auth_names
|
57
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
58
|
+
|
59
|
+
new_options = opts.merge(
|
60
|
+
operation: :'ProfileApi.show_profile',
|
61
|
+
header_params: header_params,
|
62
|
+
query_params: query_params,
|
63
|
+
form_params: form_params,
|
64
|
+
body: post_body,
|
65
|
+
auth_names: auth_names,
|
66
|
+
return_type: return_type
|
67
|
+
)
|
68
|
+
|
69
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
70
|
+
if @api_client.config.debugging
|
71
|
+
@api_client.config.logger.debug "API called: ProfileApi#show_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
72
|
+
end
|
73
|
+
[data, status_code, headers]
|
74
|
+
end
|
75
|
+
|
76
|
+
# Retrieve an unlimited auth token
|
77
|
+
# @param [Hash] opts the optional parameters
|
78
|
+
# @return [AuthToken]
|
79
|
+
def token_profile(opts = {})
|
80
|
+
data, _status_code, _headers = token_profile_with_http_info(opts)
|
81
|
+
data
|
82
|
+
end
|
83
|
+
|
84
|
+
# Retrieve an unlimited auth token
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [Array<(AuthToken, Integer, Hash)>] AuthToken data, response status code and response headers
|
87
|
+
def token_profile_with_http_info(opts = {})
|
88
|
+
if @api_client.config.debugging
|
89
|
+
@api_client.config.logger.debug 'Calling API: ProfileApi.token_profile ...'
|
90
|
+
end
|
91
|
+
# resource path
|
92
|
+
local_var_path = '/profile/token'
|
93
|
+
|
94
|
+
# query parameters
|
95
|
+
query_params = opts[:query_params] || {}
|
96
|
+
|
97
|
+
# header parameters
|
98
|
+
header_params = opts[:header_params] || {}
|
99
|
+
# HTTP header 'Accept' (if needed)
|
100
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
101
|
+
|
102
|
+
# form parameters
|
103
|
+
form_params = opts[:form_params] || {}
|
104
|
+
|
105
|
+
# http body (model)
|
106
|
+
post_body = opts[:debug_body]
|
107
|
+
|
108
|
+
# return_type
|
109
|
+
return_type = opts[:debug_return_type] || 'AuthToken'
|
110
|
+
|
111
|
+
# auth_names
|
112
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
113
|
+
|
114
|
+
new_options = opts.merge(
|
115
|
+
operation: :'ProfileApi.token_profile',
|
116
|
+
header_params: header_params,
|
117
|
+
query_params: query_params,
|
118
|
+
form_params: form_params,
|
119
|
+
body: post_body,
|
120
|
+
auth_names: auth_names,
|
121
|
+
return_type: return_type
|
122
|
+
)
|
123
|
+
|
124
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
125
|
+
if @api_client.config.debugging
|
126
|
+
@api_client.config.logger.debug "API called: ProfileApi#token_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
127
|
+
end
|
128
|
+
[data, status_code, headers]
|
129
|
+
end
|
130
|
+
|
131
|
+
# Update your own profile information
|
132
|
+
# @param profile [Profile] The profile data to update
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @return [Profile]
|
135
|
+
def update_profile(profile, opts = {})
|
136
|
+
data, _status_code, _headers = update_profile_with_http_info(profile, opts)
|
137
|
+
data
|
138
|
+
end
|
139
|
+
|
140
|
+
# Update your own profile information
|
141
|
+
# @param profile [Profile] The profile data to update
|
142
|
+
# @param [Hash] opts the optional parameters
|
143
|
+
# @return [Array<(Profile, Integer, Hash)>] Profile data, response status code and response headers
|
144
|
+
def update_profile_with_http_info(profile, opts = {})
|
145
|
+
if @api_client.config.debugging
|
146
|
+
@api_client.config.logger.debug 'Calling API: ProfileApi.update_profile ...'
|
147
|
+
end
|
148
|
+
# verify the required parameter 'profile' is set
|
149
|
+
if @api_client.config.client_side_validation && profile.nil?
|
150
|
+
raise ArgumentError, "Missing the required parameter 'profile' when calling ProfileApi.update_profile"
|
151
|
+
end
|
152
|
+
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/profile/self'
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = opts[:query_params] || {}
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = opts[:header_params] || {}
|
161
|
+
# HTTP header 'Accept' (if needed)
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
163
|
+
# HTTP header 'Content-Type'
|
164
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
165
|
+
unless content_type.nil?
|
166
|
+
header_params['Content-Type'] = content_type
|
167
|
+
end
|
168
|
+
|
169
|
+
# form parameters
|
170
|
+
form_params = opts[:form_params] || {}
|
171
|
+
|
172
|
+
# http body (model)
|
173
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(profile)
|
174
|
+
|
175
|
+
# return_type
|
176
|
+
return_type = opts[:debug_return_type] || 'Profile'
|
177
|
+
|
178
|
+
# auth_names
|
179
|
+
auth_names = opts[:debug_auth_names] || []
|
180
|
+
|
181
|
+
new_options = opts.merge(
|
182
|
+
operation: :'ProfileApi.update_profile',
|
183
|
+
header_params: header_params,
|
184
|
+
query_params: query_params,
|
185
|
+
form_params: form_params,
|
186
|
+
body: post_body,
|
187
|
+
auth_names: auth_names,
|
188
|
+
return_type: return_type
|
189
|
+
)
|
190
|
+
|
191
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
192
|
+
if @api_client.config.debugging
|
193
|
+
@api_client.config.logger.debug "API called: ProfileApi#update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
194
|
+
end
|
195
|
+
[data, status_code, headers]
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
@@ -0,0 +1,367 @@
|
|
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 QuiltApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
|
21
|
+
# Attach a build to a Quilt version
|
22
|
+
# @param quilt_id [String] A quilt identifier or slug
|
23
|
+
# @param quilt_build_params [QuiltBuildParams] The build data to attach
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [Notification]
|
26
|
+
def attach_quilt_to_build(quilt_id, quilt_build_params, opts = {})
|
27
|
+
data, _status_code, _headers = attach_quilt_to_build_with_http_info(quilt_id, quilt_build_params, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attach a build to a Quilt version
|
32
|
+
# @param quilt_id [String] A quilt identifier or slug
|
33
|
+
# @param quilt_build_params [QuiltBuildParams] The build 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_quilt_to_build_with_http_info(quilt_id, quilt_build_params, opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: QuiltApi.attach_quilt_to_build ...'
|
39
|
+
end
|
40
|
+
# verify the required parameter 'quilt_id' is set
|
41
|
+
if @api_client.config.client_side_validation && quilt_id.nil?
|
42
|
+
raise ArgumentError, "Missing the required parameter 'quilt_id' when calling QuiltApi.attach_quilt_to_build"
|
43
|
+
end
|
44
|
+
# verify the required parameter 'quilt_build_params' is set
|
45
|
+
if @api_client.config.client_side_validation && quilt_build_params.nil?
|
46
|
+
raise ArgumentError, "Missing the required parameter 'quilt_build_params' when calling QuiltApi.attach_quilt_to_build"
|
47
|
+
end
|
48
|
+
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/quilt/{quilt_id}/builds'.sub('{' + 'quilt_id' + '}', CGI.escape(quilt_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(quilt_build_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: :'QuiltApi.attach_quilt_to_build',
|
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: QuiltApi#attach_quilt_to_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
|
+
end
|
91
|
+
[data, status_code, headers]
|
92
|
+
end
|
93
|
+
|
94
|
+
# Unlink a build from a Quilt version
|
95
|
+
# @param quilt_id [String] A quilt identifier or slug
|
96
|
+
# @param quilt_build_params [QuiltBuildParams] The build data to unlink
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Notification]
|
99
|
+
def delete_quilt_from_build(quilt_id, quilt_build_params, opts = {})
|
100
|
+
data, _status_code, _headers = delete_quilt_from_build_with_http_info(quilt_id, quilt_build_params, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Unlink a build from a Quilt version
|
105
|
+
# @param quilt_id [String] A quilt identifier or slug
|
106
|
+
# @param quilt_build_params [QuiltBuildParams] The build data to unlink
|
107
|
+
# @param [Hash] opts the optional parameters
|
108
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
109
|
+
def delete_quilt_from_build_with_http_info(quilt_id, quilt_build_params, opts = {})
|
110
|
+
if @api_client.config.debugging
|
111
|
+
@api_client.config.logger.debug 'Calling API: QuiltApi.delete_quilt_from_build ...'
|
112
|
+
end
|
113
|
+
# verify the required parameter 'quilt_id' is set
|
114
|
+
if @api_client.config.client_side_validation && quilt_id.nil?
|
115
|
+
raise ArgumentError, "Missing the required parameter 'quilt_id' when calling QuiltApi.delete_quilt_from_build"
|
116
|
+
end
|
117
|
+
# verify the required parameter 'quilt_build_params' is set
|
118
|
+
if @api_client.config.client_side_validation && quilt_build_params.nil?
|
119
|
+
raise ArgumentError, "Missing the required parameter 'quilt_build_params' when calling QuiltApi.delete_quilt_from_build"
|
120
|
+
end
|
121
|
+
|
122
|
+
# resource path
|
123
|
+
local_var_path = '/quilt/{quilt_id}/builds'.sub('{' + 'quilt_id' + '}', CGI.escape(quilt_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(quilt_build_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: :'QuiltApi.delete_quilt_from_build',
|
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(:DELETE, local_var_path, new_options)
|
161
|
+
if @api_client.config.debugging
|
162
|
+
@api_client.config.logger.debug "API called: QuiltApi#delete_quilt_from_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
163
|
+
end
|
164
|
+
[data, status_code, headers]
|
165
|
+
end
|
166
|
+
|
167
|
+
# Fetch the builds attached to a Quilt version
|
168
|
+
# @param quilt_id [String] A quilt identifier or slug
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @option opts [String] :search Search query
|
171
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
172
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
173
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
174
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
175
|
+
# @return [QuiltBuilds]
|
176
|
+
def list_quilt_builds(quilt_id, opts = {})
|
177
|
+
data, _status_code, _headers = list_quilt_builds_with_http_info(quilt_id, opts)
|
178
|
+
data
|
179
|
+
end
|
180
|
+
|
181
|
+
# Fetch the builds attached to a Quilt version
|
182
|
+
# @param quilt_id [String] A quilt identifier or slug
|
183
|
+
# @param [Hash] opts the optional parameters
|
184
|
+
# @option opts [String] :search Search query
|
185
|
+
# @option opts [String] :sort Sorting column (default to 'name')
|
186
|
+
# @option opts [String] :order Sorting order (default to 'asc')
|
187
|
+
# @option opts [Integer] :limit Paging limit (default to 100)
|
188
|
+
# @option opts [Integer] :offset Paging offset (default to 0)
|
189
|
+
# @return [Array<(QuiltBuilds, Integer, Hash)>] QuiltBuilds data, response status code and response headers
|
190
|
+
def list_quilt_builds_with_http_info(quilt_id, opts = {})
|
191
|
+
if @api_client.config.debugging
|
192
|
+
@api_client.config.logger.debug 'Calling API: QuiltApi.list_quilt_builds ...'
|
193
|
+
end
|
194
|
+
# verify the required parameter 'quilt_id' is set
|
195
|
+
if @api_client.config.client_side_validation && quilt_id.nil?
|
196
|
+
raise ArgumentError, "Missing the required parameter 'quilt_id' when calling QuiltApi.list_quilt_builds"
|
197
|
+
end
|
198
|
+
|
199
|
+
allowable_values = %w[name public]
|
200
|
+
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
201
|
+
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
202
|
+
end
|
203
|
+
|
204
|
+
allowable_values = %w[asc desc]
|
205
|
+
if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
|
206
|
+
raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
207
|
+
end
|
208
|
+
|
209
|
+
# resource path
|
210
|
+
local_var_path = '/quilt/{quilt_id}/builds'.sub('{' + 'quilt_id' + '}', CGI.escape(quilt_id.to_s))
|
211
|
+
|
212
|
+
# query parameters
|
213
|
+
query_params = opts[:query_params] || {}
|
214
|
+
query_params[:search] = opts[:search] unless opts[:search].nil?
|
215
|
+
query_params[:sort] = opts[:sort] unless opts[:sort].nil?
|
216
|
+
query_params[:order] = opts[:order] unless opts[:order].nil?
|
217
|
+
query_params[:limit] = opts[:limit] unless opts[:limit].nil?
|
218
|
+
query_params[:offset] = opts[:offset] unless opts[:offset].nil?
|
219
|
+
|
220
|
+
# header parameters
|
221
|
+
header_params = opts[:header_params] || {}
|
222
|
+
# HTTP header 'Accept' (if needed)
|
223
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
224
|
+
|
225
|
+
# form parameters
|
226
|
+
form_params = opts[:form_params] || {}
|
227
|
+
|
228
|
+
# http body (model)
|
229
|
+
post_body = opts[:debug_body]
|
230
|
+
|
231
|
+
# return_type
|
232
|
+
return_type = opts[:debug_return_type] || 'QuiltBuilds'
|
233
|
+
|
234
|
+
# auth_names
|
235
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
236
|
+
|
237
|
+
new_options = opts.merge(
|
238
|
+
operation: :'QuiltApi.list_quilt_builds',
|
239
|
+
header_params: header_params,
|
240
|
+
query_params: query_params,
|
241
|
+
form_params: form_params,
|
242
|
+
body: post_body,
|
243
|
+
auth_names: auth_names,
|
244
|
+
return_type: return_type
|
245
|
+
)
|
246
|
+
|
247
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
248
|
+
if @api_client.config.debugging
|
249
|
+
@api_client.config.logger.debug "API called: QuiltApi#list_quilt_builds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
250
|
+
end
|
251
|
+
[data, status_code, headers]
|
252
|
+
end
|
253
|
+
|
254
|
+
# Fetch the available Quilt versions
|
255
|
+
# @param [Hash] opts the optional parameters
|
256
|
+
# @option opts [String] :search Search query
|
257
|
+
# @return [Quilts]
|
258
|
+
def list_quilts(opts = {})
|
259
|
+
data, _status_code, _headers = list_quilts_with_http_info(opts)
|
260
|
+
data
|
261
|
+
end
|
262
|
+
|
263
|
+
# Fetch the available Quilt versions
|
264
|
+
# @param [Hash] opts the optional parameters
|
265
|
+
# @option opts [String] :search Search query
|
266
|
+
# @return [Array<(Quilts, Integer, Hash)>] Quilts data, response status code and response headers
|
267
|
+
def list_quilts_with_http_info(opts = {})
|
268
|
+
if @api_client.config.debugging
|
269
|
+
@api_client.config.logger.debug 'Calling API: QuiltApi.list_quilts ...'
|
270
|
+
end
|
271
|
+
# resource path
|
272
|
+
local_var_path = '/quilt'
|
273
|
+
|
274
|
+
# query parameters
|
275
|
+
query_params = opts[:query_params] || {}
|
276
|
+
query_params[:search] = opts[:search] unless opts[:search].nil?
|
277
|
+
|
278
|
+
# header parameters
|
279
|
+
header_params = opts[:header_params] || {}
|
280
|
+
# HTTP header 'Accept' (if needed)
|
281
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
282
|
+
|
283
|
+
# form parameters
|
284
|
+
form_params = opts[:form_params] || {}
|
285
|
+
|
286
|
+
# http body (model)
|
287
|
+
post_body = opts[:debug_body]
|
288
|
+
|
289
|
+
# return_type
|
290
|
+
return_type = opts[:debug_return_type] || 'Quilts'
|
291
|
+
|
292
|
+
# auth_names
|
293
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
294
|
+
|
295
|
+
new_options = opts.merge(
|
296
|
+
operation: :'QuiltApi.list_quilts',
|
297
|
+
header_params: header_params,
|
298
|
+
query_params: query_params,
|
299
|
+
form_params: form_params,
|
300
|
+
body: post_body,
|
301
|
+
auth_names: auth_names,
|
302
|
+
return_type: return_type
|
303
|
+
)
|
304
|
+
|
305
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
306
|
+
if @api_client.config.debugging
|
307
|
+
@api_client.config.logger.debug "API called: QuiltApi#list_quilts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
308
|
+
end
|
309
|
+
[data, status_code, headers]
|
310
|
+
end
|
311
|
+
|
312
|
+
# Update the available Quilt versions
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @return [Notification]
|
315
|
+
def update_quilt(opts = {})
|
316
|
+
data, _status_code, _headers = update_quilt_with_http_info(opts)
|
317
|
+
data
|
318
|
+
end
|
319
|
+
|
320
|
+
# Update the available Quilt versions
|
321
|
+
# @param [Hash] opts the optional parameters
|
322
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
323
|
+
def update_quilt_with_http_info(opts = {})
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug 'Calling API: QuiltApi.update_quilt ...'
|
326
|
+
end
|
327
|
+
# resource path
|
328
|
+
local_var_path = '/quilt'
|
329
|
+
|
330
|
+
# query parameters
|
331
|
+
query_params = opts[:query_params] || {}
|
332
|
+
|
333
|
+
# header parameters
|
334
|
+
header_params = opts[:header_params] || {}
|
335
|
+
# HTTP header 'Accept' (if needed)
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
337
|
+
|
338
|
+
# form parameters
|
339
|
+
form_params = opts[:form_params] || {}
|
340
|
+
|
341
|
+
# http body (model)
|
342
|
+
post_body = opts[:debug_body]
|
343
|
+
|
344
|
+
# return_type
|
345
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
346
|
+
|
347
|
+
# auth_names
|
348
|
+
auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
|
349
|
+
|
350
|
+
new_options = opts.merge(
|
351
|
+
operation: :'QuiltApi.update_quilt',
|
352
|
+
header_params: header_params,
|
353
|
+
query_params: query_params,
|
354
|
+
form_params: form_params,
|
355
|
+
body: post_body,
|
356
|
+
auth_names: auth_names,
|
357
|
+
return_type: return_type
|
358
|
+
)
|
359
|
+
|
360
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
361
|
+
if @api_client.config.debugging
|
362
|
+
@api_client.config.logger.debug "API called: QuiltApi#update_quilt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
363
|
+
end
|
364
|
+
[data, status_code, headers]
|
365
|
+
end
|
366
|
+
end
|
367
|
+
end
|