Class: OSDNClient::ProjectNewsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProjectNewsApi



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

def api_client
  @api_client
end

Instance Method Details

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



41
42
43
44
# File 'lib/osdn-client/api/project_news_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



109
110
111
112
# File 'lib/osdn-client/api/project_news_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)>



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_news_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: ProjectNewsApi.create_news_0 ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectNewsApi.create_news_0" if id_or_name.nil?
  # verify the required parameter 'title' is set
  fail ArgumentError, "Missing the required parameter 'title' when calling ProjectNewsApi.create_news_0" if title.nil?
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling ProjectNewsApi.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: ProjectNewsApi#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)>



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_news_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: ProjectNewsApi.create_news ..."
  end
  # verify the required parameter 'title' is set
  fail ArgumentError, "Missing the required parameter 'title' when calling ProjectNewsApi.create_news" if title.nil?
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling ProjectNewsApi.create_news" if body.nil?
  # verify the required parameter 'group_id' is set
  fail ArgumentError, "Missing the required parameter 'group_id' when calling ProjectNewsApi.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: ProjectNewsApi#create_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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



174
175
176
177
# File 'lib/osdn-client/api/project_news_api.rb', line 174

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



231
232
233
234
# File 'lib/osdn-client/api/project_news_api.rb', line 231

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)>



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

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



184
185
186
187
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
# File 'lib/osdn-client/api/project_news_api.rb', line 184

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



290
291
292
293
# File 'lib/osdn-client/api/project_news_api.rb', line 290

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.



348
349
350
351
# File 'lib/osdn-client/api/project_news_api.rb', line 348

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.



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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/osdn-client/api/project_news_api.rb', line 359

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



300
301
302
303
304
305
306
307
308
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
# File 'lib/osdn-client/api/project_news_api.rb', line 300

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

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

Options Hash (opts):

  • :group_id (Integer)

    filter by group ID



408
409
410
411
# File 'lib/osdn-client/api/project_news_api.rb', line 408

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.



464
465
466
467
# File 'lib/osdn-client/api/project_news_api.rb', line 464

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.



474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/osdn-client/api/project_news_api.rb', line 474

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

Options Hash (opts):

  • :group_id (Integer)

    filter by group ID



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/osdn-client/api/project_news_api.rb', line 418

def list_news_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectNewsApi.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: ProjectNewsApi#list_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Options Hash (opts):

  • :title (String)

    news title

  • :body (String)

    news body in OSDN Wiki format.



523
524
525
526
# File 'lib/osdn-client/api/project_news_api.rb', line 523

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

Options Hash (opts):

  • :title (String)

    news title

  • :body (String)

    news body in OSDN Wiki format.



587
588
589
590
# File 'lib/osdn-client/api/project_news_api.rb', line 587

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.

Options Hash (opts):

  • :title (String)

    news title

  • :body (String)

    news body in OSDN Wiki format.



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_news_api.rb', line 600

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

Options Hash (opts):

  • :title (String)

    news title

  • :body (String)

    news body in OSDN Wiki format.



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
565
566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/osdn-client/api/project_news_api.rb', line 535

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