aspose_cells_cloud 23.10 → 23.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,1179 +0,0 @@
1
- =begin
2
- --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2021 Aspose.Cells Cloud
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- SOFTWARE.
19
- --------------------------------------------------------------------------------------------------------------------
20
-
21
- =end
22
-
23
- require "uri"
24
-
25
- module AsposeCellsCloud
26
- class LiteCellsApi
27
- attr_accessor :api_client
28
-
29
- def initialize(client_id,client_secret, app_version = 'v3.0', app_host = 'api.aspose.cloud', api_client = ApiClient.default)
30
- warn "[DEPRECATION] `LiteCellsApi` is deprecated. Please use `LightCellsApi` instead."
31
- @api_client = api_client
32
- @api_client.config.client_secret = client_secret
33
- @api_client.config.client_id = client_id
34
- @api_client.config.api_version = app_version
35
- @api_client.config.host = app_host
36
- end
37
-
38
- #
39
- #
40
- # @param file File to upload
41
- # @param [Hash] opts the optional parameters
42
- # @option opts [String] :type (default to all)
43
- # @return [FilesResult]
44
- def delete_metadata(file, opts = {})
45
- data, _status_code, _headers = delete_metadata_with_http_info(file, opts)
46
- return data
47
- end
48
-
49
- #
50
- #
51
- # @param file File to upload
52
- # @param [Hash] opts the optional parameters
53
- # @option opts [String] :type
54
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
55
- def delete_metadata_with_http_info(file, opts = {})
56
- if @api_client.config.debugging
57
- @api_client.config.logger.debug "Calling API: LiteCellsApi.delete_metadata ..."
58
- end
59
- @api_client.request_token_if_needed
60
- # verify the required parameter 'file' is set
61
- if @api_client.config.client_side_validation && file.nil?
62
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.delete_metadata"
63
- end
64
- # resource path
65
- local_var_path = "/cells/metadata/delete"
66
-
67
- # query parameters
68
- query_params = {}
69
- query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
70
-
71
- # header parameters
72
- header_params = {}
73
- # HTTP header 'Accept' (if needed)
74
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
75
- # HTTP header 'Content-Type'
76
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
77
-
78
- # form parameters
79
- form_params = {}
80
- file.each do |filename , context|
81
- form_params[filename] = context
82
- end
83
-
84
- # http body (model)
85
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
86
- post_body = ""
87
- #auth_names = []
88
- auth_names = ['JWT']
89
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
90
- :header_params => header_params,
91
- :query_params => query_params,
92
- :form_params => form_params,
93
- :body => post_body,
94
- :auth_names => auth_names,
95
- :return_type => 'FilesResult')
96
- if @api_client.config.debugging
97
- @api_client.config.logger.debug "API called: LiteCellsApi#delete_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
- end
99
- return data, status_code, headers
100
- end
101
-
102
- #
103
- #
104
- # @param file File to upload
105
- # @param [Hash] opts the optional parameters
106
- # @option opts [String] :type (default to all)
107
- # @return [Array<CellsDocumentProperty>]
108
- def get_metadata(file, opts = {})
109
- data, _status_code, _headers = get_metadata_with_http_info(file, opts)
110
- return data
111
- end
112
-
113
- #
114
- #
115
- # @param file File to upload
116
- # @param [Hash] opts the optional parameters
117
- # @option opts [String] :type
118
- # @return [Array<(Array<CellsDocumentProperty>, Fixnum, Hash)>] Array<CellsDocumentProperty> data, response status code and response headers
119
- def get_metadata_with_http_info(file, opts = {})
120
- if @api_client.config.debugging
121
- @api_client.config.logger.debug "Calling API: LiteCellsApi.get_metadata ..."
122
- end
123
- @api_client.request_token_if_needed
124
- # verify the required parameter 'file' is set
125
- if @api_client.config.client_side_validation && file.nil?
126
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.get_metadata"
127
- end
128
- # resource path
129
- local_var_path = "/cells/metadata/get"
130
-
131
- # query parameters
132
- query_params = {}
133
- query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
134
-
135
- # header parameters
136
- header_params = {}
137
- # HTTP header 'Accept' (if needed)
138
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
139
- # HTTP header 'Content-Type'
140
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
141
-
142
- # form parameters
143
- form_params = {}
144
- file.each do |filename , context|
145
- form_params[filename] = context
146
- end
147
-
148
- # http body (model)
149
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
150
- post_body = ""
151
- #auth_names = []
152
- auth_names = ['JWT']
153
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
154
- :header_params => header_params,
155
- :query_params => query_params,
156
- :form_params => form_params,
157
- :body => post_body,
158
- :auth_names => auth_names,
159
- :return_type => 'Array<CellsDocumentProperty>')
160
- if @api_client.config.debugging
161
- @api_client.config.logger.debug "API called: LiteCellsApi#get_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
162
- end
163
- return data, status_code, headers
164
- end
165
-
166
- #
167
- #
168
- # @param file File to upload
169
- # @param datasource
170
- # @param [Hash] opts the optional parameters
171
- # @option opts [String] :format (default to Xlsx)
172
- # @return [FilesResult]
173
- def post_assemble(file, datasource, opts = {})
174
- data, _status_code, _headers = post_assemble_with_http_info(file, datasource, opts)
175
- return data
176
- end
177
-
178
- #
179
- #
180
- # @param file File to upload
181
- # @param datasource
182
- # @param [Hash] opts the optional parameters
183
- # @option opts [String] :format
184
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
185
- def post_assemble_with_http_info(file, datasource, opts = {})
186
- if @api_client.config.debugging
187
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_assemble ..."
188
- end
189
- @api_client.request_token_if_needed
190
- # verify the required parameter 'file' is set
191
- if @api_client.config.client_side_validation && file.nil?
192
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_assemble"
193
- end
194
- # verify the required parameter 'datasource' is set
195
- if @api_client.config.client_side_validation && datasource.nil?
196
- fail ArgumentError, "Missing the required parameter 'datasource' when calling LiteCellsApi.post_assemble"
197
- end
198
- # resource path
199
- local_var_path = "/cells/assemble"
200
-
201
- # query parameters
202
- query_params = {}
203
- query_params[:'datasource'] = datasource
204
- query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
205
-
206
- # header parameters
207
- header_params = {}
208
- # HTTP header 'Accept' (if needed)
209
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
210
- # HTTP header 'Content-Type'
211
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
212
- # header_params['Content-Type'] == 'multipart/form-data'
213
- # form parameters
214
- form_params = {}
215
- file.each do |filename , context|
216
- form_params[filename] = context
217
- end
218
-
219
- # http body (model)
220
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
221
- post_body = ""
222
- #auth_names = []
223
- auth_names = ['JWT']
224
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
225
- :header_params => header_params,
226
- :query_params => query_params,
227
- :form_params => form_params,
228
- :body => post_body,
229
- :auth_names => auth_names,
230
- :return_type => 'FilesResult')
231
- if @api_client.config.debugging
232
- @api_client.config.logger.debug "API called: LiteCellsApi#post_assemble\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
- end
234
- return data, status_code, headers
235
- end
236
-
237
- #
238
- #
239
- # @param file File to upload
240
- # @param objecttype
241
- # @param [Hash] opts the optional parameters
242
- # @return [FilesResult]
243
- def post_clear_objects(file, objecttype, opts = {})
244
- data, _status_code, _headers = post_clear_objects_with_http_info(file, objecttype, opts)
245
- return data
246
- end
247
-
248
- #
249
- #
250
- # @param file File to upload
251
- # @param objecttype
252
- # @param [Hash] opts the optional parameters
253
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
254
- def post_clear_objects_with_http_info(file, objecttype, opts = {})
255
- if @api_client.config.debugging
256
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_clear_objects ..."
257
- end
258
- @api_client.request_token_if_needed
259
- # verify the required parameter 'file' is set
260
- if @api_client.config.client_side_validation && file.nil?
261
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_clear_objects"
262
- end
263
- # verify the required parameter 'objecttype' is set
264
- if @api_client.config.client_side_validation && objecttype.nil?
265
- fail ArgumentError, "Missing the required parameter 'objecttype' when calling LiteCellsApi.post_clear_objects"
266
- end
267
- # resource path
268
- local_var_path = "/cells/clearobjects"
269
-
270
- # query parameters
271
- query_params = {}
272
- query_params[:'objecttype'] = objecttype
273
-
274
- # header parameters
275
- header_params = {}
276
- # HTTP header 'Accept' (if needed)
277
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
278
- # HTTP header 'Content-Type'
279
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
280
-
281
- # form parameters
282
- form_params = {}
283
- file.each do |filename , context|
284
- form_params[filename] = context
285
- end
286
-
287
- # http body (model)
288
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
289
- post_body = ""
290
- #auth_names = []
291
- auth_names = ['JWT']
292
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
293
- :header_params => header_params,
294
- :query_params => query_params,
295
- :form_params => form_params,
296
- :body => post_body,
297
- :auth_names => auth_names,
298
- :return_type => 'FilesResult')
299
- if @api_client.config.debugging
300
- @api_client.config.logger.debug "API called: LiteCellsApi#post_clear_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
301
- end
302
- return data, status_code, headers
303
- end
304
-
305
- #
306
- #
307
- # @param file File to upload
308
- # @param object_type
309
- # @param format
310
- # @param [Hash] opts the optional parameters
311
- # @return [FilesResult]
312
- def post_export(file, object_type, format, opts = {})
313
- data, _status_code, _headers = post_export_with_http_info(file, object_type, format, opts)
314
- return data
315
- end
316
-
317
- #
318
- #
319
- # @param file File to upload
320
- # @param object_type
321
- # @param format
322
- # @param [Hash] opts the optional parameters
323
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
324
- def post_export_with_http_info(file, object_type, format, opts = {})
325
- if @api_client.config.debugging
326
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_export ..."
327
- end
328
- @api_client.request_token_if_needed
329
- # verify the required parameter 'file' is set
330
- if @api_client.config.client_side_validation && file.nil?
331
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_export"
332
- end
333
- # verify the required parameter 'object_type' is set
334
- if @api_client.config.client_side_validation && object_type.nil?
335
- fail ArgumentError, "Missing the required parameter 'object_type' when calling LiteCellsApi.post_export"
336
- end
337
- # verify the required parameter 'format' is set
338
- if @api_client.config.client_side_validation && format.nil?
339
- fail ArgumentError, "Missing the required parameter 'format' when calling LiteCellsApi.post_export"
340
- end
341
- # resource path
342
- local_var_path = "/cells/export"
343
-
344
- # query parameters
345
- query_params = {}
346
- query_params[:'objectType'] = object_type
347
- query_params[:'format'] = format
348
-
349
- # header parameters
350
- header_params = {}
351
- # HTTP header 'Accept' (if needed)
352
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
353
- # HTTP header 'Content-Type'
354
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
355
-
356
- # form parameters
357
- form_params = {}
358
- file.each do |filename , context|
359
- form_params[filename] = context
360
- end
361
-
362
- # http body (model)
363
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
364
- post_body = ""
365
- #auth_names = []
366
- auth_names = ['JWT']
367
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
368
- :header_params => header_params,
369
- :query_params => query_params,
370
- :form_params => form_params,
371
- :body => post_body,
372
- :auth_names => auth_names,
373
- :return_type => 'FilesResult')
374
- if @api_client.config.debugging
375
- @api_client.config.logger.debug "API called: LiteCellsApi#post_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
376
- end
377
- return data, status_code, headers
378
- end
379
-
380
- #
381
- #
382
- # @param file File to upload
383
- # @param import_data
384
- # @param [Hash] opts the optional parameters
385
- # @return [FilesResult]
386
- def post_import(file, import_data, opts = {})
387
- data, _status_code, _headers = post_import_with_http_info(file, import_data, opts)
388
- return data
389
- end
390
-
391
- #
392
- #
393
- # @param file File to upload
394
- # @param import_data
395
- # @param [Hash] opts the optional parameters
396
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
397
- def post_import_with_http_info(file, import_data, opts = {})
398
- if @api_client.config.debugging
399
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_import ..."
400
- end
401
- @api_client.request_token_if_needed
402
- # verify the required parameter 'file' is set
403
- if @api_client.config.client_side_validation && file.nil?
404
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_import"
405
- end
406
- # verify the required parameter 'import_data' is set
407
- if @api_client.config.client_side_validation && import_data.nil?
408
- fail ArgumentError, "Missing the required parameter 'import_data' when calling LiteCellsApi.post_import"
409
- end
410
- # resource path
411
- local_var_path = "/cells/import"
412
-
413
- # query parameters
414
- query_params = {}
415
-
416
- # header parameters
417
- header_params = {}
418
- # HTTP header 'Accept' (if needed)
419
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
420
- # HTTP header 'Content-Type'
421
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
422
-
423
- # form parameters
424
- form_params = {}
425
- file.each do |filename , context|
426
- form_params[filename] = context
427
- end
428
-
429
- # http body (model)
430
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
431
- post_body = ""
432
-
433
- # http body (model)
434
- post_body = @api_client.object_to_http_body(import_data)
435
- if post_body
436
- form_params['documentproperties'] = post_body.to_json
437
- end
438
-
439
- #auth_names = []
440
- auth_names = ['JWT']
441
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
442
- :header_params => header_params,
443
- :query_params => query_params,
444
- :form_params => form_params,
445
- :body => post_body,
446
- :auth_names => auth_names,
447
- :return_type => 'FilesResult')
448
- if @api_client.config.debugging
449
- @api_client.config.logger.debug "API called: LiteCellsApi#post_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
450
- end
451
- return data, status_code, headers
452
- end
453
-
454
- #
455
- #
456
- # @param file File to upload
457
- # @param [Hash] opts the optional parameters
458
- # @option opts [String] :format (default to xlsx)
459
- # @option opts [BOOLEAN] :merge_to_one_sheet (default to false)
460
- # @return [FileInfo]
461
- def post_merge(file, opts = {})
462
- data, _status_code, _headers = post_merge_with_http_info(file, opts)
463
- return data
464
- end
465
-
466
- #
467
- #
468
- # @param file File to upload
469
- # @param [Hash] opts the optional parameters
470
- # @option opts [String] :format
471
- # @option opts [BOOLEAN] :merge_to_one_sheet
472
- # @return [Array<(FileInfo, Fixnum, Hash)>] FileInfo data, response status code and response headers
473
- def post_merge_with_http_info(file, opts = {})
474
- if @api_client.config.debugging
475
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_merge ..."
476
- end
477
- @api_client.request_token_if_needed
478
- # verify the required parameter 'file' is set
479
- if @api_client.config.client_side_validation && file.nil?
480
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_merge"
481
- end
482
- # resource path
483
- local_var_path = "/cells/merge"
484
-
485
- # query parameters
486
- query_params = {}
487
- query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
488
- query_params[:'mergeToOneSheet'] = opts[:'merge_to_one_sheet'] if !opts[:'merge_to_one_sheet'].nil?
489
-
490
- # header parameters
491
- header_params = {}
492
- # HTTP header 'Accept' (if needed)
493
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
494
- # HTTP header 'Content-Type'
495
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
496
-
497
- # form parameters
498
- form_params = {}
499
- file.each do |filename , context|
500
- form_params[filename] = context
501
- end
502
-
503
- # http body (model)
504
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
505
- post_body = ""
506
- #auth_names = []
507
- auth_names = ['JWT']
508
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
509
- :header_params => header_params,
510
- :query_params => query_params,
511
- :form_params => form_params,
512
- :body => post_body,
513
- :auth_names => auth_names,
514
- :return_type => 'FileInfo')
515
- if @api_client.config.debugging
516
- @api_client.config.logger.debug "API called: LiteCellsApi#post_merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
517
- end
518
- return data, status_code, headers
519
- end
520
-
521
- #
522
- #
523
- # @param file File to upload
524
- # @param document_properties Cells document property.
525
- # @param [Hash] opts the optional parameters
526
- # @return [FilesResult]
527
- def post_metadata(file, document_properties, opts = {})
528
- data, _status_code, _headers = post_metadata_with_http_info(file, document_properties, opts)
529
- return data
530
- end
531
-
532
- #
533
- #
534
- # @param file File to upload
535
- # @param document_properties Cells document property.
536
- # @param [Hash] opts the optional parameters
537
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
538
- def post_metadata_with_http_info(file, document_properties, opts = {})
539
- if @api_client.config.debugging
540
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_metadata ..."
541
- end
542
- @api_client.request_token_if_needed
543
- # verify the required parameter 'file' is set
544
- if @api_client.config.client_side_validation && file.nil?
545
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_metadata"
546
- end
547
- # verify the required parameter 'document_properties' is set
548
- if @api_client.config.client_side_validation && document_properties.nil?
549
- fail ArgumentError, "Missing the required parameter 'document_properties' when calling LiteCellsApi.post_metadata"
550
- end
551
- # resource path
552
- local_var_path = "/cells/metadata/update"
553
-
554
- # query parameters
555
- query_params = {}
556
-
557
- # header parameters
558
- header_params = {}
559
- # HTTP header 'Accept' (if needed)
560
- header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
561
- # HTTP header 'Content-Type'
562
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
563
-
564
- # form parameters
565
- form_params = {}
566
- file.each do |filename , context|
567
- form_params[filename] = context
568
- end
569
-
570
- # http body (model)
571
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
572
- post_body = ""
573
-
574
- # http body (model)
575
- post_body = @api_client.object_to_http_body(document_properties)
576
- if post_body
577
- form_params['documentproperties'] = post_body.to_json
578
- end
579
- #auth_names = []
580
- auth_names = ['JWT']
581
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
582
- :header_params => header_params,
583
- :query_params => query_params,
584
- :form_params => form_params,
585
- :body => post_body,
586
- :auth_names => auth_names,
587
- :return_type => 'FilesResult')
588
- if @api_client.config.debugging
589
- @api_client.config.logger.debug "API called: LiteCellsApi#post_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
590
- end
591
- return data, status_code, headers
592
- end
593
-
594
- #
595
- #
596
- # @param file File to upload
597
- # @param password
598
- # @param [Hash] opts the optional parameters
599
- # @return [FilesResult]
600
- def post_protect(file, password, opts = {})
601
- data, _status_code, _headers = post_protect_with_http_info(file, password, opts)
602
- return data
603
- end
604
-
605
- #
606
- #
607
- # @param file File to upload
608
- # @param password
609
- # @param [Hash] opts the optional parameters
610
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
611
- def post_protect_with_http_info(file, password, opts = {})
612
- if @api_client.config.debugging
613
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_protect ..."
614
- end
615
- @api_client.request_token_if_needed
616
- # verify the required parameter 'file' is set
617
- if @api_client.config.client_side_validation && file.nil?
618
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_protect"
619
- end
620
- # verify the required parameter 'password' is set
621
- if @api_client.config.client_side_validation && password.nil?
622
- fail ArgumentError, "Missing the required parameter 'password' when calling LiteCellsApi.post_protect"
623
- end
624
- # resource path
625
- local_var_path = "/cells/protect"
626
-
627
- # query parameters
628
- query_params = {}
629
- query_params[:'password'] = password
630
-
631
- # header parameters
632
- header_params = {}
633
- # HTTP header 'Accept' (if needed)
634
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
635
- # HTTP header 'Content-Type'
636
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
637
-
638
- # form parameters
639
- form_params = {}
640
- file.each do |filename , context|
641
- form_params[filename] = context
642
- end
643
-
644
- # http body (model)
645
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
646
- post_body = ""
647
- #auth_names = []
648
- auth_names = ['JWT']
649
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
650
- :header_params => header_params,
651
- :query_params => query_params,
652
- :form_params => form_params,
653
- :body => post_body,
654
- :auth_names => auth_names,
655
- :return_type => 'FilesResult')
656
- if @api_client.config.debugging
657
- @api_client.config.logger.debug "API called: LiteCellsApi#post_protect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
658
- end
659
- return data, status_code, headers
660
- end
661
-
662
- #
663
- #
664
- # @param file File to upload
665
- # @param text
666
- # @param [Hash] opts the optional parameters
667
- # @option opts [String] :password
668
- # @option opts [String] :sheetname
669
- # @return [Array<TextItem>]
670
- def post_search(file, text, opts = {})
671
- data, _status_code, _headers = post_search_with_http_info(file, text, opts)
672
- return data
673
- end
674
-
675
- #
676
- #
677
- # @param file File to upload
678
- # @param text
679
- # @param [Hash] opts the optional parameters
680
- # @option opts [String] :password
681
- # @option opts [String] :sheetname
682
- # @return [Array<(Array<TextItem>, Fixnum, Hash)>] Array<TextItem> data, response status code and response headers
683
- def post_search_with_http_info(file, text, opts = {})
684
- if @api_client.config.debugging
685
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_search ..."
686
- end
687
- @api_client.request_token_if_needed
688
- # verify the required parameter 'file' is set
689
- if @api_client.config.client_side_validation && file.nil?
690
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_search"
691
- end
692
- # verify the required parameter 'text' is set
693
- if @api_client.config.client_side_validation && text.nil?
694
- fail ArgumentError, "Missing the required parameter 'text' when calling LiteCellsApi.post_search"
695
- end
696
- # resource path
697
- local_var_path = "/cells/search"
698
-
699
- # query parameters
700
- query_params = {}
701
- query_params[:'text'] = text
702
- query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
703
- query_params[:'sheetname'] = opts[:'sheetname'] if !opts[:'sheetname'].nil?
704
-
705
- # header parameters
706
- header_params = {}
707
- # HTTP header 'Accept' (if needed)
708
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
709
- # HTTP header 'Content-Type'
710
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
711
-
712
- # form parameters
713
- form_params = {}
714
- file.each do |filename , context|
715
- form_params[filename] = context
716
- end
717
-
718
- # http body (model)
719
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
720
- post_body = ""
721
- #auth_names = []
722
- auth_names = ['JWT']
723
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
724
- :header_params => header_params,
725
- :query_params => query_params,
726
- :form_params => form_params,
727
- :body => post_body,
728
- :auth_names => auth_names,
729
- :return_type => 'Array<TextItem>')
730
- if @api_client.config.debugging
731
- @api_client.config.logger.debug "API called: LiteCellsApi#post_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
732
- end
733
- return data, status_code, headers
734
- end
735
-
736
- #
737
- #
738
- # @param file File to upload
739
- # @param format
740
- # @param [Hash] opts the optional parameters
741
- # @option opts [String] :password
742
- # @option opts [Integer] :from
743
- # @option opts [Integer] :to
744
- # @return [FilesResult]
745
- def post_split(file, format, opts = {})
746
- data, _status_code, _headers = post_split_with_http_info(file, format, opts)
747
- return data
748
- end
749
-
750
- #
751
- #
752
- # @param file File to upload
753
- # @param format
754
- # @param [Hash] opts the optional parameters
755
- # @option opts [String] :password
756
- # @option opts [Integer] :from
757
- # @option opts [Integer] :to
758
- # @option opts [String] :path
759
- # @option opts [String] :storage_name
760
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
761
- def post_split_with_http_info(file, format, opts = {})
762
- if @api_client.config.debugging
763
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_split ..."
764
- end
765
- @api_client.request_token_if_needed
766
- # verify the required parameter 'file' is set
767
- if @api_client.config.client_side_validation && file.nil?
768
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_split"
769
- end
770
- # verify the required parameter 'format' is set
771
- if @api_client.config.client_side_validation && format.nil?
772
- fail ArgumentError, "Missing the required parameter 'format' when calling LiteCellsApi.post_split"
773
- end
774
- # resource path
775
- local_var_path = "/cells/split"
776
-
777
- # query parameters
778
- query_params = {}
779
- query_params[:'format'] = format
780
- query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
781
- query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
782
- query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
783
-
784
- # header parameters
785
- header_params = {}
786
- # HTTP header 'Accept' (if needed)
787
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
788
- # HTTP header 'Content-Type'
789
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
790
-
791
- # form parameters
792
- form_params = {}
793
- file.each do |filename , context|
794
- form_params[filename] = context
795
- end
796
-
797
- # http body (model)
798
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
799
- post_body = ""
800
- #auth_names = []
801
- auth_names = ['JWT']
802
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
803
- :header_params => header_params,
804
- :query_params => query_params,
805
- :form_params => form_params,
806
- :body => post_body,
807
- :auth_names => auth_names,
808
- :return_type => 'FilesResult')
809
- if @api_client.config.debugging
810
- @api_client.config.logger.debug "API called: LiteCellsApi#post_split\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
811
- end
812
- return data, status_code, headers
813
- end
814
-
815
- #
816
- #
817
- # @param file File to upload
818
- # @param password
819
- # @param [Hash] opts the optional parameters
820
- # @return [FilesResult]
821
- def post_unlock(file, password, opts = {})
822
- data, _status_code, _headers = post_unlock_with_http_info(file, password, opts)
823
- return data
824
- end
825
-
826
- #
827
- #
828
- # @param file File to upload
829
- # @param password
830
- # @param [Hash] opts the optional parameters
831
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
832
- def post_unlock_with_http_info(file, password, opts = {})
833
- if @api_client.config.debugging
834
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_unlock ..."
835
- end
836
- @api_client.request_token_if_needed
837
- # verify the required parameter 'file' is set
838
- if @api_client.config.client_side_validation && file.nil?
839
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_unlock"
840
- end
841
- # verify the required parameter 'password' is set
842
- if @api_client.config.client_side_validation && password.nil?
843
- fail ArgumentError, "Missing the required parameter 'password' when calling LiteCellsApi.post_unlock"
844
- end
845
- # resource path
846
- local_var_path = "/cells/unlock"
847
-
848
- # query parameters
849
- query_params = {}
850
- query_params[:'password'] = password
851
-
852
- # header parameters
853
- header_params = {}
854
- # HTTP header 'Accept' (if needed)
855
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
856
- # HTTP header 'Content-Type'
857
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
858
-
859
- # form parameters
860
- form_params = {}
861
- file.each do |filename , context|
862
- form_params[filename] = context
863
- end
864
-
865
- # http body (model)
866
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
867
- post_body = ""
868
- #auth_names = []
869
- auth_names = ['JWT']
870
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
871
- :header_params => header_params,
872
- :query_params => query_params,
873
- :form_params => form_params,
874
- :body => post_body,
875
- :auth_names => auth_names,
876
- :return_type => 'FilesResult')
877
- if @api_client.config.debugging
878
- @api_client.config.logger.debug "API called: LiteCellsApi#post_unlock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
879
- end
880
- return data, status_code, headers
881
- end
882
-
883
- #
884
- #
885
- # @param file File to upload
886
- # @param text
887
- # @param color
888
- # @param [Hash] opts the optional parameters
889
- # @return [FilesResult]
890
- def post_watermark(file, text, color, opts = {})
891
- data, _status_code, _headers = post_watermark_with_http_info(file, text, color, opts)
892
- return data
893
- end
894
-
895
- #
896
- #
897
- # @param file File to upload
898
- # @param text
899
- # @param color
900
- # @param [Hash] opts the optional parameters
901
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
902
- def post_watermark_with_http_info(file, text, color, opts = {})
903
- if @api_client.config.debugging
904
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_watermark ..."
905
- end
906
- @api_client.request_token_if_needed
907
- # verify the required parameter 'file' is set
908
- if @api_client.config.client_side_validation && file.nil?
909
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_watermark"
910
- end
911
- # verify the required parameter 'text' is set
912
- if @api_client.config.client_side_validation && text.nil?
913
- fail ArgumentError, "Missing the required parameter 'text' when calling LiteCellsApi.post_watermark"
914
- end
915
- # verify the required parameter 'color' is set
916
- if @api_client.config.client_side_validation && color.nil?
917
- fail ArgumentError, "Missing the required parameter 'color' when calling LiteCellsApi.post_watermark"
918
- end
919
- # resource path
920
- local_var_path = "/cells/watermark"
921
-
922
- # query parameters
923
- query_params = {}
924
- query_params[:'text'] = text
925
- query_params[:'color'] = color
926
-
927
- # header parameters
928
- header_params = {}
929
- # HTTP header 'Accept' (if needed)
930
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
931
- # HTTP header 'Content-Type'
932
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
933
-
934
- # form parameters
935
- form_params = {}
936
- file.each do |filename , context|
937
- form_params[filename] = context
938
- end
939
-
940
- # http body (model)
941
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
942
- post_body = ""
943
- #auth_names = []
944
- auth_names = ['JWT']
945
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
946
- :header_params => header_params,
947
- :query_params => query_params,
948
- :form_params => form_params,
949
- :body => post_body,
950
- :auth_names => auth_names,
951
- :return_type => 'FilesResult')
952
- if @api_client.config.debugging
953
- @api_client.config.logger.debug "API called: LiteCellsApi#post_watermark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
954
- end
955
- return data, status_code, headers
956
- end
957
-
958
- #
959
- #
960
- # @param file File to upload
961
- # @param compress_level
962
- # @param [Hash] opts the optional parameters
963
- # @return [FilesResult]
964
- def post_compress(file, compress_level, opts = {})
965
- data, _status_code, _headers = post_compress_with_http_info(file, compress_level, opts)
966
- return data
967
- end
968
-
969
- #
970
- #
971
- # @param file File to upload
972
- # @param compress_level
973
- # @param [Hash] opts the optional parameters
974
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
975
- def post_compress_with_http_info(file, compress_level, opts = {})
976
- if @api_client.config.debugging
977
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_compress ..."
978
- end
979
- @api_client.request_token_if_needed
980
- # verify the required parameter 'file' is set
981
- if @api_client.config.client_side_validation && file.nil?
982
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_compress"
983
- end
984
- # verify the required parameter 'compress_level' is set
985
- if @api_client.config.client_side_validation && compress_level.nil?
986
- fail ArgumentError, "Missing the required parameter 'compress_level' when calling LiteCellsApi.post_compress"
987
- end
988
-
989
- # resource path
990
- local_var_path = "/cells/compress"
991
-
992
- # query parameters
993
- query_params = {}
994
- query_params[:'compressLevel'] = compress_level
995
-
996
- # header parameters
997
- header_params = {}
998
- # HTTP header 'Accept' (if needed)
999
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1000
- # HTTP header 'Content-Type'
1001
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1002
-
1003
- # form parameters
1004
- form_params = {}
1005
- file.each do |filename , context|
1006
- form_params[filename] = context
1007
- end
1008
-
1009
- # http body (model)
1010
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1011
- post_body = ""
1012
- #auth_names = []
1013
- auth_names = ['JWT']
1014
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1015
- :header_params => header_params,
1016
- :query_params => query_params,
1017
- :form_params => form_params,
1018
- :body => post_body,
1019
- :auth_names => auth_names,
1020
- :return_type => 'FilesResult')
1021
- if @api_client.config.debugging
1022
- @api_client.config.logger.debug "API called: LiteCellsApi#post_compress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1023
- end
1024
- return data, status_code, headers
1025
- end
1026
-
1027
- #
1028
- #
1029
- # @param file File to upload
1030
- # @param text
1031
- # @param newtext
1032
- # @param [Hash] opts the optional parameters
1033
- # @param password
1034
- # @param sheet_name
1035
- # @return [FilesResult]
1036
- def post_replace(file, text, newtext, opts = {})
1037
- data, _status_code, _headers = post_replace_with_http_info(file, text, newtext, opts)
1038
- return data
1039
- end
1040
-
1041
- #
1042
- #
1043
- # @param file File to upload
1044
- # @param text
1045
- # @param newtext
1046
- # @param [Hash] opts the optional parameters
1047
- # @param password
1048
- # @param sheet_name
1049
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
1050
- def post_replace_with_http_info(file, text, newtext, opts = {})
1051
- if @api_client.config.debugging
1052
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_replace ..."
1053
- end
1054
- @api_client.request_token_if_needed
1055
- # verify the required parameter 'file' is set
1056
- if @api_client.config.client_side_validation && file.nil?
1057
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_replace"
1058
- end
1059
- # verify the required parameter 'text' is set
1060
- if @api_client.config.client_side_validation && text.nil?
1061
- fail ArgumentError, "Missing the required parameter 'text' when calling LiteCellsApi.post_replace"
1062
- end
1063
- # verify the required parameter 'color' is set
1064
- if @api_client.config.client_side_validation && newtext.nil?
1065
- fail ArgumentError, "Missing the required parameter 'newtext' when calling LiteCellsApi.post_replace"
1066
- end
1067
- # resource path
1068
- local_var_path = "/cells/replace"
1069
-
1070
- # query parameters
1071
- query_params = {}
1072
- query_params[:'text'] = text
1073
- query_params[:'newtext'] = newtext
1074
- query_params[:'password'] = opts[:'password'] if !opts[:'storagpassworde_name'].nil?
1075
- query_params[:'sheetName'] = opts[:'sheet_name'] if !opts[:'sheet_name'].nil?
1076
- # header parameters
1077
- header_params = {}
1078
- # HTTP header 'Accept' (if needed)
1079
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1080
- # HTTP header 'Content-Type'
1081
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1082
-
1083
- # form parameters
1084
- form_params = {}
1085
- file.each do |filename , context|
1086
- form_params[filename] = context
1087
- end
1088
-
1089
- # http body (model)
1090
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1091
- post_body = ""
1092
- #auth_names = []
1093
- auth_names = ['JWT']
1094
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1095
- :header_params => header_params,
1096
- :query_params => query_params,
1097
- :form_params => form_params,
1098
- :body => post_body,
1099
- :auth_names => auth_names,
1100
- :return_type => 'FilesResult')
1101
- if @api_client.config.debugging
1102
- @api_client.config.logger.debug "API called: LiteCellsApi#post_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1103
- end
1104
- return data, status_code, headers
1105
- end
1106
- #
1107
- #
1108
- # @param file File to upload
1109
- # @param rotate_type
1110
- # @param format
1111
- # @return [FilesResult]
1112
- def post_reverse(file, rotate_type, format, opts = {})
1113
- data, _status_code, _headers = post_reverse_with_http_info(file, rotate_type, format, opts)
1114
- return data
1115
- end
1116
-
1117
- #
1118
- #
1119
- # @param file File to upload
1120
- # @param rotate_type
1121
- # @param format
1122
- # @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
1123
- def post_reverse_with_http_info(file, rotate_type, format, opts = {})
1124
- if @api_client.config.debugging
1125
- @api_client.config.logger.debug "Calling API: LiteCellsApi.post_reverse ..."
1126
- end
1127
- @api_client.request_token_if_needed
1128
- # verify the required parameter 'file' is set
1129
- if @api_client.config.client_side_validation && file.nil?
1130
- fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_reverse"
1131
- end
1132
- # verify the required parameter 'rotate_type' is set
1133
- if @api_client.config.client_side_validation && rotate_type.nil?
1134
- fail ArgumentError, "Missing the required parameter 'rotate_type' when calling LiteCellsApi.post_reverse"
1135
- end
1136
- # verify the required parameter 'color' is set
1137
- if @api_client.config.client_side_validation && format.nil?
1138
- fail ArgumentError, "Missing the required parameter 'format' when calling LiteCellsApi.post_reverse"
1139
- end
1140
- # resource path
1141
- local_var_path = "/cells/reverse"
1142
-
1143
- # query parameters
1144
- query_params = {}
1145
- query_params[:'rotateType'] = rotate_type
1146
- query_params[:'format'] = format
1147
- # header parameters
1148
- header_params = {}
1149
- # HTTP header 'Accept' (if needed)
1150
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1151
- # HTTP header 'Content-Type'
1152
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1153
-
1154
- # form parameters
1155
- form_params = {}
1156
- file.each do |filename , context|
1157
- form_params[filename] = context
1158
- end
1159
-
1160
- # http body (model)
1161
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1162
- post_body = ""
1163
- #auth_names = []
1164
- auth_names = ['JWT']
1165
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1166
- :header_params => header_params,
1167
- :query_params => query_params,
1168
- :form_params => form_params,
1169
- :body => post_body,
1170
- :auth_names => auth_names,
1171
- :return_type => 'FilesResult')
1172
- if @api_client.config.debugging
1173
- @api_client.config.logger.debug "API called: LiteCellsApi#post_reverse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1174
- end
1175
- return data, status_code, headers
1176
- end
1177
-
1178
- end
1179
- end