osdn-client 0.0.20160304 → 0.0.20160711
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +201 -0
- data/README.md +182 -0
- data/docs/DefaultApi.md +115 -0
- data/docs/Group.md +23 -0
- data/docs/GroupToolFlags.md +17 -0
- data/docs/News.md +14 -0
- data/docs/Package.md +13 -0
- data/docs/Pong.md +11 -0
- data/docs/ProjectApi.md +1511 -0
- data/docs/ProjectFrsApi.md +888 -0
- data/docs/ProjectNewsApi.md +576 -0
- data/docs/RelFile.md +19 -0
- data/docs/Release.md +16 -0
- data/docs/SimpleChamber.md +11 -0
- data/docs/SimpleGroup.md +11 -0
- data/docs/SimpleUser.md +10 -0
- data/docs/Skill.md +11 -0
- data/docs/Token.md +12 -0
- data/docs/User.md +20 -0
- data/docs/UserApi.md +63 -0
- data/lib/osdn-client.rb +32 -9
- data/lib/osdn-client/api/default_api.rb +50 -39
- data/lib/osdn-client/api/project_api.rb +661 -773
- data/lib/osdn-client/api/project_frs_api.rb +350 -412
- data/lib/osdn-client/api/project_news_api.rb +217 -244
- data/lib/osdn-client/api/user_api.rb +35 -20
- data/lib/osdn-client/api_client.rb +74 -13
- data/lib/osdn-client/api_error.rb +23 -0
- data/lib/osdn-client/configuration.rb +45 -1
- data/lib/osdn-client/models/group.rb +103 -65
- data/lib/osdn-client/models/group_tool_flags.rb +91 -47
- data/lib/osdn-client/models/news.rb +85 -38
- data/lib/osdn-client/models/package.rb +83 -35
- data/lib/osdn-client/models/pong.rb +79 -29
- data/lib/osdn-client/models/rel_file.rb +95 -53
- data/lib/osdn-client/models/release.rb +89 -44
- data/lib/osdn-client/models/simple_chamber.rb +79 -29
- data/lib/osdn-client/models/simple_group.rb +79 -29
- data/lib/osdn-client/models/simple_user.rb +77 -26
- data/lib/osdn-client/models/skill.rb +79 -29
- data/lib/osdn-client/models/token.rb +81 -32
- data/lib/osdn-client/models/user.rb +97 -56
- data/lib/osdn-client/version.rb +24 -1
- data/osdn-client.gemspec +30 -7
- data/spec/api/default_api_spec.rb +73 -0
- data/spec/api/{ProjectApi_spec.rb → project_api_spec.rb} +187 -264
- data/spec/api/{ProjectFrsApi_spec.rb → project_frs_api_spec.rb} +103 -136
- data/spec/api/{ProjectNewsApi_spec.rb → project_news_api_spec.rb} +71 -88
- data/spec/api/user_api_spec.rb +58 -0
- data/spec/api_client_spec.rb +315 -0
- data/spec/configuration_spec.rb +48 -0
- data/spec/models/group_spec.rb +143 -0
- data/spec/models/group_tool_flags_spec.rb +107 -0
- data/spec/models/news_spec.rb +89 -0
- data/spec/models/package_spec.rb +83 -0
- data/spec/models/pong_spec.rb +71 -0
- data/spec/models/rel_file_spec.rb +119 -0
- data/spec/models/release_spec.rb +101 -0
- data/spec/models/simple_chamber_spec.rb +71 -0
- data/spec/models/simple_group_spec.rb +71 -0
- data/spec/models/simple_user_spec.rb +65 -0
- data/spec/models/skill_spec.rb +71 -0
- data/spec/models/token_spec.rb +77 -0
- data/spec/models/user_spec.rb +125 -0
- data/spec/spec_helper.rb +122 -0
- metadata +87 -59
- data/spec/api/DefaultApi_spec.rb +0 -58
- data/spec/api/UserApi_spec.rb +0 -39
- data/spec/models/GroupToolFlags_spec.rb +0 -124
- data/spec/models/Group_spec.rb +0 -184
- data/spec/models/News_spec.rb +0 -94
- data/spec/models/Package_spec.rb +0 -84
- data/spec/models/Pong_spec.rb +0 -64
- data/spec/models/RelFile_spec.rb +0 -144
- data/spec/models/Release_spec.rb +0 -114
- data/spec/models/SimpleChamber_spec.rb +0 -64
- data/spec/models/SimpleGroup_spec.rb +0 -64
- data/spec/models/SimpleUser_spec.rb +0 -54
- data/spec/models/Skill_spec.rb +0 -64
- data/spec/models/Token_spec.rb +0 -74
- data/spec/models/User_spec.rb +0 -154
@@ -1,3 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20160304
|
7
|
+
Contact: admin@osdn.jp
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
1
24
|
require "uri"
|
2
25
|
|
3
26
|
module OSDNClient
|
@@ -9,30 +32,34 @@ module OSDNClient
|
|
9
32
|
end
|
10
33
|
|
11
34
|
#
|
12
|
-
#
|
35
|
+
# Create a package.
|
13
36
|
# @param id_or_name numeric project id or project name
|
37
|
+
# @param name package name
|
14
38
|
# @param [Hash] opts the optional parameters
|
15
|
-
# @
|
16
|
-
|
17
|
-
|
39
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
40
|
+
# @return [Package]
|
41
|
+
def create_package(id_or_name, name, opts = {})
|
42
|
+
data, _status_code, _headers = create_package_with_http_info(id_or_name, name, opts)
|
18
43
|
return data
|
19
44
|
end
|
20
45
|
|
21
46
|
#
|
22
|
-
#
|
47
|
+
# Create a package.
|
23
48
|
# @param id_or_name numeric project id or project name
|
49
|
+
# @param name package name
|
24
50
|
# @param [Hash] opts the optional parameters
|
25
|
-
# @
|
26
|
-
|
51
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
52
|
+
# @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers
|
53
|
+
def create_package_with_http_info(id_or_name, name, opts = {})
|
27
54
|
if @api_client.config.debugging
|
28
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
55
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.create_package ..."
|
29
56
|
end
|
30
|
-
|
31
57
|
# verify the required parameter 'id_or_name' is set
|
32
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
33
|
-
|
58
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.create_package" if id_or_name.nil?
|
59
|
+
# verify the required parameter 'name' is set
|
60
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ProjectFrsApi.create_package" if name.nil?
|
34
61
|
# resource path
|
35
|
-
|
62
|
+
local_var_path = "/project/{id_or_name}/frs".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
|
36
63
|
|
37
64
|
# query parameters
|
38
65
|
query_params = {}
|
@@ -41,66 +68,73 @@ module OSDNClient
|
|
41
68
|
header_params = {}
|
42
69
|
|
43
70
|
# HTTP header 'Accept' (if needed)
|
44
|
-
|
45
|
-
|
71
|
+
local_header_accept = []
|
72
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
46
73
|
|
47
74
|
# HTTP header 'Content-Type'
|
48
|
-
|
49
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
75
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
76
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
50
77
|
|
51
78
|
# form parameters
|
52
79
|
form_params = {}
|
80
|
+
form_params["name"] = name
|
81
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
53
82
|
|
54
83
|
# http body (model)
|
55
84
|
post_body = nil
|
56
|
-
|
57
|
-
|
58
|
-
auth_names = ['oauth2-implicit']
|
59
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
85
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
60
87
|
:header_params => header_params,
|
61
88
|
:query_params => query_params,
|
62
89
|
:form_params => form_params,
|
63
90
|
:body => post_body,
|
64
91
|
:auth_names => auth_names,
|
65
|
-
:return_type => '
|
92
|
+
:return_type => 'Package')
|
66
93
|
if @api_client.config.debugging
|
67
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
94
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#create_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
68
95
|
end
|
69
96
|
return data, status_code, headers
|
70
97
|
end
|
71
98
|
|
72
99
|
#
|
73
|
-
# Create
|
100
|
+
# Create new release in specified package.
|
74
101
|
# @param id_or_name numeric project id or project name
|
75
|
-
# @param
|
102
|
+
# @param package_id
|
103
|
+
# @param name Release name
|
76
104
|
# @param [Hash] opts the optional parameters
|
77
105
|
# @option opts [String] :visibility visibility status (public, hidden or private)
|
78
|
-
# @
|
79
|
-
|
80
|
-
|
106
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
107
|
+
# @option opts [String] :release_note Release note body text.
|
108
|
+
# @option opts [String] :change_log Changelog body text.
|
109
|
+
# @return [Release]
|
110
|
+
def create_release(id_or_name, package_id, name, opts = {})
|
111
|
+
data, _status_code, _headers = create_release_with_http_info(id_or_name, package_id, name, opts)
|
81
112
|
return data
|
82
113
|
end
|
83
114
|
|
84
115
|
#
|
85
|
-
# Create
|
116
|
+
# Create new release in specified package.
|
86
117
|
# @param id_or_name numeric project id or project name
|
87
|
-
# @param
|
118
|
+
# @param package_id
|
119
|
+
# @param name Release name
|
88
120
|
# @param [Hash] opts the optional parameters
|
89
121
|
# @option opts [String] :visibility visibility status (public, hidden or private)
|
90
|
-
# @
|
91
|
-
|
122
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
123
|
+
# @option opts [String] :release_note Release note body text.
|
124
|
+
# @option opts [String] :change_log Changelog body text.
|
125
|
+
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
126
|
+
def create_release_with_http_info(id_or_name, package_id, name, opts = {})
|
92
127
|
if @api_client.config.debugging
|
93
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
128
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.create_release ..."
|
94
129
|
end
|
95
|
-
|
96
130
|
# verify the required parameter 'id_or_name' is set
|
97
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
98
|
-
|
131
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.create_release" if id_or_name.nil?
|
132
|
+
# verify the required parameter 'package_id' is set
|
133
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.create_release" if package_id.nil?
|
99
134
|
# verify the required parameter 'name' is set
|
100
|
-
fail "Missing the required parameter 'name' when calling
|
101
|
-
|
135
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ProjectFrsApi.create_release" if name.nil?
|
102
136
|
# resource path
|
103
|
-
|
137
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
104
138
|
|
105
139
|
# query parameters
|
106
140
|
query_params = {}
|
@@ -109,66 +143,74 @@ module OSDNClient
|
|
109
143
|
header_params = {}
|
110
144
|
|
111
145
|
# HTTP header 'Accept' (if needed)
|
112
|
-
|
113
|
-
|
146
|
+
local_header_accept = []
|
147
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
114
148
|
|
115
149
|
# HTTP header 'Content-Type'
|
116
|
-
|
117
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
150
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
151
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
118
152
|
|
119
153
|
# form parameters
|
120
154
|
form_params = {}
|
121
155
|
form_params["name"] = name
|
122
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
156
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
157
|
+
form_params["time"] = opts[:'time'] if !opts[:'time'].nil?
|
158
|
+
form_params["release_note"] = opts[:'release_note'] if !opts[:'release_note'].nil?
|
159
|
+
form_params["change_log"] = opts[:'change_log'] if !opts[:'change_log'].nil?
|
123
160
|
|
124
161
|
# http body (model)
|
125
162
|
post_body = nil
|
126
|
-
|
127
|
-
|
128
|
-
auth_names = ['oauth2-implicit']
|
129
|
-
data, status_code, headers = @api_client.call_api(:POST, path,
|
163
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
164
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
130
165
|
:header_params => header_params,
|
131
166
|
:query_params => query_params,
|
132
167
|
:form_params => form_params,
|
133
168
|
:body => post_body,
|
134
169
|
:auth_names => auth_names,
|
135
|
-
:return_type => '
|
170
|
+
:return_type => 'Release')
|
136
171
|
if @api_client.config.debugging
|
137
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
172
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#create_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
138
173
|
end
|
139
174
|
return data, status_code, headers
|
140
175
|
end
|
141
176
|
|
142
177
|
#
|
143
|
-
#
|
178
|
+
# Create new file in target release.
|
144
179
|
# @param id_or_name numeric project id or project name
|
145
180
|
# @param package_id
|
181
|
+
# @param release_id
|
182
|
+
# @param file Upload file in \"multipart/form-data\".
|
146
183
|
# @param [Hash] opts the optional parameters
|
147
|
-
# @
|
148
|
-
|
149
|
-
|
184
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
185
|
+
# @return [RelFile]
|
186
|
+
def create_release_file(id_or_name, package_id, release_id, file, opts = {})
|
187
|
+
data, _status_code, _headers = create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts)
|
150
188
|
return data
|
151
189
|
end
|
152
190
|
|
153
191
|
#
|
154
|
-
#
|
192
|
+
# Create new file in target release.
|
155
193
|
# @param id_or_name numeric project id or project name
|
156
194
|
# @param package_id
|
195
|
+
# @param release_id
|
196
|
+
# @param file Upload file in \"multipart/form-data\".
|
157
197
|
# @param [Hash] opts the optional parameters
|
158
|
-
# @
|
159
|
-
|
198
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
199
|
+
# @return [Array<(RelFile, Fixnum, Hash)>] RelFile data, response status code and response headers
|
200
|
+
def create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts = {})
|
160
201
|
if @api_client.config.debugging
|
161
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
202
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.create_release_file ..."
|
162
203
|
end
|
163
|
-
|
164
204
|
# verify the required parameter 'id_or_name' is set
|
165
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
166
|
-
|
205
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.create_release_file" if id_or_name.nil?
|
167
206
|
# verify the required parameter 'package_id' is set
|
168
|
-
fail "Missing the required parameter 'package_id' when calling
|
169
|
-
|
207
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.create_release_file" if package_id.nil?
|
208
|
+
# verify the required parameter 'release_id' is set
|
209
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.create_release_file" if release_id.nil?
|
210
|
+
# verify the required parameter 'file' is set
|
211
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling ProjectFrsApi.create_release_file" if file.nil?
|
170
212
|
# resource path
|
171
|
-
|
213
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s)
|
172
214
|
|
173
215
|
# query parameters
|
174
216
|
query_params = {}
|
@@ -177,77 +219,61 @@ module OSDNClient
|
|
177
219
|
header_params = {}
|
178
220
|
|
179
221
|
# HTTP header 'Accept' (if needed)
|
180
|
-
|
181
|
-
|
222
|
+
local_header_accept = []
|
223
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
182
224
|
|
183
225
|
# HTTP header 'Content-Type'
|
184
|
-
|
185
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
226
|
+
local_header_content_type = ['multipart/form-data']
|
227
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
186
228
|
|
187
229
|
# form parameters
|
188
230
|
form_params = {}
|
231
|
+
form_params["file"] = file
|
232
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
189
233
|
|
190
234
|
# http body (model)
|
191
235
|
post_body = nil
|
192
|
-
|
193
|
-
|
194
|
-
auth_names = ['oauth2-implicit']
|
195
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
236
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
237
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
196
238
|
:header_params => header_params,
|
197
239
|
:query_params => query_params,
|
198
240
|
:form_params => form_params,
|
199
241
|
:body => post_body,
|
200
242
|
:auth_names => auth_names,
|
201
|
-
:return_type => '
|
243
|
+
:return_type => 'RelFile')
|
202
244
|
if @api_client.config.debugging
|
203
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
245
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#create_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
246
|
end
|
205
247
|
return data, status_code, headers
|
206
248
|
end
|
207
249
|
|
208
250
|
#
|
209
|
-
#
|
251
|
+
# Delete taret package.
|
210
252
|
# @param id_or_name numeric project id or project name
|
211
253
|
# @param package_id
|
212
|
-
# @param name Release name
|
213
254
|
# @param [Hash] opts the optional parameters
|
214
|
-
# @
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
# @return [Release]
|
219
|
-
def create_release(id_or_name, package_id, name, opts = {})
|
220
|
-
data, status_code, headers = create_release_with_http_info(id_or_name, package_id, name, opts)
|
221
|
-
return data
|
255
|
+
# @return [nil]
|
256
|
+
def delete_package(id_or_name, package_id, opts = {})
|
257
|
+
delete_package_with_http_info(id_or_name, package_id, opts)
|
258
|
+
return nil
|
222
259
|
end
|
223
260
|
|
224
261
|
#
|
225
|
-
#
|
262
|
+
# Delete taret package.
|
226
263
|
# @param id_or_name numeric project id or project name
|
227
264
|
# @param package_id
|
228
|
-
# @param name Release name
|
229
265
|
# @param [Hash] opts the optional parameters
|
230
|
-
# @
|
231
|
-
|
232
|
-
# @option opts [String] :release_note Release note body text.
|
233
|
-
# @option opts [String] :change_log Changelog body text.
|
234
|
-
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
235
|
-
def create_release_with_http_info(id_or_name, package_id, name, opts = {})
|
266
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
267
|
+
def delete_package_with_http_info(id_or_name, package_id, opts = {})
|
236
268
|
if @api_client.config.debugging
|
237
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
269
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.delete_package ..."
|
238
270
|
end
|
239
|
-
|
240
271
|
# verify the required parameter 'id_or_name' is set
|
241
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
242
|
-
|
272
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.delete_package" if id_or_name.nil?
|
243
273
|
# verify the required parameter 'package_id' is set
|
244
|
-
fail "Missing the required parameter 'package_id' when calling
|
245
|
-
|
246
|
-
# verify the required parameter 'name' is set
|
247
|
-
fail "Missing the required parameter 'name' when calling create_release" if name.nil?
|
248
|
-
|
274
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.delete_package" if package_id.nil?
|
249
275
|
# resource path
|
250
|
-
|
276
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
251
277
|
|
252
278
|
# query parameters
|
253
279
|
query_params = {}
|
@@ -256,69 +282,62 @@ module OSDNClient
|
|
256
282
|
header_params = {}
|
257
283
|
|
258
284
|
# HTTP header 'Accept' (if needed)
|
259
|
-
|
260
|
-
|
285
|
+
local_header_accept = []
|
286
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
261
287
|
|
262
288
|
# HTTP header 'Content-Type'
|
263
|
-
|
264
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
289
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
290
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
265
291
|
|
266
292
|
# form parameters
|
267
293
|
form_params = {}
|
268
|
-
form_params["name"] = name
|
269
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
270
|
-
form_params["time"] = opts[:'time'] if opts[:'time']
|
271
|
-
form_params["release_note"] = opts[:'release_note'] if opts[:'release_note']
|
272
|
-
form_params["change_log"] = opts[:'change_log'] if opts[:'change_log']
|
273
294
|
|
274
295
|
# http body (model)
|
275
296
|
post_body = nil
|
276
|
-
|
277
|
-
|
278
|
-
auth_names = ['oauth2-implicit']
|
279
|
-
data, status_code, headers = @api_client.call_api(:POST, path,
|
297
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
298
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
280
299
|
:header_params => header_params,
|
281
300
|
:query_params => query_params,
|
282
301
|
:form_params => form_params,
|
283
302
|
:body => post_body,
|
284
|
-
:auth_names => auth_names
|
285
|
-
:return_type => 'Release')
|
303
|
+
:auth_names => auth_names)
|
286
304
|
if @api_client.config.debugging
|
287
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
305
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#delete_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
288
306
|
end
|
289
307
|
return data, status_code, headers
|
290
308
|
end
|
291
309
|
|
292
310
|
#
|
293
|
-
# Delete
|
311
|
+
# Delete target release.
|
294
312
|
# @param id_or_name numeric project id or project name
|
295
313
|
# @param package_id
|
314
|
+
# @param release_id
|
296
315
|
# @param [Hash] opts the optional parameters
|
297
316
|
# @return [nil]
|
298
|
-
def
|
299
|
-
|
317
|
+
def delete_release(id_or_name, package_id, release_id, opts = {})
|
318
|
+
delete_release_with_http_info(id_or_name, package_id, release_id, opts)
|
300
319
|
return nil
|
301
320
|
end
|
302
321
|
|
303
322
|
#
|
304
|
-
# Delete
|
323
|
+
# Delete target release.
|
305
324
|
# @param id_or_name numeric project id or project name
|
306
325
|
# @param package_id
|
326
|
+
# @param release_id
|
307
327
|
# @param [Hash] opts the optional parameters
|
308
328
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
309
|
-
def
|
329
|
+
def delete_release_with_http_info(id_or_name, package_id, release_id, opts = {})
|
310
330
|
if @api_client.config.debugging
|
311
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
331
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.delete_release ..."
|
312
332
|
end
|
313
|
-
|
314
333
|
# verify the required parameter 'id_or_name' is set
|
315
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
316
|
-
|
334
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.delete_release" if id_or_name.nil?
|
317
335
|
# verify the required parameter 'package_id' is set
|
318
|
-
fail "Missing the required parameter 'package_id' when calling
|
319
|
-
|
336
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.delete_release" if package_id.nil?
|
337
|
+
# verify the required parameter 'release_id' is set
|
338
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.delete_release" if release_id.nil?
|
320
339
|
# resource path
|
321
|
-
|
340
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s)
|
322
341
|
|
323
342
|
# query parameters
|
324
343
|
query_params = {}
|
@@ -327,67 +346,66 @@ module OSDNClient
|
|
327
346
|
header_params = {}
|
328
347
|
|
329
348
|
# HTTP header 'Accept' (if needed)
|
330
|
-
|
331
|
-
|
349
|
+
local_header_accept = []
|
350
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
332
351
|
|
333
352
|
# HTTP header 'Content-Type'
|
334
|
-
|
335
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
353
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
354
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
336
355
|
|
337
356
|
# form parameters
|
338
357
|
form_params = {}
|
339
358
|
|
340
359
|
# http body (model)
|
341
360
|
post_body = nil
|
342
|
-
|
343
|
-
|
344
|
-
auth_names = ['oauth2-implicit']
|
345
|
-
data, status_code, headers = @api_client.call_api(:DELETE, path,
|
361
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
362
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
346
363
|
:header_params => header_params,
|
347
364
|
:query_params => query_params,
|
348
365
|
:form_params => form_params,
|
349
366
|
:body => post_body,
|
350
367
|
:auth_names => auth_names)
|
351
368
|
if @api_client.config.debugging
|
352
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
369
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#delete_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
353
370
|
end
|
354
371
|
return data, status_code, headers
|
355
372
|
end
|
356
373
|
|
357
374
|
#
|
358
|
-
#
|
375
|
+
# Delete target file.
|
359
376
|
# @param id_or_name numeric project id or project name
|
360
377
|
# @param package_id
|
378
|
+
# @param release_id
|
379
|
+
# @param file_id
|
361
380
|
# @param [Hash] opts the optional parameters
|
362
|
-
# @
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
data, status_code, headers = update_package_with_http_info(id_or_name, package_id, opts)
|
367
|
-
return data
|
381
|
+
# @return [nil]
|
382
|
+
def delete_release_file(id_or_name, package_id, release_id, file_id, opts = {})
|
383
|
+
delete_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
|
384
|
+
return nil
|
368
385
|
end
|
369
386
|
|
370
387
|
#
|
371
|
-
#
|
388
|
+
# Delete target file.
|
372
389
|
# @param id_or_name numeric project id or project name
|
373
390
|
# @param package_id
|
391
|
+
# @param release_id
|
392
|
+
# @param file_id
|
374
393
|
# @param [Hash] opts the optional parameters
|
375
|
-
# @
|
376
|
-
|
377
|
-
# @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers
|
378
|
-
def update_package_with_http_info(id_or_name, package_id, opts = {})
|
394
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
395
|
+
def delete_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
|
379
396
|
if @api_client.config.debugging
|
380
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
397
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.delete_release_file ..."
|
381
398
|
end
|
382
|
-
|
383
399
|
# verify the required parameter 'id_or_name' is set
|
384
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
385
|
-
|
400
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.delete_release_file" if id_or_name.nil?
|
386
401
|
# verify the required parameter 'package_id' is set
|
387
|
-
fail "Missing the required parameter 'package_id' when calling
|
388
|
-
|
402
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.delete_release_file" if package_id.nil?
|
403
|
+
# verify the required parameter 'release_id' is set
|
404
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.delete_release_file" if release_id.nil?
|
405
|
+
# verify the required parameter 'file_id' is set
|
406
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectFrsApi.delete_release_file" if file_id.nil?
|
389
407
|
# resource path
|
390
|
-
|
408
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}/{file_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s).sub('{' + 'file_id' + '}', file_id.to_s)
|
391
409
|
|
392
410
|
# query parameters
|
393
411
|
query_params = {}
|
@@ -396,32 +414,27 @@ module OSDNClient
|
|
396
414
|
header_params = {}
|
397
415
|
|
398
416
|
# HTTP header 'Accept' (if needed)
|
399
|
-
|
400
|
-
|
417
|
+
local_header_accept = []
|
418
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
401
419
|
|
402
420
|
# HTTP header 'Content-Type'
|
403
|
-
|
404
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
421
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
422
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
405
423
|
|
406
424
|
# form parameters
|
407
425
|
form_params = {}
|
408
|
-
form_params["name"] = opts[:'name'] if opts[:'name']
|
409
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
410
426
|
|
411
427
|
# http body (model)
|
412
428
|
post_body = nil
|
413
|
-
|
414
|
-
|
415
|
-
auth_names = ['oauth2-implicit']
|
416
|
-
data, status_code, headers = @api_client.call_api(:PATCH, path,
|
429
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
430
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
417
431
|
:header_params => header_params,
|
418
432
|
:query_params => query_params,
|
419
433
|
:form_params => form_params,
|
420
434
|
:body => post_body,
|
421
|
-
:auth_names => auth_names
|
422
|
-
:return_type => 'Package')
|
435
|
+
:auth_names => auth_names)
|
423
436
|
if @api_client.config.debugging
|
424
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
437
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#delete_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
425
438
|
end
|
426
439
|
return data, status_code, headers
|
427
440
|
end
|
@@ -433,7 +446,7 @@ module OSDNClient
|
|
433
446
|
# @param [Hash] opts the optional parameters
|
434
447
|
# @return [Release]
|
435
448
|
def draft_release(id_or_name, package_id, opts = {})
|
436
|
-
data,
|
449
|
+
data, _status_code, _headers = draft_release_with_http_info(id_or_name, package_id, opts)
|
437
450
|
return data
|
438
451
|
end
|
439
452
|
|
@@ -445,17 +458,14 @@ module OSDNClient
|
|
445
458
|
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
446
459
|
def draft_release_with_http_info(id_or_name, package_id, opts = {})
|
447
460
|
if @api_client.config.debugging
|
448
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
461
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.draft_release ..."
|
449
462
|
end
|
450
|
-
|
451
463
|
# verify the required parameter 'id_or_name' is set
|
452
|
-
fail "Missing the required parameter 'id_or_name' when calling draft_release" if id_or_name.nil?
|
453
|
-
|
464
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.draft_release" if id_or_name.nil?
|
454
465
|
# verify the required parameter 'package_id' is set
|
455
|
-
fail "Missing the required parameter 'package_id' when calling draft_release" if package_id.nil?
|
456
|
-
|
466
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.draft_release" if package_id.nil?
|
457
467
|
# resource path
|
458
|
-
|
468
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/draft".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
459
469
|
|
460
470
|
# query parameters
|
461
471
|
query_params = {}
|
@@ -464,22 +474,20 @@ module OSDNClient
|
|
464
474
|
header_params = {}
|
465
475
|
|
466
476
|
# HTTP header 'Accept' (if needed)
|
467
|
-
|
468
|
-
|
477
|
+
local_header_accept = []
|
478
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
469
479
|
|
470
480
|
# HTTP header 'Content-Type'
|
471
|
-
|
472
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
481
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
482
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
473
483
|
|
474
484
|
# form parameters
|
475
485
|
form_params = {}
|
476
486
|
|
477
487
|
# http body (model)
|
478
488
|
post_body = nil
|
479
|
-
|
480
|
-
|
481
|
-
auth_names = ['oauth2-implicit']
|
482
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
489
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
490
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
483
491
|
:header_params => header_params,
|
484
492
|
:query_params => query_params,
|
485
493
|
:form_params => form_params,
|
@@ -493,40 +501,32 @@ module OSDNClient
|
|
493
501
|
end
|
494
502
|
|
495
503
|
#
|
496
|
-
# Get specified
|
504
|
+
# Get specified package info and release list of the package.
|
497
505
|
# @param id_or_name numeric project id or project name
|
498
506
|
# @param package_id
|
499
|
-
# @param release_id
|
500
507
|
# @param [Hash] opts the optional parameters
|
501
|
-
# @return [
|
502
|
-
def
|
503
|
-
data,
|
508
|
+
# @return [Package]
|
509
|
+
def get_package(id_or_name, package_id, opts = {})
|
510
|
+
data, _status_code, _headers = get_package_with_http_info(id_or_name, package_id, opts)
|
504
511
|
return data
|
505
512
|
end
|
506
513
|
|
507
514
|
#
|
508
|
-
# Get specified
|
515
|
+
# Get specified package info and release list of the package.
|
509
516
|
# @param id_or_name numeric project id or project name
|
510
517
|
# @param package_id
|
511
|
-
# @param release_id
|
512
518
|
# @param [Hash] opts the optional parameters
|
513
|
-
# @return [Array<(
|
514
|
-
def
|
519
|
+
# @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers
|
520
|
+
def get_package_with_http_info(id_or_name, package_id, opts = {})
|
515
521
|
if @api_client.config.debugging
|
516
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
522
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.get_package ..."
|
517
523
|
end
|
518
|
-
|
519
524
|
# verify the required parameter 'id_or_name' is set
|
520
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
521
|
-
|
525
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.get_package" if id_or_name.nil?
|
522
526
|
# verify the required parameter 'package_id' is set
|
523
|
-
fail "Missing the required parameter 'package_id' when calling
|
524
|
-
|
525
|
-
# verify the required parameter 'release_id' is set
|
526
|
-
fail "Missing the required parameter 'release_id' when calling get_release" if release_id.nil?
|
527
|
-
|
527
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.get_package" if package_id.nil?
|
528
528
|
# resource path
|
529
|
-
|
529
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
530
530
|
|
531
531
|
# query parameters
|
532
532
|
query_params = {}
|
@@ -535,76 +535,63 @@ module OSDNClient
|
|
535
535
|
header_params = {}
|
536
536
|
|
537
537
|
# HTTP header 'Accept' (if needed)
|
538
|
-
|
539
|
-
|
538
|
+
local_header_accept = []
|
539
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
540
540
|
|
541
541
|
# HTTP header 'Content-Type'
|
542
|
-
|
543
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
542
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
543
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
544
544
|
|
545
545
|
# form parameters
|
546
546
|
form_params = {}
|
547
547
|
|
548
548
|
# http body (model)
|
549
549
|
post_body = nil
|
550
|
-
|
551
|
-
|
552
|
-
auth_names = ['oauth2-implicit']
|
553
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
550
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
551
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
554
552
|
:header_params => header_params,
|
555
553
|
:query_params => query_params,
|
556
554
|
:form_params => form_params,
|
557
555
|
:body => post_body,
|
558
556
|
:auth_names => auth_names,
|
559
|
-
:return_type => '
|
557
|
+
:return_type => 'Package')
|
560
558
|
if @api_client.config.debugging
|
561
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
559
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#get_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
562
560
|
end
|
563
561
|
return data, status_code, headers
|
564
562
|
end
|
565
563
|
|
566
564
|
#
|
567
|
-
#
|
565
|
+
# Get specified release info and file list of the release.
|
568
566
|
# @param id_or_name numeric project id or project name
|
569
567
|
# @param package_id
|
570
568
|
# @param release_id
|
571
|
-
# @param file Upload file in \"multipart/form-data\".
|
572
569
|
# @param [Hash] opts the optional parameters
|
573
|
-
# @
|
574
|
-
|
575
|
-
|
576
|
-
data, status_code, headers = create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts)
|
570
|
+
# @return [Release]
|
571
|
+
def get_release(id_or_name, package_id, release_id, opts = {})
|
572
|
+
data, _status_code, _headers = get_release_with_http_info(id_or_name, package_id, release_id, opts)
|
577
573
|
return data
|
578
574
|
end
|
579
575
|
|
580
576
|
#
|
581
|
-
#
|
577
|
+
# Get specified release info and file list of the release.
|
582
578
|
# @param id_or_name numeric project id or project name
|
583
579
|
# @param package_id
|
584
580
|
# @param release_id
|
585
|
-
# @param file Upload file in \"multipart/form-data\".
|
586
581
|
# @param [Hash] opts the optional parameters
|
587
|
-
# @
|
588
|
-
|
589
|
-
def create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts = {})
|
582
|
+
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
583
|
+
def get_release_with_http_info(id_or_name, package_id, release_id, opts = {})
|
590
584
|
if @api_client.config.debugging
|
591
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
585
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.get_release ..."
|
592
586
|
end
|
593
|
-
|
594
587
|
# verify the required parameter 'id_or_name' is set
|
595
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
596
|
-
|
588
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.get_release" if id_or_name.nil?
|
597
589
|
# verify the required parameter 'package_id' is set
|
598
|
-
fail "Missing the required parameter 'package_id' when calling
|
599
|
-
|
590
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.get_release" if package_id.nil?
|
600
591
|
# verify the required parameter 'release_id' is set
|
601
|
-
fail "Missing the required parameter 'release_id' when calling
|
602
|
-
|
603
|
-
# verify the required parameter 'file' is set
|
604
|
-
fail "Missing the required parameter 'file' when calling create_release_file" if file.nil?
|
605
|
-
|
592
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.get_release" if release_id.nil?
|
606
593
|
# resource path
|
607
|
-
|
594
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s)
|
608
595
|
|
609
596
|
# query parameters
|
610
597
|
query_params = {}
|
@@ -613,71 +600,67 @@ module OSDNClient
|
|
613
600
|
header_params = {}
|
614
601
|
|
615
602
|
# HTTP header 'Accept' (if needed)
|
616
|
-
|
617
|
-
|
603
|
+
local_header_accept = []
|
604
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
618
605
|
|
619
606
|
# HTTP header 'Content-Type'
|
620
|
-
|
621
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
607
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
608
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
622
609
|
|
623
610
|
# form parameters
|
624
611
|
form_params = {}
|
625
|
-
form_params["file"] = file
|
626
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
627
612
|
|
628
613
|
# http body (model)
|
629
614
|
post_body = nil
|
630
|
-
|
631
|
-
|
632
|
-
auth_names = ['oauth2-implicit']
|
633
|
-
data, status_code, headers = @api_client.call_api(:POST, path,
|
615
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
616
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
634
617
|
:header_params => header_params,
|
635
618
|
:query_params => query_params,
|
636
619
|
:form_params => form_params,
|
637
620
|
:body => post_body,
|
638
621
|
:auth_names => auth_names,
|
639
|
-
:return_type => '
|
622
|
+
:return_type => 'Release')
|
640
623
|
if @api_client.config.debugging
|
641
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
624
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#get_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
642
625
|
end
|
643
626
|
return data, status_code, headers
|
644
627
|
end
|
645
628
|
|
646
629
|
#
|
647
|
-
#
|
630
|
+
# Get single file object.
|
648
631
|
# @param id_or_name numeric project id or project name
|
649
632
|
# @param package_id
|
650
633
|
# @param release_id
|
634
|
+
# @param file_id
|
651
635
|
# @param [Hash] opts the optional parameters
|
652
|
-
# @return [
|
653
|
-
def
|
654
|
-
|
655
|
-
return
|
636
|
+
# @return [RelFile]
|
637
|
+
def get_release_file(id_or_name, package_id, release_id, file_id, opts = {})
|
638
|
+
data, _status_code, _headers = get_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
|
639
|
+
return data
|
656
640
|
end
|
657
641
|
|
658
642
|
#
|
659
|
-
#
|
643
|
+
# Get single file object.
|
660
644
|
# @param id_or_name numeric project id or project name
|
661
645
|
# @param package_id
|
662
646
|
# @param release_id
|
647
|
+
# @param file_id
|
663
648
|
# @param [Hash] opts the optional parameters
|
664
|
-
# @return [Array<(
|
665
|
-
def
|
649
|
+
# @return [Array<(RelFile, Fixnum, Hash)>] RelFile data, response status code and response headers
|
650
|
+
def get_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
|
666
651
|
if @api_client.config.debugging
|
667
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
652
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.get_release_file ..."
|
668
653
|
end
|
669
|
-
|
670
654
|
# verify the required parameter 'id_or_name' is set
|
671
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
672
|
-
|
655
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.get_release_file" if id_or_name.nil?
|
673
656
|
# verify the required parameter 'package_id' is set
|
674
|
-
fail "Missing the required parameter 'package_id' when calling
|
675
|
-
|
657
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.get_release_file" if package_id.nil?
|
676
658
|
# verify the required parameter 'release_id' is set
|
677
|
-
fail "Missing the required parameter 'release_id' when calling
|
678
|
-
|
659
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.get_release_file" if release_id.nil?
|
660
|
+
# verify the required parameter 'file_id' is set
|
661
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectFrsApi.get_release_file" if file_id.nil?
|
679
662
|
# resource path
|
680
|
-
|
663
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}/{file_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s).sub('{' + 'file_id' + '}', file_id.to_s)
|
681
664
|
|
682
665
|
# query parameters
|
683
666
|
query_params = {}
|
@@ -686,76 +669,55 @@ module OSDNClient
|
|
686
669
|
header_params = {}
|
687
670
|
|
688
671
|
# HTTP header 'Accept' (if needed)
|
689
|
-
|
690
|
-
|
672
|
+
local_header_accept = []
|
673
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
691
674
|
|
692
675
|
# HTTP header 'Content-Type'
|
693
|
-
|
694
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
676
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
677
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
695
678
|
|
696
679
|
# form parameters
|
697
680
|
form_params = {}
|
698
681
|
|
699
682
|
# http body (model)
|
700
683
|
post_body = nil
|
701
|
-
|
702
|
-
|
703
|
-
auth_names = ['oauth2-implicit']
|
704
|
-
data, status_code, headers = @api_client.call_api(:DELETE, path,
|
684
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
685
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
705
686
|
:header_params => header_params,
|
706
687
|
:query_params => query_params,
|
707
688
|
:form_params => form_params,
|
708
689
|
:body => post_body,
|
709
|
-
:auth_names => auth_names
|
690
|
+
:auth_names => auth_names,
|
691
|
+
:return_type => 'RelFile')
|
710
692
|
if @api_client.config.debugging
|
711
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
693
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#get_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
712
694
|
end
|
713
695
|
return data, status_code, headers
|
714
696
|
end
|
715
697
|
|
716
698
|
#
|
717
|
-
#
|
699
|
+
# Get package list of specified project.
|
718
700
|
# @param id_or_name numeric project id or project name
|
719
|
-
# @param package_id
|
720
|
-
# @param release_id
|
721
701
|
# @param [Hash] opts the optional parameters
|
722
|
-
# @
|
723
|
-
|
724
|
-
|
725
|
-
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
726
|
-
# @return [Release]
|
727
|
-
def update_release(id_or_name, package_id, release_id, opts = {})
|
728
|
-
data, status_code, headers = update_release_with_http_info(id_or_name, package_id, release_id, opts)
|
702
|
+
# @return [Array<Package>]
|
703
|
+
def list_packages(id_or_name, opts = {})
|
704
|
+
data, _status_code, _headers = list_packages_with_http_info(id_or_name, opts)
|
729
705
|
return data
|
730
706
|
end
|
731
707
|
|
732
708
|
#
|
733
|
-
#
|
709
|
+
# Get package list of specified project.
|
734
710
|
# @param id_or_name numeric project id or project name
|
735
|
-
# @param package_id
|
736
|
-
# @param release_id
|
737
711
|
# @param [Hash] opts the optional parameters
|
738
|
-
# @
|
739
|
-
|
740
|
-
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
741
|
-
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
742
|
-
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
743
|
-
def update_release_with_http_info(id_or_name, package_id, release_id, opts = {})
|
712
|
+
# @return [Array<(Array<Package>, Fixnum, Hash)>] Array<Package> data, response status code and response headers
|
713
|
+
def list_packages_with_http_info(id_or_name, opts = {})
|
744
714
|
if @api_client.config.debugging
|
745
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
715
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.list_packages ..."
|
746
716
|
end
|
747
|
-
|
748
717
|
# verify the required parameter 'id_or_name' is set
|
749
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
750
|
-
|
751
|
-
# verify the required parameter 'package_id' is set
|
752
|
-
fail "Missing the required parameter 'package_id' when calling update_release" if package_id.nil?
|
753
|
-
|
754
|
-
# verify the required parameter 'release_id' is set
|
755
|
-
fail "Missing the required parameter 'release_id' when calling update_release" if release_id.nil?
|
756
|
-
|
718
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.list_packages" if id_or_name.nil?
|
757
719
|
# resource path
|
758
|
-
|
720
|
+
local_var_path = "/project/{id_or_name}/frs".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
|
759
721
|
|
760
722
|
# query parameters
|
761
723
|
query_params = {}
|
@@ -764,78 +726,63 @@ module OSDNClient
|
|
764
726
|
header_params = {}
|
765
727
|
|
766
728
|
# HTTP header 'Accept' (if needed)
|
767
|
-
|
768
|
-
|
729
|
+
local_header_accept = []
|
730
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
769
731
|
|
770
732
|
# HTTP header 'Content-Type'
|
771
|
-
|
772
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
733
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
734
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
773
735
|
|
774
736
|
# form parameters
|
775
737
|
form_params = {}
|
776
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
777
|
-
form_params["name"] = opts[:'name'] if opts[:'name']
|
778
|
-
form_params["time"] = opts[:'time'] if opts[:'time']
|
779
|
-
form_params["move_to_package_id"] = opts[:'move_to_package_id'] if opts[:'move_to_package_id']
|
780
738
|
|
781
739
|
# http body (model)
|
782
740
|
post_body = nil
|
783
|
-
|
784
|
-
|
785
|
-
auth_names = ['oauth2-implicit']
|
786
|
-
data, status_code, headers = @api_client.call_api(:PATCH, path,
|
741
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
742
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
787
743
|
:header_params => header_params,
|
788
744
|
:query_params => query_params,
|
789
745
|
:form_params => form_params,
|
790
746
|
:body => post_body,
|
791
747
|
:auth_names => auth_names,
|
792
|
-
:return_type => '
|
748
|
+
:return_type => 'Array<Package>')
|
793
749
|
if @api_client.config.debugging
|
794
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
750
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#list_packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
795
751
|
end
|
796
752
|
return data, status_code, headers
|
797
753
|
end
|
798
754
|
|
799
755
|
#
|
800
|
-
#
|
756
|
+
# Update tagret package.
|
801
757
|
# @param id_or_name numeric project id or project name
|
802
758
|
# @param package_id
|
803
|
-
# @param release_id
|
804
|
-
# @param file_id
|
805
759
|
# @param [Hash] opts the optional parameters
|
806
|
-
# @
|
807
|
-
|
808
|
-
|
760
|
+
# @option opts [String] :name package name
|
761
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
762
|
+
# @return [Package]
|
763
|
+
def update_package(id_or_name, package_id, opts = {})
|
764
|
+
data, _status_code, _headers = update_package_with_http_info(id_or_name, package_id, opts)
|
809
765
|
return data
|
810
766
|
end
|
811
767
|
|
812
768
|
#
|
813
|
-
#
|
769
|
+
# Update tagret package.
|
814
770
|
# @param id_or_name numeric project id or project name
|
815
771
|
# @param package_id
|
816
|
-
# @param release_id
|
817
|
-
# @param file_id
|
818
772
|
# @param [Hash] opts the optional parameters
|
819
|
-
# @
|
820
|
-
|
773
|
+
# @option opts [String] :name package name
|
774
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
775
|
+
# @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers
|
776
|
+
def update_package_with_http_info(id_or_name, package_id, opts = {})
|
821
777
|
if @api_client.config.debugging
|
822
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
778
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.update_package ..."
|
823
779
|
end
|
824
|
-
|
825
780
|
# verify the required parameter 'id_or_name' is set
|
826
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
827
|
-
|
781
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.update_package" if id_or_name.nil?
|
828
782
|
# verify the required parameter 'package_id' is set
|
829
|
-
fail "Missing the required parameter 'package_id' when calling
|
830
|
-
|
831
|
-
# verify the required parameter 'release_id' is set
|
832
|
-
fail "Missing the required parameter 'release_id' when calling get_release_file" if release_id.nil?
|
833
|
-
|
834
|
-
# verify the required parameter 'file_id' is set
|
835
|
-
fail "Missing the required parameter 'file_id' when calling get_release_file" if file_id.nil?
|
836
|
-
|
783
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.update_package" if package_id.nil?
|
837
784
|
# resource path
|
838
|
-
|
785
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s)
|
839
786
|
|
840
787
|
# query parameters
|
841
788
|
query_params = {}
|
@@ -844,74 +791,73 @@ module OSDNClient
|
|
844
791
|
header_params = {}
|
845
792
|
|
846
793
|
# HTTP header 'Accept' (if needed)
|
847
|
-
|
848
|
-
|
794
|
+
local_header_accept = []
|
795
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
849
796
|
|
850
797
|
# HTTP header 'Content-Type'
|
851
|
-
|
852
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
798
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
799
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
853
800
|
|
854
801
|
# form parameters
|
855
802
|
form_params = {}
|
803
|
+
form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
|
804
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
856
805
|
|
857
806
|
# http body (model)
|
858
807
|
post_body = nil
|
859
|
-
|
860
|
-
|
861
|
-
auth_names = ['oauth2-implicit']
|
862
|
-
data, status_code, headers = @api_client.call_api(:GET, path,
|
808
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
809
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
863
810
|
:header_params => header_params,
|
864
811
|
:query_params => query_params,
|
865
812
|
:form_params => form_params,
|
866
813
|
:body => post_body,
|
867
814
|
:auth_names => auth_names,
|
868
|
-
:return_type => '
|
815
|
+
:return_type => 'Package')
|
869
816
|
if @api_client.config.debugging
|
870
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
817
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#update_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
871
818
|
end
|
872
819
|
return data, status_code, headers
|
873
820
|
end
|
874
821
|
|
875
822
|
#
|
876
|
-
#
|
823
|
+
# Update target release. (Note: If you update draft release, the release will be public automatically.)
|
877
824
|
# @param id_or_name numeric project id or project name
|
878
825
|
# @param package_id
|
879
826
|
# @param release_id
|
880
|
-
# @param file_id
|
881
827
|
# @param [Hash] opts the optional parameters
|
882
|
-
# @
|
883
|
-
|
884
|
-
|
885
|
-
|
828
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
829
|
+
# @option opts [String] :name Release name
|
830
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
831
|
+
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
832
|
+
# @return [Release]
|
833
|
+
def update_release(id_or_name, package_id, release_id, opts = {})
|
834
|
+
data, _status_code, _headers = update_release_with_http_info(id_or_name, package_id, release_id, opts)
|
835
|
+
return data
|
886
836
|
end
|
887
837
|
|
888
838
|
#
|
889
|
-
#
|
839
|
+
# Update target release. (Note: If you update draft release, the release will be public automatically.)
|
890
840
|
# @param id_or_name numeric project id or project name
|
891
841
|
# @param package_id
|
892
842
|
# @param release_id
|
893
|
-
# @param file_id
|
894
843
|
# @param [Hash] opts the optional parameters
|
895
|
-
# @
|
896
|
-
|
844
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
845
|
+
# @option opts [String] :name Release name
|
846
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
847
|
+
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
848
|
+
# @return [Array<(Release, Fixnum, Hash)>] Release data, response status code and response headers
|
849
|
+
def update_release_with_http_info(id_or_name, package_id, release_id, opts = {})
|
897
850
|
if @api_client.config.debugging
|
898
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
851
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.update_release ..."
|
899
852
|
end
|
900
|
-
|
901
853
|
# verify the required parameter 'id_or_name' is set
|
902
|
-
fail "Missing the required parameter 'id_or_name' when calling
|
903
|
-
|
854
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.update_release" if id_or_name.nil?
|
904
855
|
# verify the required parameter 'package_id' is set
|
905
|
-
fail "Missing the required parameter 'package_id' when calling
|
906
|
-
|
856
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.update_release" if package_id.nil?
|
907
857
|
# verify the required parameter 'release_id' is set
|
908
|
-
fail "Missing the required parameter 'release_id' when calling
|
909
|
-
|
910
|
-
# verify the required parameter 'file_id' is set
|
911
|
-
fail "Missing the required parameter 'file_id' when calling delete_release_file" if file_id.nil?
|
912
|
-
|
858
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.update_release" if release_id.nil?
|
913
859
|
# resource path
|
914
|
-
|
860
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s)
|
915
861
|
|
916
862
|
# query parameters
|
917
863
|
query_params = {}
|
@@ -920,29 +866,32 @@ module OSDNClient
|
|
920
866
|
header_params = {}
|
921
867
|
|
922
868
|
# HTTP header 'Accept' (if needed)
|
923
|
-
|
924
|
-
|
869
|
+
local_header_accept = []
|
870
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
925
871
|
|
926
872
|
# HTTP header 'Content-Type'
|
927
|
-
|
928
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
873
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
874
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
929
875
|
|
930
876
|
# form parameters
|
931
877
|
form_params = {}
|
878
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
879
|
+
form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
|
880
|
+
form_params["time"] = opts[:'time'] if !opts[:'time'].nil?
|
881
|
+
form_params["move_to_package_id"] = opts[:'move_to_package_id'] if !opts[:'move_to_package_id'].nil?
|
932
882
|
|
933
883
|
# http body (model)
|
934
884
|
post_body = nil
|
935
|
-
|
936
|
-
|
937
|
-
auth_names = ['oauth2-implicit']
|
938
|
-
data, status_code, headers = @api_client.call_api(:DELETE, path,
|
885
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
886
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
939
887
|
:header_params => header_params,
|
940
888
|
:query_params => query_params,
|
941
889
|
:form_params => form_params,
|
942
890
|
:body => post_body,
|
943
|
-
:auth_names => auth_names
|
891
|
+
:auth_names => auth_names,
|
892
|
+
:return_type => 'Release')
|
944
893
|
if @api_client.config.debugging
|
945
|
-
@api_client.config.logger.debug "API called: ProjectFrsApi#
|
894
|
+
@api_client.config.logger.debug "API called: ProjectFrsApi#update_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
946
895
|
end
|
947
896
|
return data, status_code, headers
|
948
897
|
end
|
@@ -957,7 +906,7 @@ module OSDNClient
|
|
957
906
|
# @option opts [String] :visibility visibility status (public, hidden or private)
|
958
907
|
# @return [RelFile]
|
959
908
|
def update_release_file(id_or_name, package_id, release_id, file_id, opts = {})
|
960
|
-
data,
|
909
|
+
data, _status_code, _headers = update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
|
961
910
|
return data
|
962
911
|
end
|
963
912
|
|
@@ -972,23 +921,18 @@ module OSDNClient
|
|
972
921
|
# @return [Array<(RelFile, Fixnum, Hash)>] RelFile data, response status code and response headers
|
973
922
|
def update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
|
974
923
|
if @api_client.config.debugging
|
975
|
-
@api_client.config.logger.debug "Calling API: ProjectFrsApi
|
924
|
+
@api_client.config.logger.debug "Calling API: ProjectFrsApi.update_release_file ..."
|
976
925
|
end
|
977
|
-
|
978
926
|
# verify the required parameter 'id_or_name' is set
|
979
|
-
fail "Missing the required parameter 'id_or_name' when calling update_release_file" if id_or_name.nil?
|
980
|
-
|
927
|
+
fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.update_release_file" if id_or_name.nil?
|
981
928
|
# verify the required parameter 'package_id' is set
|
982
|
-
fail "Missing the required parameter 'package_id' when calling update_release_file" if package_id.nil?
|
983
|
-
|
929
|
+
fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.update_release_file" if package_id.nil?
|
984
930
|
# verify the required parameter 'release_id' is set
|
985
|
-
fail "Missing the required parameter 'release_id' when calling update_release_file" if release_id.nil?
|
986
|
-
|
931
|
+
fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.update_release_file" if release_id.nil?
|
987
932
|
# verify the required parameter 'file_id' is set
|
988
|
-
fail "Missing the required parameter 'file_id' when calling update_release_file" if file_id.nil?
|
989
|
-
|
933
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectFrsApi.update_release_file" if file_id.nil?
|
990
934
|
# resource path
|
991
|
-
|
935
|
+
local_var_path = "/project/{id_or_name}/frs/{package_id}/{release_id}/{file_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'package_id' + '}', package_id.to_s).sub('{' + 'release_id' + '}', release_id.to_s).sub('{' + 'file_id' + '}', file_id.to_s)
|
992
936
|
|
993
937
|
# query parameters
|
994
938
|
query_params = {}
|
@@ -997,23 +941,21 @@ module OSDNClient
|
|
997
941
|
header_params = {}
|
998
942
|
|
999
943
|
# HTTP header 'Accept' (if needed)
|
1000
|
-
|
1001
|
-
|
944
|
+
local_header_accept = []
|
945
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
1002
946
|
|
1003
947
|
# HTTP header 'Content-Type'
|
1004
|
-
|
1005
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
948
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
949
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
1006
950
|
|
1007
951
|
# form parameters
|
1008
952
|
form_params = {}
|
1009
|
-
form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']
|
953
|
+
form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
|
1010
954
|
|
1011
955
|
# http body (model)
|
1012
956
|
post_body = nil
|
1013
|
-
|
1014
|
-
|
1015
|
-
auth_names = ['oauth2-implicit']
|
1016
|
-
data, status_code, headers = @api_client.call_api(:PATCH, path,
|
957
|
+
auth_names = ['oauth2-code', 'oauth2-implicit']
|
958
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1017
959
|
:header_params => header_params,
|
1018
960
|
:query_params => query_params,
|
1019
961
|
:form_params => form_params,
|
@@ -1027,7 +969,3 @@ module OSDNClient
|
|
1027
969
|
end
|
1028
970
|
end
|
1029
971
|
end
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|