Class: AsposeCellsCloud::LiteCellsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/aspose_cells_cloud/api/lite_cells_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client_id, client_secret, app_version = 'v3.0', app_host = 'api.aspose.cloud', api_client = ApiClient.default) ⇒ LiteCellsApi

Returns a new instance of LiteCellsApi.



29
30
31
32
33
34
35
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 29

def initialize(client_id,client_secret, app_version = 'v3.0', app_host = 'api.aspose.cloud',  api_client = ApiClient.default)
  @api_client = api_client
  @api_client.config.client_secret = client_secret
  @api_client.config.client_id = client_id
  @api_client.config.api_version = app_version
  @api_client.config.host = app_host
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



27
28
29
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 27

def api_client
  @api_client
end

Instance Method Details

#delete_metadata(file, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :type (String) — default: default to all

Returns:



43
44
45
46
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 43

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

#delete_metadata_with_http_info(file, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :type (String)

Returns:

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

    FilesResult data, response status code and response headers



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
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 54

def (file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.delete_metadata ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.delete_metadata"
  end
  # resource path
  local_var_path = "/cells/metadata/delete"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end 
  
  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#delete_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_metadata(file, opts = {}) ⇒ Array<CellsDocumentProperty>

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :type (String) — default: default to all

Returns:



107
108
109
110
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 107

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

#get_metadata_with_http_info(file, opts = {}) ⇒ Array<(Array<CellsDocumentProperty>, Fixnum, Hash)>

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

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :type (String)

Returns:

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

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



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
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 118

def (file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.get_metadata ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.get_metadata"
  end
  # resource path
  local_var_path = "/cells/metadata/get"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end 
  
  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'Array<CellsDocumentProperty>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#get_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_assemble(file, datasource, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :format (String) — default: default to Xlsx

Returns:



172
173
174
175
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 172

def post_assemble(file, datasource, opts = {})
  data, _status_code, _headers = post_assemble_with_http_info(file, datasource, opts)
  return data
end

#post_assemble_with_http_info(file, datasource, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :format (String)

Returns:

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

    FilesResult data, response status code and response headers



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
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 184

def post_assemble_with_http_info(file, datasource, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_assemble ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_assemble"
  end
  # verify the required parameter 'datasource' is set
  if @api_client.config.client_side_validation && datasource.nil?
    fail ArgumentError, "Missing the required parameter 'datasource' when calling LiteCellsApi.post_assemble"
  end
  # resource path
  local_var_path = "/cells/assemble"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  # header_params['Content-Type'] == 'multipart/form-data'
  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end 
  
  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_assemble\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_clear_objects(file, objecttype, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:



242
243
244
245
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 242

def post_clear_objects(file, objecttype, opts = {})
  data, _status_code, _headers = post_clear_objects_with_http_info(file, objecttype, opts)
  return data
end

#post_clear_objects_with_http_info(file, objecttype, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:

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

    FilesResult data, response status code and response headers



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 253

def post_clear_objects_with_http_info(file, objecttype, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_clear_objects ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_clear_objects"
  end
  # verify the required parameter 'objecttype' is set
  if @api_client.config.client_side_validation && objecttype.nil?
    fail ArgumentError, "Missing the required parameter 'objecttype' when calling LiteCellsApi.post_clear_objects"
  end
  # resource path
  local_var_path = "/cells/clearobjects"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_clear_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_export(file, object_type, format, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:



311
312
313
314
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 311

def post_export(file, object_type, format, opts = {})
  data, _status_code, _headers = post_export_with_http_info(file, object_type, format, opts)
  return data
end

#post_export_with_http_info(file, object_type, format, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:

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

    FilesResult data, response status code and response headers



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 323

def post_export_with_http_info(file, object_type, format, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_export ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_export"
  end
  # verify the required parameter 'object_type' is set
  if @api_client.config.client_side_validation && object_type.nil?
    fail ArgumentError, "Missing the required parameter 'object_type' when calling LiteCellsApi.post_export"
  end
  # verify the required parameter 'format' is set
  if @api_client.config.client_side_validation && format.nil?
    fail ArgumentError, "Missing the required parameter 'format' when calling LiteCellsApi.post_export"
  end
  # resource path
  local_var_path = "/cells/export"

  # query parameters
  query_params = {}
  query_params[:'objectType'] = object_type
  query_params[:'format'] = format

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_import(file, import_data, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:



385
386
387
388
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 385

def post_import(file, import_data, opts = {})
  data, _status_code, _headers = post_import_with_http_info(file, import_data, opts)
  return data
end

#post_import_with_http_info(file, import_data, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:

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

    FilesResult data, response status code and response headers



396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 396

def post_import_with_http_info(file, import_data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_import ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_import"
  end
  # verify the required parameter 'import_data' is set
  if @api_client.config.client_side_validation && import_data.nil?
    fail ArgumentError, "Missing the required parameter 'import_data' when calling LiteCellsApi.post_import"
  end
  # resource path
  local_var_path = "/cells/import"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""

  # http body (model)
  post_body = @api_client.object_to_http_body(import_data)
  if post_body
    form_params['documentproperties']  = post_body.to_json
  end

  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_merge(file, opts = {}) ⇒ FileInfo

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :format (String) — default: default to xlsx
  • :merge_to_one_sheet (BOOLEAN) — default: default to false

Returns:



460
461
462
463
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 460

def post_merge(file, opts = {})
  data, _status_code, _headers = post_merge_with_http_info(file, opts)
  return data
end

#post_merge_with_http_info(file, opts = {}) ⇒ Array<(FileInfo, Fixnum, Hash)>

Returns FileInfo data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :format (String)
  • :merge_to_one_sheet (BOOLEAN)

Returns:

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

    FileInfo data, response status code and response headers



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

def post_merge_with_http_info(file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_merge ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_merge"
  end
  # resource path
  local_var_path = "/cells/merge"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FileInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_metadata(file, document_properties, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

  • document_properties

    Cells document property.

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

    the optional parameters

Returns:



526
527
528
529
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 526

def (file, document_properties, opts = {})
  data, _status_code, _headers = (file, document_properties, opts)
  return data
end

#post_metadata_with_http_info(file, document_properties, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

  • document_properties

    Cells document property.

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

    the optional parameters

Returns:

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

    FilesResult data, response status code and response headers



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
578
579
580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 537

def (file, document_properties, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_metadata ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_metadata"
  end
  # verify the required parameter 'document_properties' is set
  if @api_client.config.client_side_validation && document_properties.nil?
    fail ArgumentError, "Missing the required parameter 'document_properties' when calling LiteCellsApi.post_metadata"
  end
  # resource path
  local_var_path = "/cells/metadata/update"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""

  # http body (model)
  post_body = @api_client.object_to_http_body(document_properties)
  if post_body
    form_params['documentproperties']  = post_body.to_json
  end 
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_protect(file, password, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:



599
600
601
602
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 599

def post_protect(file, password, opts = {})
  data, _status_code, _headers = post_protect_with_http_info(file, password, opts)
  return data
end

#post_protect_with_http_info(file, password, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:

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

    FilesResult data, response status code and response headers



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
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 610

def post_protect_with_http_info(file, password, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_protect ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_protect"
  end
  # verify the required parameter 'password' is set
  if @api_client.config.client_side_validation && password.nil?
    fail ArgumentError, "Missing the required parameter 'password' when calling LiteCellsApi.post_protect"
  end
  # resource path
  local_var_path = "/cells/protect"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_protect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_search(file, text, opts = {}) ⇒ Array<TextItem>

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :password (String)
  • :sheetname (String)

Returns:



669
670
671
672
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 669

def post_search(file, text, opts = {})
  data, _status_code, _headers = post_search_with_http_info(file, text, opts)
  return data
end

#post_search_with_http_info(file, text, opts = {}) ⇒ Array<(Array<TextItem>, Fixnum, Hash)>

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

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :password (String)
  • :sheetname (String)

Returns:

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

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



682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 682

def post_search_with_http_info(file, text, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_search ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_search"
  end
  # verify the required parameter 'text' is set
  if @api_client.config.client_side_validation && text.nil?
    fail ArgumentError, "Missing the required parameter 'text' when calling LiteCellsApi.post_search"
  end
  # resource path
  local_var_path = "/cells/search"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'Array<TextItem>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_split(file, format, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :password (String)
  • :from (Integer)
  • :to (Integer)

Returns:



744
745
746
747
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 744

def post_split(file, format, opts = {})
  data, _status_code, _headers = post_split_with_http_info(file, format, opts)
  return data
end

#post_split_with_http_info(file, format, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Options Hash (opts):

  • :password (String)
  • :from (Integer)
  • :to (Integer)
  • :path (String)
  • :storage_name (String)

Returns:

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

    FilesResult data, response status code and response headers



760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 760

def post_split_with_http_info(file, format, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_split ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_split"
  end
  # verify the required parameter 'format' is set
  if @api_client.config.client_side_validation && format.nil?
    fail ArgumentError, "Missing the required parameter 'format' when calling LiteCellsApi.post_split"
  end
  # resource path
  local_var_path = "/cells/split"

  # query parameters
  query_params = {}
  query_params[:'format'] = format
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_split\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_unlock(file, password, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:



820
821
822
823
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 820

def post_unlock(file, password, opts = {})
  data, _status_code, _headers = post_unlock_with_http_info(file, password, opts)
  return data
end

#post_unlock_with_http_info(file, password, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:

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

    FilesResult data, response status code and response headers



831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 831

def post_unlock_with_http_info(file, password, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_unlock ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_unlock"
  end
  # verify the required parameter 'password' is set
  if @api_client.config.client_side_validation && password.nil?
    fail ArgumentError, "Missing the required parameter 'password' when calling LiteCellsApi.post_unlock"
  end
  # resource path
  local_var_path = "/cells/unlock"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_unlock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_watermark(file, text, color, opts = {}) ⇒ FilesResult

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:



889
890
891
892
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 889

def post_watermark(file, text, color, opts = {})
  data, _status_code, _headers = post_watermark_with_http_info(file, text, color, opts)
  return data
end

#post_watermark_with_http_info(file, text, color, opts = {}) ⇒ Array<(FilesResult, Fixnum, Hash)>

Returns FilesResult data, response status code and response headers.

Parameters:

  • file

    File to upload

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

    the optional parameters

Returns:

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

    FilesResult data, response status code and response headers



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
# File 'lib/aspose_cells_cloud/api/lite_cells_api.rb', line 901

def post_watermark_with_http_info(file, text, color, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: LiteCellsApi.post_watermark ..."
  end
  @api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_watermark"
  end
  # verify the required parameter 'text' is set
  if @api_client.config.client_side_validation && text.nil?
    fail ArgumentError, "Missing the required parameter 'text' when calling LiteCellsApi.post_watermark"
  end
  # verify the required parameter 'color' is set
  if @api_client.config.client_side_validation && color.nil?
    fail ArgumentError, "Missing the required parameter 'color' when calling LiteCellsApi.post_watermark"
  end
  # resource path
  local_var_path = "/cells/watermark"

  # query parameters
  query_params = {}
  query_params[:'text'] = text
  query_params[:'color'] = color

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  file.each do |filename , context|
    form_params[filename]  = context
  end

  # http body (model)
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  post_body = ""
  #auth_names = []
  auth_names = ['JWT']
  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 => 'FilesResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LiteCellsApi#post_watermark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end