Class: ILoveVideoEditor::ProjectsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/generated/ilovevideoeditor-sdk/api/projects_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProjectsApi

Returns a new instance of ProjectsApi.



19
20
21
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#batch_delete_projects(batch_delete_projects_request, opts = {}) ⇒ BatchDeleteResult

Bulk delete projects

Parameters:

Returns:



26
27
28
29
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 26

def batch_delete_projects(batch_delete_projects_request, opts = {})
  data, _status_code, _headers = batch_delete_projects_with_http_info(batch_delete_projects_request, opts)
  data
end

#batch_delete_projects_with_http_info(batch_delete_projects_request, opts = {}) ⇒ Array<(BatchDeleteResult, Integer, Hash)>

Bulk delete projects

Parameters:

Returns:

  • (Array<(BatchDeleteResult, Integer, Hash)>)

    BatchDeleteResult data, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 35

def batch_delete_projects_with_http_info(batch_delete_projects_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.batch_delete_projects ...'
  end
  # verify the required parameter 'batch_delete_projects_request' is set
  if @api_client.config.client_side_validation && batch_delete_projects_request.nil?
    fail ArgumentError, "Missing the required parameter 'batch_delete_projects_request' when calling ProjectsApi.batch_delete_projects"
  end
  # resource path
  local_var_path = '/v1/projects/batch-delete'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_delete_projects_request)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchDeleteResult'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.batch_delete_projects",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#batch_delete_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_project(project_create, opts = {}) ⇒ CreateProject200Response

Create a project

Parameters:

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

    the optional parameters

Returns:



92
93
94
95
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 92

def create_project(project_create, opts = {})
  data, _status_code, _headers = create_project_with_http_info(project_create, opts)
  data
end

#create_project_with_http_info(project_create, opts = {}) ⇒ Array<(CreateProject200Response, Integer, Hash)>

Create a project

Parameters:

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

    the optional parameters

Returns:

  • (Array<(CreateProject200Response, Integer, Hash)>)

    CreateProject200Response data, response status code and response headers



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 101

def create_project_with_http_info(project_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.create_project ...'
  end
  # verify the required parameter 'project_create' is set
  if @api_client.config.client_side_validation && project_create.nil?
    fail ArgumentError, "Missing the required parameter 'project_create' when calling ProjectsApi.create_project"
  end
  # resource path
  local_var_path = '/v1/projects'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(project_create)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.create_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_project(id, opts = {}) ⇒ DeleteProject200Response

Delete a project

Parameters:

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

    the optional parameters

Returns:



158
159
160
161
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 158

def delete_project(id, opts = {})
  data, _status_code, _headers = delete_project_with_http_info(id, opts)
  data
end

#delete_project_with_http_info(id, opts = {}) ⇒ Array<(DeleteProject200Response, Integer, Hash)>

Delete a project

Parameters:

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

    the optional parameters

Returns:

  • (Array<(DeleteProject200Response, Integer, Hash)>)

    DeleteProject200Response data, response status code and response headers



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 167

def delete_project_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.delete_project ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.delete_project"
  end
  # resource path
  local_var_path = '/v1/projects/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.delete_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#duplicate_project(id, opts = {}) ⇒ CreateProject200Response

Duplicate a project

Parameters:

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

    the optional parameters

Returns:



219
220
221
222
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 219

def duplicate_project(id, opts = {})
  data, _status_code, _headers = duplicate_project_with_http_info(id, opts)
  data
end

#duplicate_project_with_http_info(id, opts = {}) ⇒ Array<(CreateProject200Response, Integer, Hash)>

Duplicate a project

Parameters:

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

    the optional parameters

Returns:

  • (Array<(CreateProject200Response, Integer, Hash)>)

    CreateProject200Response data, response status code and response headers



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 228

def duplicate_project_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.duplicate_project ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.duplicate_project"
  end
  # resource path
  local_var_path = '/v1/projects/{id}/duplicate'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CreateProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.duplicate_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#duplicate_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project(id, opts = {}) ⇒ GetProject200Response

Get a project

Parameters:

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

    the optional parameters

Returns:



280
281
282
283
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 280

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

#get_project_stats(opts = {}) ⇒ GetProjectStats200Response

Get total project count

Parameters:

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

    the optional parameters

Returns:



340
341
342
343
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 340

def get_project_stats(opts = {})
  data, _status_code, _headers = get_project_stats_with_http_info(opts)
  data
end

#get_project_stats_with_http_info(opts = {}) ⇒ Array<(GetProjectStats200Response, Integer, Hash)>

Get total project count

Parameters:

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

    the optional parameters

Returns:

  • (Array<(GetProjectStats200Response, Integer, Hash)>)

    GetProjectStats200Response data, response status code and response headers



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
384
385
386
387
388
389
390
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 348

def get_project_stats_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_stats ...'
  end
  # resource path
  local_var_path = '/v1/projects/stats'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetProjectStats200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.get_project_stats",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#get_project_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project_with_http_info(id, opts = {}) ⇒ Array<(GetProject200Response, Integer, Hash)>

Get a project

Parameters:

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

    the optional parameters

Returns:

  • (Array<(GetProject200Response, Integer, Hash)>)

    GetProject200Response data, response status code and response headers



289
290
291
292
293
294
295
296
297
298
299
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
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 289

def get_project_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.get_project ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project"
  end
  # resource path
  local_var_path = '/v1/projects/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.get_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_projects(opts = {}) ⇒ ListProjects200Response

List user projects

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer) — default: default to 1
  • :limit (Integer) — default: default to 25
  • :sort_by (String) — default: default to 'updated_at'
  • :sort_order (String) — default: default to 'desc'
  • :search (String)

Returns:



400
401
402
403
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 400

def list_projects(opts = {})
  data, _status_code, _headers = list_projects_with_http_info(opts)
  data
end

#list_projects_with_http_info(opts = {}) ⇒ Array<(ListProjects200Response, Integer, Hash)>

List user projects

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer) — default: default to 1
  • :limit (Integer) — default: default to 25
  • :sort_by (String) — default: default to 'updated_at'
  • :sort_order (String) — default: default to 'desc'
  • :search (String)

Returns:

  • (Array<(ListProjects200Response, Integer, Hash)>)

    ListProjects200Response data, response status code and response headers



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 413

def list_projects_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.list_projects ...'
  end
  allowable_values = ["created_at", "updated_at", "name", "duration"]
  if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
    fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
  end
  allowable_values = ["asc", "desc"]
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
    fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/projects'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListProjects200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.list_projects",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#list_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_project(id, project_update, opts = {}) ⇒ CreateProject200Response

Partially update a project

Parameters:

  • id (String)
  • project_update (ProjectUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



475
476
477
478
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 475

def patch_project(id, project_update, opts = {})
  data, _status_code, _headers = patch_project_with_http_info(id, project_update, opts)
  data
end

#patch_project_with_http_info(id, project_update, opts = {}) ⇒ Array<(CreateProject200Response, Integer, Hash)>

Partially update a project

Parameters:

  • id (String)
  • project_update (ProjectUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CreateProject200Response, Integer, Hash)>)

    CreateProject200Response data, response status code and response headers



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
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 485

def patch_project_with_http_info(id, project_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.patch_project ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.patch_project"
  end
  # verify the required parameter 'project_update' is set
  if @api_client.config.client_side_validation && project_update.nil?
    fail ArgumentError, "Missing the required parameter 'project_update' when calling ProjectsApi.patch_project"
  end
  # resource path
  local_var_path = '/v1/projects/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(project_update)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.patch_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#patch_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_project(id, project_update, opts = {}) ⇒ CreateProject200Response

Update a project

Parameters:

  • id (String)
  • project_update (ProjectUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



547
548
549
550
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 547

def update_project(id, project_update, opts = {})
  data, _status_code, _headers = update_project_with_http_info(id, project_update, opts)
  data
end

#update_project_with_http_info(id, project_update, opts = {}) ⇒ Array<(CreateProject200Response, Integer, Hash)>

Update a project

Parameters:

  • id (String)
  • project_update (ProjectUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CreateProject200Response, Integer, Hash)>)

    CreateProject200Response data, response status code and response headers



557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'lib/generated/ilovevideoeditor-sdk/api/projects_api.rb', line 557

def update_project_with_http_info(id, project_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectsApi.update_project ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.update_project"
  end
  # verify the required parameter 'project_update' is set
  if @api_client.config.client_side_validation && project_update.nil?
    fail ArgumentError, "Missing the required parameter 'project_update' when calling ProjectsApi.update_project"
  end
  # resource path
  local_var_path = '/v1/projects/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(project_update)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateProject200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['BearerAuth']

  new_options = opts.merge(
    :operation => :"ProjectsApi.update_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectsApi#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end