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.


7
8
9
# File 'lib/osdn-client/api/project_frs_api.rb', line 7

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.


5
6
7
# File 'lib/osdn-client/api/project_frs_api.rb', line 5

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:


79
80
81
82
# File 'lib/osdn-client/api/project_frs_api.rb', line 79

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


91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/osdn-client/api/project_frs_api.rb', line 91

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 "Missing the required parameter 'id_or_name' when calling create_package" if id_or_name.nil?
  
  # verify the required parameter 'name' is set
  fail "Missing the required parameter 'name' when calling create_package" if name.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

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

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, 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 (String)

    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:


219
220
221
222
# File 'lib/osdn-client/api/project_frs_api.rb', line 219

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:


575
576
577
578
# File 'lib/osdn-client/api/project_frs_api.rb', line 575

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


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
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
# File 'lib/osdn-client/api/project_frs_api.rb', line 589

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 "Missing the required parameter 'id_or_name' when calling create_release_file" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling create_release_file" if package_id.nil?
  
  # verify the required parameter 'release_id' is set
  fail "Missing the required parameter 'release_id' when calling create_release_file" if release_id.nil?
  
  # verify the required parameter 'file' is set
  fail "Missing the required parameter 'file' when calling create_release_file" if file.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

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

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, 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 (String)

    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


235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/osdn-client/api/project_frs_api.rb', line 235

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 "Missing the required parameter 'id_or_name' when calling create_release" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling create_release" if package_id.nil?
  
  # verify the required parameter 'name' is set
  fail "Missing the required parameter 'name' when calling create_release" if name.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

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

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, 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)

298
299
300
301
# File 'lib/osdn-client/api/project_frs_api.rb', line 298

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


309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
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
# File 'lib/osdn-client/api/project_frs_api.rb', line 309

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 "Missing the required parameter 'id_or_name' when calling delete_package" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling delete_package" if package_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, 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)

653
654
655
656
# File 'lib/osdn-client/api/project_frs_api.rb', line 653

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)

883
884
885
886
# File 'lib/osdn-client/api/project_frs_api.rb', line 883

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


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
938
939
940
941
942
943
944
945
946
947
948
# File 'lib/osdn-client/api/project_frs_api.rb', line 896

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 "Missing the required parameter 'id_or_name' when calling delete_release_file" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling delete_release_file" if package_id.nil?
  
  # verify the required parameter 'release_id' is set
  fail "Missing the required parameter 'release_id' when calling delete_release_file" if release_id.nil?
  
  # verify the required parameter 'file_id' is set
  fail "Missing the required parameter 'file_id' when calling delete_release_file" if file_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, 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


665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
# File 'lib/osdn-client/api/project_frs_api.rb', line 665

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 "Missing the required parameter 'id_or_name' when calling delete_release" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling delete_release" if package_id.nil?
  
  # verify the required parameter 'release_id' is set
  fail "Missing the required parameter 'release_id' when calling delete_release" if release_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, 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:


435
436
437
438
# File 'lib/osdn-client/api/project_frs_api.rb', line 435

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


446
447
448
449
450
451
452
453
454
455
456
457
458
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
# File 'lib/osdn-client/api/project_frs_api.rb', line 446

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 "Missing the required parameter 'id_or_name' when calling draft_release" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling draft_release" if package_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, 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_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:


148
149
150
151
# File 'lib/osdn-client/api/project_frs_api.rb', line 148

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


159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/osdn-client/api/project_frs_api.rb', line 159

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 "Missing the required parameter 'id_or_name' when calling get_package" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling get_package" if package_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, 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:


502
503
504
505
# File 'lib/osdn-client/api/project_frs_api.rb', line 502

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:


807
808
809
810
# File 'lib/osdn-client/api/project_frs_api.rb', line 807

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


820
821
822
823
824
825
826
827
828
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
871
872
873
# File 'lib/osdn-client/api/project_frs_api.rb', line 820

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 "Missing the required parameter 'id_or_name' when calling get_release_file" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling get_release_file" if package_id.nil?
  
  # verify the required parameter 'release_id' is set
  fail "Missing the required parameter 'release_id' when calling get_release_file" if release_id.nil?
  
  # verify the required parameter 'file_id' is set
  fail "Missing the required parameter 'file_id' when calling get_release_file" if file_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, 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


514
515
516
517
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
559
560
561
562
563
564
# File 'lib/osdn-client/api/project_frs_api.rb', line 514

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 "Missing the required parameter 'id_or_name' when calling get_release" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling get_release" if package_id.nil?
  
  # verify the required parameter 'release_id' is set
  fail "Missing the required parameter 'release_id' when calling get_release" if release_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, 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:


16
17
18
19
# File 'lib/osdn-client/api/project_frs_api.rb', line 16

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


26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/osdn-client/api/project_frs_api.rb', line 26

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 "Missing the required parameter 'id_or_name' when calling list_packages" if id_or_name.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, 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_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:


365
366
367
368
# File 'lib/osdn-client/api/project_frs_api.rb', line 365

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


378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
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
# File 'lib/osdn-client/api/project_frs_api.rb', line 378

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 "Missing the required parameter 'id_or_name' when calling update_package" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling update_package" if package_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

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

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, 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.n(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 (String)

    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:


727
728
729
730
# File 'lib/osdn-client/api/project_frs_api.rb', line 727

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:


959
960
961
962
# File 'lib/osdn-client/api/project_frs_api.rb', line 959

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


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
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
# File 'lib/osdn-client/api/project_frs_api.rb', line 973

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 "Missing the required parameter 'id_or_name' when calling update_release_file" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling update_release_file" if package_id.nil?
  
  # verify the required parameter 'release_id' is set
  fail "Missing the required parameter 'release_id' when calling update_release_file" if release_id.nil?
  
  # verify the required parameter 'file_id' is set
  fail "Missing the required parameter 'file_id' when calling update_release_file" if file_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}
  form_params["visibility"] = opts[:'visibility'] if opts[:'visibility']

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, 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.n(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 (String)

    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


743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
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
# File 'lib/osdn-client/api/project_frs_api.rb', line 743

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 "Missing the required parameter 'id_or_name' when calling update_release" if id_or_name.nil?
  
  # verify the required parameter 'package_id' is set
  fail "Missing the required parameter 'package_id' when calling update_release" if package_id.nil?
  
  # verify the required parameter 'release_id' is set
  fail "Missing the required parameter 'release_id' when calling update_release" if release_id.nil?
  
  # resource path
  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)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

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

  # http body (model)
  post_body = nil
  

  auth_names = ['oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, 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