osdn-client 0.0.20160304

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