Class: OSDNClient::ProjectApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProjectApi

Returns a new instance of ProjectApi.



30
31
32
# File 'lib/osdn-client/api/project_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_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#create_news(title, body, group_id, opts = {}) ⇒ String

Parameters:

  • title

    news title

  • body

    news body in OSDN Wiki format.

  • group_id

    group_id the news created in

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

    the optional parameters

Returns:

  • (String)


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

def create_news(title, body, group_id, opts = {})
  data, _status_code, _headers = create_news_with_http_info(title, body, group_id, opts)
  return data
end

#create_news_0(id_or_name, title, body, opts = {}) ⇒ String

Parameters:

  • id_or_name

    numeric project id or project name

  • title

    news title

  • body

    news body in OSDN Wiki format.

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

    the optional parameters

Returns:

  • (String)


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

def create_news_0(id_or_name, title, body, opts = {})
  data, _status_code, _headers = create_news_0_with_http_info(id_or_name, title, body, opts)
  return data
end

#create_news_0_with_http_info(id_or_name, title, body, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Returns String data, response status code and response headers.

Parameters:

  • id_or_name

    numeric project id or project name

  • title

    news title

  • body

    news body in OSDN Wiki format.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



121
122
123
124
125
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
# File 'lib/osdn-client/api/project_api.rb', line 121

def create_news_0_with_http_info(id_or_name, title, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.create_news_0 ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.create_news_0" if id_or_name.nil?
  # verify the required parameter 'title' is set
  fail ArgumentError, "Missing the required parameter 'title' when calling ProjectApi.create_news_0" if title.nil?
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling ProjectApi.create_news_0" if body.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/news".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["title"] = title
  form_params["body"] = body

  # 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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#create_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_news_with_http_info(title, body, group_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Returns String data, response status code and response headers.

Parameters:

  • title

    news title

  • body

    news body in OSDN Wiki format.

  • group_id

    group_id the news created in

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

    the optional parameters

Returns:

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

    String 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
98
99
100
# File 'lib/osdn-client/api/project_api.rb', line 53

def create_news_with_http_info(title, body, group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.create_news ..."
  end
  # verify the required parameter 'title' is set
  fail ArgumentError, "Missing the required parameter 'title' when calling ProjectApi.create_news" if title.nil?
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling ProjectApi.create_news" if body.nil?
  # verify the required parameter 'group_id' is set
  fail ArgumentError, "Missing the required parameter 'group_id' when calling ProjectApi.create_news" if group_id.nil?
  # resource path
  local_var_path = "/news".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'group_id'] = group_id

  # 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["title"] = title
  form_params["body"] = body

  # 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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#create_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#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:



176
177
178
179
# File 'lib/osdn-client/api/project_api.rb', line 176

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



188
189
190
191
192
193
194
195
196
197
198
199
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
# File 'lib/osdn-client/api/project_api.rb', line 188

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



245
246
247
248
# File 'lib/osdn-client/api/project_api.rb', line 245

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:



321
322
323
324
# File 'lib/osdn-client/api/project_api.rb', line 321

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



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
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/osdn-client/api/project_api.rb', line 335

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: ProjectApi.create_release_file ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.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 ProjectApi.create_release_file" if release_id.nil?
  # verify the required parameter 'file' is set
  fail ArgumentError, "Missing the required parameter 'file' when calling ProjectApi.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: ProjectApi#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



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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/osdn-client/api/project_api.rb', line 261

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: ProjectApi.create_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.create_release" if package_id.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling ProjectApi.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: ProjectApi#create_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_news(news_id, opts = {}) ⇒ nil

Parameters:

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

    the optional parameters

Returns:

  • (nil)


390
391
392
393
# File 'lib/osdn-client/api/project_api.rb', line 390

def delete_news(news_id, opts = {})
  delete_news_with_http_info(news_id, opts)
  return nil
end

#delete_news_0(id_or_name, news_id, opts = {}) ⇒ nil

Parameters:

  • id_or_name

    numeric project id or project name

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

    the optional parameters

Returns:

  • (nil)


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

def delete_news_0(id_or_name, news_id, opts = {})
  delete_news_0_with_http_info(id_or_name, news_id, opts)
  return nil
end

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

Returns nil, response status code and response headers.

Parameters:

  • id_or_name

    numeric project id or project name

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
494
495
496
497
498
499
# File 'lib/osdn-client/api/project_api.rb', line 458

def delete_news_0_with_http_info(id_or_name, news_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.delete_news_0 ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.delete_news_0" if id_or_name.nil?
  # verify the required parameter 'news_id' is set
  fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.delete_news_0" if news_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/news/{news_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'news_id' + '}', news_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: ProjectApi#delete_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_news_with_http_info(news_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Returns nil, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/osdn-client/api/project_api.rb', line 400

def delete_news_with_http_info(news_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.delete_news ..."
  end
  # verify the required parameter 'news_id' is set
  fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.delete_news" if news_id.nil?
  # resource path
  local_var_path = "/news/{news_id}".sub('{format}','json').sub('{' + 'news_id' + '}', news_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: ProjectApi#delete_news\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)


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

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



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
# File 'lib/osdn-client/api/project_api.rb', line 518

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


568
569
570
571
# File 'lib/osdn-client/api/project_api.rb', line 568

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)


633
634
635
636
# File 'lib/osdn-client/api/project_api.rb', line 633

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



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
685
686
687
688
689
690
691
# File 'lib/osdn-client/api/project_api.rb', line 646

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: ProjectApi.delete_release_file ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.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 ProjectApi.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 ProjectApi.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: ProjectApi#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



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
620
621
622
623
# File 'lib/osdn-client/api/project_api.rb', line 580

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: ProjectApi.delete_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.delete_release" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.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: ProjectApi#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:



699
700
701
702
# File 'lib/osdn-client/api/project_api.rb', line 699

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



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
# File 'lib/osdn-client/api/project_api.rb', line 710

def draft_release_with_http_info(id_or_name, package_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.draft_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.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: ProjectApi#draft_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_news(news_id, opts = {}) ⇒ News

Get single news object.

Parameters:

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

    the optional parameters

Returns:



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

def get_news(news_id, opts = {})
  data, _status_code, _headers = get_news_with_http_info(news_id, opts)
  return data
end

#get_news_0(id_or_name, news_id, opts = {}) ⇒ News

Get single news object.

Parameters:

  • id_or_name

    numeric project id or project name

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

    the optional parameters

Returns:



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

def get_news_0(id_or_name, news_id, opts = {})
  data, _status_code, _headers = get_news_0_with_http_info(id_or_name, news_id, opts)
  return data
end

#get_news_0_with_http_info(id_or_name, news_id, opts = {}) ⇒ Array<(News, Fixnum, Hash)>

Get single news object.

Parameters:

  • id_or_name

    numeric project id or project name

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

    the optional parameters

Returns:

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

    News data, response status code and response headers



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
# File 'lib/osdn-client/api/project_api.rb', line 828

def get_news_0_with_http_info(id_or_name, news_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.get_news_0 ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.get_news_0" if id_or_name.nil?
  # verify the required parameter 'news_id' is set
  fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.get_news_0" if news_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/news/{news_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'news_id' + '}', news_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 => 'News')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#get_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_news_with_http_info(news_id, opts = {}) ⇒ Array<(News, Fixnum, Hash)>

Get single news object.

Parameters:

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

    the optional parameters

Returns:

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

    News data, response status code and response headers



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
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/osdn-client/api/project_api.rb', line 769

def get_news_with_http_info(news_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.get_news ..."
  end
  # verify the required parameter 'news_id' is set
  fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.get_news" if news_id.nil?
  # resource path
  local_var_path = "/news/{news_id}".sub('{format}','json').sub('{' + 'news_id' + '}', news_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 => 'News')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#get_news\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:



878
879
880
881
# File 'lib/osdn-client/api/project_api.rb', line 878

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



889
890
891
892
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
# File 'lib/osdn-client/api/project_api.rb', line 889

def get_package_with_http_info(id_or_name, package_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.get_package ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.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: ProjectApi#get_package\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project(id_or_name, opts = {}) ⇒ Group

Get project info.

Parameters:

  • id_or_name

    numeric project id or project name

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

    the optional parameters

Returns:



938
939
940
941
# File 'lib/osdn-client/api/project_api.rb', line 938

def get_project(id_or_name, opts = {})
  data, _status_code, _headers = get_project_with_http_info(id_or_name, opts)
  return data
end

#get_project_with_http_info(id_or_name, opts = {}) ⇒ Array<(Group, Fixnum, Hash)>

Get project info.

Parameters:

  • id_or_name

    numeric project id or project name

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

    the optional parameters

Returns:

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

    Group data, response status code and response headers



948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
# File 'lib/osdn-client/api/project_api.rb', line 948

def get_project_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.get_project ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.get_project" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}".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 => 'Group')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#get_project\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:



997
998
999
1000
# File 'lib/osdn-client/api/project_api.rb', line 997

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:



1063
1064
1065
1066
# File 'lib/osdn-client/api/project_api.rb', line 1063

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



1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
# File 'lib/osdn-client/api/project_api.rb', line 1076

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: ProjectApi.get_release_file ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.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 ProjectApi.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 ProjectApi.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: ProjectApi#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



1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
# File 'lib/osdn-client/api/project_api.rb', line 1009

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: ProjectApi.get_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.get_release" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.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: ProjectApi#get_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_news(opts = {}) ⇒ Array<News>

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    filter by group ID

Returns:



1129
1130
1131
1132
# File 'lib/osdn-client/api/project_api.rb', line 1129

def list_news(opts = {})
  data, _status_code, _headers = list_news_with_http_info(opts)
  return data
end

#list_news_0(id_or_name, opts = {}) ⇒ Array<News>

Get news list of spscified project.

Parameters:

  • id_or_name

    numeric project id or project name

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

    the optional parameters

Returns:



1185
1186
1187
1188
# File 'lib/osdn-client/api/project_api.rb', line 1185

def list_news_0(id_or_name, opts = {})
  data, _status_code, _headers = list_news_0_with_http_info(id_or_name, opts)
  return data
end

#list_news_0_with_http_info(id_or_name, opts = {}) ⇒ Array<(Array<News>, Fixnum, Hash)>

Get news list of spscified project.

Parameters:

  • id_or_name

    numeric project id or project name

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

    the optional parameters

Returns:

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

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



1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
# File 'lib/osdn-client/api/project_api.rb', line 1195

def list_news_0_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.list_news_0 ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.list_news_0" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/news".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<News>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#list_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_news_with_http_info(opts = {}) ⇒ Array<(Array<News>, Fixnum, Hash)>

Returns Array<News> data, response status code and response headers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :group_id (Integer)

    filter by group ID

Returns:

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

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



1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
# File 'lib/osdn-client/api/project_api.rb', line 1139

def list_news_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.list_news ..."
  end
  # resource path
  local_var_path = "/news".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?

  # 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<News>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#list_news\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:



1242
1243
1244
1245
# File 'lib/osdn-client/api/project_api.rb', line 1242

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



1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
# File 'lib/osdn-client/api/project_api.rb', line 1252

def list_packages_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.list_packages ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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: ProjectApi#list_packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_news(news_id, opts = {}) ⇒ News

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :title (String)

    news title

  • :body (String)

    news body in OSDN Wiki format.

Returns:



1301
1302
1303
1304
# File 'lib/osdn-client/api/project_api.rb', line 1301

def update_news(news_id, opts = {})
  data, _status_code, _headers = update_news_with_http_info(news_id, opts)
  return data
end

#update_news_0(news_id, id_or_name, opts = {}) ⇒ News

Parameters:

  • news_id
  • id_or_name

    numeric project id or project name

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

    the optional parameters

Options Hash (opts):

  • :title (String)

    news title

  • :body (String)

    news body in OSDN Wiki format.

Returns:



1365
1366
1367
1368
# File 'lib/osdn-client/api/project_api.rb', line 1365

def update_news_0(news_id, id_or_name, opts = {})
  data, _status_code, _headers = update_news_0_with_http_info(news_id, id_or_name, opts)
  return data
end

#update_news_0_with_http_info(news_id, id_or_name, opts = {}) ⇒ Array<(News, Fixnum, Hash)>

Returns News data, response status code and response headers.

Parameters:

  • news_id
  • id_or_name

    numeric project id or project name

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

    the optional parameters

Options Hash (opts):

  • :title (String)

    news title

  • :body (String)

    news body in OSDN Wiki format.

Returns:

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

    News data, response status code and response headers



1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
# File 'lib/osdn-client/api/project_api.rb', line 1378

def update_news_0_with_http_info(news_id, id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.update_news_0 ..."
  end
  # verify the required parameter 'news_id' is set
  fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.update_news_0" if news_id.nil?
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.update_news_0" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/news/{news_id}".sub('{format}','json').sub('{' + 'news_id' + '}', news_id.to_s).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["title"] = opts[:'title'] if !opts[:'title'].nil?
  form_params["body"] = opts[:'body'] if !opts[:'body'].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 => 'News')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#update_news_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_news_with_http_info(news_id, opts = {}) ⇒ Array<(News, Fixnum, Hash)>

Returns News data, response status code and response headers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :title (String)

    news title

  • :body (String)

    news body in OSDN Wiki format.

Returns:

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

    News data, response status code and response headers



1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
# File 'lib/osdn-client/api/project_api.rb', line 1313

def update_news_with_http_info(news_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectApi.update_news ..."
  end
  # verify the required parameter 'news_id' is set
  fail ArgumentError, "Missing the required parameter 'news_id' when calling ProjectApi.update_news" if news_id.nil?
  # resource path
  local_var_path = "/news/{news_id}".sub('{format}','json').sub('{' + 'news_id' + '}', news_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["title"] = opts[:'title'] if !opts[:'title'].nil?
  form_params["body"] = opts[:'body'] if !opts[:'body'].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 => 'News')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#update_news\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:



1432
1433
1434
1435
# File 'lib/osdn-client/api/project_api.rb', line 1432

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



1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
# File 'lib/osdn-client/api/project_api.rb', line 1445

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



1502
1503
1504
1505
# File 'lib/osdn-client/api/project_api.rb', line 1502

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:



1577
1578
1579
1580
# File 'lib/osdn-client/api/project_api.rb', line 1577

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



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
# File 'lib/osdn-client/api/project_api.rb', line 1591

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: ProjectApi.update_release_file ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.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 ProjectApi.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 ProjectApi.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: ProjectApi#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 (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



1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
# File 'lib/osdn-client/api/project_api.rb', line 1518

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: ProjectApi.update_release ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectApi.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 ProjectApi.update_release" if package_id.nil?
  # verify the required parameter 'release_id' is set
  fail ArgumentError, "Missing the required parameter 'release_id' when calling ProjectApi.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: ProjectApi#update_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end