Class: OSDNClient::ProjectFrsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/osdn-client/api/project_frs_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProjectFrsApi

Returns a new instance of ProjectFrsApi.



30
31
32
# File 'lib/osdn-client/api/project_frs_api.rb', line 30

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



28
29
30
# File 'lib/osdn-client/api/project_frs_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#create_package(id_or_name, name, opts = {}) ⇒ Package

Create a package.

Parameters:

  • id_or_name

    numeric project id or project name

  • name

    package name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

Returns:



41
42
43
44
# File 'lib/osdn-client/api/project_frs_api.rb', line 41

def create_package(id_or_name, name, opts = {})
  data, _status_code, _headers = create_package_with_http_info(id_or_name, name, opts)
  return data
end

#create_package_with_http_info(id_or_name, name, opts = {}) ⇒ Array<(Package, Fixnum, Hash)>

Create a package.

Parameters:

  • id_or_name

    numeric project id or project name

  • name

    package name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

Returns:

  • (Array<(Package, Fixnum, Hash)>)

    Package data, response status code and response headers



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/osdn-client/api/project_frs_api.rb', line 53

def create_package_with_http_info(id_or_name, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.create_package ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.create_package" if id_or_name.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling ProjectFrsApi.create_package" if name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/frs".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["name"] = name
  form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Package')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#create_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_release(id_or_name, package_id, name, opts = {}) ⇒ Release

Create new release in specified package.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • name

    Release name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

  • :time (DateTime)

    Release datetime. If you set future time, the release hide until specified time.

  • :release_note (String)

    Release note body text.

  • :change_log (String)

    Changelog body text.

Returns:



110
111
112
113
# File 'lib/osdn-client/api/project_frs_api.rb', line 110

def create_release(id_or_name, package_id, name, opts = {})
  data, _status_code, _headers = create_release_with_http_info(id_or_name, package_id, name, opts)
  return data
end

#create_release_file(id_or_name, package_id, release_id, file, opts = {}) ⇒ RelFile

Create new file in target release.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • file

    Upload file in &quot;multipart/form-data&quot;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

Returns:



186
187
188
189
# File 'lib/osdn-client/api/project_frs_api.rb', line 186

def create_release_file(id_or_name, package_id, release_id, file, opts = {})
  data, _status_code, _headers = create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts)
  return data
end

#create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts = {}) ⇒ Array<(RelFile, Fixnum, Hash)>

Create new file in target release.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • file

    Upload file in &quot;multipart/form-data&quot;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

Returns:

  • (Array<(RelFile, Fixnum, Hash)>)

    RelFile data, response status code and response headers



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/osdn-client/api/project_frs_api.rb', line 200

def create_release_file_with_http_info(id_or_name, package_id, release_id, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.create_release_file ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.create_release_file" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.create_release_file" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.create_release_file" if release_id.nil?
  # verify the required parameter 'file' is set
  fail ArgumentError, "Missing the required parameter 'file' when calling ProjectFrsApi.create_release_file" if file.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['multipart/form-data']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["file"] = file
  form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RelFile')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#create_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_release_with_http_info(id_or_name, package_id, name, opts = {}) ⇒ Array<(Release, Fixnum, Hash)>

Create new release in specified package.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • name

    Release name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

  • :time (DateTime)

    Release datetime. If you set future time, the release hide until specified time.

  • :release_note (String)

    Release note body text.

  • :change_log (String)

    Changelog body text.

Returns:

  • (Array<(Release, Fixnum, Hash)>)

    Release data, response status code and response headers



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/osdn-client/api/project_frs_api.rb', line 126

def create_release_with_http_info(id_or_name, package_id, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.create_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.create_release" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.create_release" if package_id.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling ProjectFrsApi.create_release" if name.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["name"] = name
  form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
  form_params["time"] = opts[:'time'] if !opts[:'time'].nil?
  form_params["release_note"] = opts[:'release_note'] if !opts[:'release_note'].nil?
  form_params["change_log"] = opts[:'change_log'] if !opts[:'change_log'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Release')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#create_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_package(id_or_name, package_id, opts = {}) ⇒ nil

Delete taret package.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


256
257
258
259
# File 'lib/osdn-client/api/project_frs_api.rb', line 256

def delete_package(id_or_name, package_id, opts = {})
  delete_package_with_http_info(id_or_name, package_id, opts)
  return nil
end

#delete_package_with_http_info(id_or_name, package_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete taret package.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/osdn-client/api/project_frs_api.rb', line 267

def delete_package_with_http_info(id_or_name, package_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.delete_package ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.delete_package" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.delete_package" if package_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#delete_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_release(id_or_name, package_id, release_id, opts = {}) ⇒ nil

Delete target release.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


317
318
319
320
# File 'lib/osdn-client/api/project_frs_api.rb', line 317

def delete_release(id_or_name, package_id, release_id, opts = {})
  delete_release_with_http_info(id_or_name, package_id, release_id, opts)
  return nil
end

#delete_release_file(id_or_name, package_id, release_id, file_id, opts = {}) ⇒ nil

Delete target file.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • file_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


382
383
384
385
# File 'lib/osdn-client/api/project_frs_api.rb', line 382

def delete_release_file(id_or_name, package_id, release_id, file_id, opts = {})
  delete_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
  return nil
end

#delete_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete target file.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • file_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/osdn-client/api/project_frs_api.rb', line 395

def delete_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.delete_release_file ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.delete_release_file" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.delete_release_file" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.delete_release_file" if release_id.nil?
  # verify the required parameter 'file_id' is set
  fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectFrsApi.delete_release_file" if file_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#delete_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_release_with_http_info(id_or_name, package_id, release_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete target release.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/osdn-client/api/project_frs_api.rb', line 329

def delete_release_with_http_info(id_or_name, package_id, release_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.delete_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.delete_release" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.delete_release" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.delete_release" if release_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#delete_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#draft_release(id_or_name, package_id, opts = {}) ⇒ Release

Get release draft in specified package. If draft is not exist, it will be created automatically.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



448
449
450
451
# File 'lib/osdn-client/api/project_frs_api.rb', line 448

def draft_release(id_or_name, package_id, opts = {})
  data, _status_code, _headers = draft_release_with_http_info(id_or_name, package_id, opts)
  return data
end

#draft_release_with_http_info(id_or_name, package_id, opts = {}) ⇒ Array<(Release, Fixnum, Hash)>

Get release draft in specified package. If draft is not exist, it will be created automatically.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Release, Fixnum, Hash)>)

    Release data, response status code and response headers



459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/osdn-client/api/project_frs_api.rb', line 459

def draft_release_with_http_info(id_or_name, package_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.draft_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.draft_release" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.draft_release" if package_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Release')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#draft_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_frs_adminprefs(id_or_name, opts = {}) ⇒ FrsAdminPrefs

Get project frs admin preferences.

Parameters:

  • id_or_name

    numeric project id or project name

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



508
509
510
511
# File 'lib/osdn-client/api/project_frs_api.rb', line 508

def get_frs_adminprefs(id_or_name, opts = {})
  data, _status_code, _headers = get_frs_adminprefs_with_http_info(id_or_name, opts)
  return data
end

#get_frs_adminprefs_with_http_info(id_or_name, opts = {}) ⇒ Array<(FrsAdminPrefs, Fixnum, Hash)>

Get project frs admin preferences.

Parameters:

  • id_or_name

    numeric project id or project name

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FrsAdminPrefs, Fixnum, Hash)>)

    FrsAdminPrefs data, response status code and response headers



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# File 'lib/osdn-client/api/project_frs_api.rb', line 518

def get_frs_adminprefs_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.get_frs_adminprefs ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.get_frs_adminprefs" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/frs/admin".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FrsAdminPrefs')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#get_frs_adminprefs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_package(id_or_name, package_id, opts = {}) ⇒ Package

Get specified package info and release list of the package.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



566
567
568
569
# File 'lib/osdn-client/api/project_frs_api.rb', line 566

def get_package(id_or_name, package_id, opts = {})
  data, _status_code, _headers = get_package_with_http_info(id_or_name, package_id, opts)
  return data
end

#get_package_with_http_info(id_or_name, package_id, opts = {}) ⇒ Array<(Package, Fixnum, Hash)>

Get specified package info and release list of the package.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Package, Fixnum, Hash)>)

    Package data, response status code and response headers



577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/osdn-client/api/project_frs_api.rb', line 577

def get_package_with_http_info(id_or_name, package_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.get_package ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.get_package" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.get_package" if package_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Package')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#get_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_release(id_or_name, package_id, release_id, opts = {}) ⇒ Release

Get specified release info and file list of the release.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



628
629
630
631
# File 'lib/osdn-client/api/project_frs_api.rb', line 628

def get_release(id_or_name, package_id, release_id, opts = {})
  data, _status_code, _headers = get_release_with_http_info(id_or_name, package_id, release_id, opts)
  return data
end

#get_release_file(id_or_name, package_id, release_id, file_id, opts = {}) ⇒ RelFile

Get single file object.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • file_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



694
695
696
697
# File 'lib/osdn-client/api/project_frs_api.rb', line 694

def get_release_file(id_or_name, package_id, release_id, file_id, opts = {})
  data, _status_code, _headers = get_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
  return data
end

#get_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {}) ⇒ Array<(RelFile, Fixnum, Hash)>

Get single file object.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • file_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RelFile, Fixnum, Hash)>)

    RelFile data, response status code and response headers



707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
# File 'lib/osdn-client/api/project_frs_api.rb', line 707

def get_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.get_release_file ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.get_release_file" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.get_release_file" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.get_release_file" if release_id.nil?
  # verify the required parameter 'file_id' is set
  fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectFrsApi.get_release_file" if file_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RelFile')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#get_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_release_with_http_info(id_or_name, package_id, release_id, opts = {}) ⇒ Array<(Release, Fixnum, Hash)>

Get specified release info and file list of the release.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Release, Fixnum, Hash)>)

    Release data, response status code and response headers



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/osdn-client/api/project_frs_api.rb', line 640

def get_release_with_http_info(id_or_name, package_id, release_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.get_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.get_release" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.get_release" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.get_release" if release_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Release')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#get_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_packages(id_or_name, opts = {}) ⇒ Array<Package>

Get package list of specified project.

Parameters:

  • id_or_name

    numeric project id or project name

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



760
761
762
763
# File 'lib/osdn-client/api/project_frs_api.rb', line 760

def list_packages(id_or_name, opts = {})
  data, _status_code, _headers = list_packages_with_http_info(id_or_name, opts)
  return data
end

#list_packages_with_http_info(id_or_name, opts = {}) ⇒ Array<(Array<Package>, Fixnum, Hash)>

Get package list of specified project.

Parameters:

  • id_or_name

    numeric project id or project name

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<Package>, Fixnum, Hash)>)

    Array<Package> data, response status code and response headers



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
# File 'lib/osdn-client/api/project_frs_api.rb', line 770

def list_packages_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.list_packages ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.list_packages" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/frs".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Package>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#list_packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_frs_adminprefs(id_or_name, opts = {}) ⇒ FrsAdminPrefs

Update project frs admin preferences.

Parameters:

  • id_or_name

    numeric project id or project name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :allow_overwrite (BOOLEAN)

    Allow overwrite files when filenames are conflict

Returns:



818
819
820
821
# File 'lib/osdn-client/api/project_frs_api.rb', line 818

def update_frs_adminprefs(id_or_name, opts = {})
  data, _status_code, _headers = update_frs_adminprefs_with_http_info(id_or_name, opts)
  return data
end

#update_frs_adminprefs_with_http_info(id_or_name, opts = {}) ⇒ Array<(FrsAdminPrefs, Fixnum, Hash)>

Update project frs admin preferences.

Parameters:

  • id_or_name

    numeric project id or project name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :allow_overwrite (BOOLEAN)

    Allow overwrite files when filenames are conflict

Returns:

  • (Array<(FrsAdminPrefs, Fixnum, Hash)>)

    FrsAdminPrefs data, response status code and response headers



829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
# File 'lib/osdn-client/api/project_frs_api.rb', line 829

def update_frs_adminprefs_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.update_frs_adminprefs ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.update_frs_adminprefs" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/frs/admin".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["allow_overwrite"] = opts[:'allow_overwrite'] if !opts[:'allow_overwrite'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FrsAdminPrefs')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#update_frs_adminprefs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_package(id_or_name, package_id, opts = {}) ⇒ Package

Update tagret package.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :name (String)

    package name

  • :visibility (String)

    visibility status (public, hidden or private)

Returns:



880
881
882
883
# File 'lib/osdn-client/api/project_frs_api.rb', line 880

def update_package(id_or_name, package_id, opts = {})
  data, _status_code, _headers = update_package_with_http_info(id_or_name, package_id, opts)
  return data
end

#update_package_with_http_info(id_or_name, package_id, opts = {}) ⇒ Array<(Package, Fixnum, Hash)>

Update tagret package.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :name (String)

    package name

  • :visibility (String)

    visibility status (public, hidden or private)

Returns:

  • (Array<(Package, Fixnum, Hash)>)

    Package data, response status code and response headers



893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
# File 'lib/osdn-client/api/project_frs_api.rb', line 893

def update_package_with_http_info(id_or_name, package_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.update_package ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.update_package" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.update_package" if package_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
  form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Package')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#update_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_release(id_or_name, package_id, release_id, opts = {}) ⇒ Release

Update target release. (Note: If you update draft release, the release will be public automatically.)

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

  • :name (String)

    Release name

  • :time (DateTime)

    Release datetime. If you set future time, the release hide until specified time.

  • :move_to_package_id (Integer)

    If this parameter is specified, the release move to another package.

Returns:



950
951
952
953
# File 'lib/osdn-client/api/project_frs_api.rb', line 950

def update_release(id_or_name, package_id, release_id, opts = {})
  data, _status_code, _headers = update_release_with_http_info(id_or_name, package_id, release_id, opts)
  return data
end

#update_release_file(id_or_name, package_id, release_id, file_id, opts = {}) ⇒ RelFile

Change visibility of target file.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • file_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

Returns:



1025
1026
1027
1028
# File 'lib/osdn-client/api/project_frs_api.rb', line 1025

def update_release_file(id_or_name, package_id, release_id, file_id, opts = {})
  data, _status_code, _headers = update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts)
  return data
end

#update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {}) ⇒ Array<(RelFile, Fixnum, Hash)>

Change visibility of target file.

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • file_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

Returns:

  • (Array<(RelFile, Fixnum, Hash)>)

    RelFile data, response status code and response headers



1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
# File 'lib/osdn-client/api/project_frs_api.rb', line 1039

def update_release_file_with_http_info(id_or_name, package_id, release_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.update_release_file ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.update_release_file" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.update_release_file" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.update_release_file" if release_id.nil?
  # verify the required parameter 'file_id' is set
  fail ArgumentError, "Missing the required parameter 'file_id' when calling ProjectFrsApi.update_release_file" if file_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RelFile')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#update_release_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_release_with_http_info(id_or_name, package_id, release_id, opts = {}) ⇒ Array<(Release, Fixnum, Hash)>

Update target release. (Note: If you update draft release, the release will be public automatically.)

Parameters:

  • id_or_name

    numeric project id or project name

  • package_id
  • release_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :visibility (String)

    visibility status (public, hidden or private)

  • :name (String)

    Release name

  • :time (DateTime)

    Release datetime. If you set future time, the release hide until specified time.

  • :move_to_package_id (Integer)

    If this parameter is specified, the release move to another package.

Returns:

  • (Array<(Release, Fixnum, Hash)>)

    Release data, response status code and response headers



966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/osdn-client/api/project_frs_api.rb', line 966

def update_release_with_http_info(id_or_name, package_id, release_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectFrsApi.update_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectFrsApi.update_release" if id_or_name.nil?
  # verify the required parameter 'package_id' is set
  fail ArgumentError, "Missing the required parameter 'package_id' when calling ProjectFrsApi.update_release" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectFrsApi.update_release" if release_id.nil?
  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["visibility"] = opts[:'visibility'] if !opts[:'visibility'].nil?
  form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
  form_params["time"] = opts[:'time'] if !opts[:'time'].nil?
  form_params["move_to_package_id"] = opts[:'move_to_package_id'] if !opts[:'move_to_package_id'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Release')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectFrsApi#update_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end