aspose_cells_cloud 21.5 → 21.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -5
- data/lib/aspose_cells_cloud.rb +3 -0
- data/lib/aspose_cells_cloud/api/lite_cells_api.rb +893 -0
- data/lib/aspose_cells_cloud/api_client.rb +3 -3
- data/lib/aspose_cells_cloud/models/cells_document_property.rb +46 -13
- data/lib/aspose_cells_cloud/models/file_info.rb +221 -0
- data/lib/aspose_cells_cloud/models/files_result.rb +200 -0
- data/lib/aspose_cells_cloud/models/pivot_item.rb +1 -1
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/spec/api/cells_assembly_spec.rb +44 -0
- data/spec/api/cells_clear_objects_spec.rb +43 -0
- data/spec/api/cells_export_spec.rb +43 -0
- data/spec/api/cells_merge_spec.rb +43 -0
- data/spec/api/cells_metadata_spec.rb +72 -0
- data/spec/api/cells_properties_api_spec.rb +1 -1
- data/spec/api/cells_protect_spec.rb +43 -0
- data/spec/api/cells_search_spec.rb +43 -0
- data/spec/api/cells_split_spec.rb +44 -0
- data/spec/api/cells_unlock_spec.rb +43 -0
- data/spec/api/cells_watermark_spec.rb +42 -0
- data/spec/spec_helper.rb +3 -0
- metadata +15 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c42f437476490bd3182080c4fd9d77387546c7c9eb35308a4373c76190c19a98
|
4
|
+
data.tar.gz: dde3ff8c31c7ba2130603d2506dbeb344a34ce649847e8d3b5d5267e3211e831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 420f538f2ebcf563603ec55fc128926a7c4983031de6cef0d1ab6828ae52619d91e4609af844d889dc27397fe6a18a1f92b6f12dbe27b7e9726b649bf3a2077d
|
7
|
+
data.tar.gz: 06c23e6025b48337d51f7a5540e799bb7f2f822bce415603290f3750ee847b2c6fc80b93a5585720d0db210be881cf1af9fb2208e38952800545b25634c81ea4
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/21.
|
1
|
+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/21.6)
|
2
2
|
|
3
3
|
|
4
4
|
# Ruby SDK for Spreadsheet Processing in the Cloud
|
@@ -21,11 +21,16 @@ Ruby Cloud SDK wraps Aspose.Cells REST API so you could seamlessly integrate Mic
|
|
21
21
|
- Convert worksheets to PDF, XPS & SVG formats.
|
22
22
|
- [Convert Excel files to popular formats](https://docs.aspose.cloud/cells/convert-excel-workbook-to-different-file-formats/).
|
23
23
|
|
24
|
-
## Feature & Enhancements in Version 21.
|
24
|
+
## Feature & Enhancements in Version 21.6
|
25
25
|
|
26
|
-
-
|
27
|
-
-
|
28
|
-
-
|
26
|
+
- Improvement document properties.
|
27
|
+
- Update the return value of put/post/delete.
|
28
|
+
- Improvement export API.
|
29
|
+
- Improve split API.
|
30
|
+
- Improve merge API.
|
31
|
+
- Improve unlock API.
|
32
|
+
- Improve protected API.
|
33
|
+
- Improve watermark API.
|
29
34
|
|
30
35
|
## Read & Write Spreadsheet Formats
|
31
36
|
|
data/lib/aspose_cells_cloud.rb
CHANGED
@@ -55,9 +55,11 @@ require 'aspose_cells_cloud/models/data_sorter'
|
|
55
55
|
require 'aspose_cells_cloud/models/disc_usage'
|
56
56
|
require 'aspose_cells_cloud/models/dynamic_filter'
|
57
57
|
require 'aspose_cells_cloud/models/error_details'
|
58
|
+
require 'aspose_cells_cloud/models/file_info'
|
58
59
|
require 'aspose_cells_cloud/models/file_source'
|
59
60
|
require 'aspose_cells_cloud/models/file_versions'
|
60
61
|
require 'aspose_cells_cloud/models/files_list'
|
62
|
+
require 'aspose_cells_cloud/models/files_result'
|
61
63
|
require 'aspose_cells_cloud/models/files_upload_result'
|
62
64
|
require 'aspose_cells_cloud/models/fill_format'
|
63
65
|
require 'aspose_cells_cloud/models/filter_column'
|
@@ -278,6 +280,7 @@ require 'aspose_cells_cloud/models/title'
|
|
278
280
|
|
279
281
|
# APIs
|
280
282
|
require 'aspose_cells_cloud/api/cells_api'
|
283
|
+
require 'aspose_cells_cloud/api/lite_cells_api'
|
281
284
|
|
282
285
|
module AsposeCellsCloud
|
283
286
|
class << self
|
@@ -0,0 +1,893 @@
|
|
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
|
+
@api_client = api_client
|
31
|
+
@api_client.config.client_secret = client_secret
|
32
|
+
@api_client.config.client_id = client_id
|
33
|
+
@api_client.config.api_version = app_version
|
34
|
+
@api_client.config.host = app_host
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
#
|
39
|
+
# @param file File to upload
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @option opts [String] :type (default to all)
|
42
|
+
# @return [FilesResult]
|
43
|
+
def delete_metadata(file, opts = {})
|
44
|
+
data, _status_code, _headers = delete_metadata_with_http_info(file, opts)
|
45
|
+
return data
|
46
|
+
end
|
47
|
+
|
48
|
+
#
|
49
|
+
#
|
50
|
+
# @param file File to upload
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @option opts [String] :type
|
53
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
54
|
+
def delete_metadata_with_http_info(file, opts = {})
|
55
|
+
if @api_client.config.debugging
|
56
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.delete_metadata ..."
|
57
|
+
end
|
58
|
+
@api_client.request_token_if_needed
|
59
|
+
# verify the required parameter 'file' is set
|
60
|
+
if @api_client.config.client_side_validation && file.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.delete_metadata"
|
62
|
+
end
|
63
|
+
# resource path
|
64
|
+
local_var_path = "/cells/metadata/delete"
|
65
|
+
|
66
|
+
# query parameters
|
67
|
+
query_params = {}
|
68
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
69
|
+
|
70
|
+
# header parameters
|
71
|
+
header_params = {}
|
72
|
+
# HTTP header 'Accept' (if needed)
|
73
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
74
|
+
# HTTP header 'Content-Type'
|
75
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
76
|
+
|
77
|
+
# form parameters
|
78
|
+
form_params = {}
|
79
|
+
file.each do |filename , context|
|
80
|
+
form_params[filename] = context
|
81
|
+
end
|
82
|
+
|
83
|
+
# http body (model)
|
84
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
85
|
+
post_body = ""
|
86
|
+
#auth_names = []
|
87
|
+
auth_names = ['JWT']
|
88
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
89
|
+
:header_params => header_params,
|
90
|
+
:query_params => query_params,
|
91
|
+
:form_params => form_params,
|
92
|
+
:body => post_body,
|
93
|
+
:auth_names => auth_names,
|
94
|
+
:return_type => 'FilesResult')
|
95
|
+
if @api_client.config.debugging
|
96
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#delete_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
97
|
+
end
|
98
|
+
return data, status_code, headers
|
99
|
+
end
|
100
|
+
|
101
|
+
#
|
102
|
+
#
|
103
|
+
# @param file File to upload
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @option opts [String] :type (default to all)
|
106
|
+
# @return [Array<CellsDocumentProperty>]
|
107
|
+
def get_metadata(file, opts = {})
|
108
|
+
data, _status_code, _headers = get_metadata_with_http_info(file, opts)
|
109
|
+
return data
|
110
|
+
end
|
111
|
+
|
112
|
+
#
|
113
|
+
#
|
114
|
+
# @param file File to upload
|
115
|
+
# @param [Hash] opts the optional parameters
|
116
|
+
# @option opts [String] :type
|
117
|
+
# @return [Array<(Array<CellsDocumentProperty>, Fixnum, Hash)>] Array<CellsDocumentProperty> data, response status code and response headers
|
118
|
+
def get_metadata_with_http_info(file, opts = {})
|
119
|
+
if @api_client.config.debugging
|
120
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.get_metadata ..."
|
121
|
+
end
|
122
|
+
@api_client.request_token_if_needed
|
123
|
+
# verify the required parameter 'file' is set
|
124
|
+
if @api_client.config.client_side_validation && file.nil?
|
125
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.get_metadata"
|
126
|
+
end
|
127
|
+
# resource path
|
128
|
+
local_var_path = "/cells/metadata/get"
|
129
|
+
|
130
|
+
# query parameters
|
131
|
+
query_params = {}
|
132
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
133
|
+
|
134
|
+
# header parameters
|
135
|
+
header_params = {}
|
136
|
+
# HTTP header 'Accept' (if needed)
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
138
|
+
# HTTP header 'Content-Type'
|
139
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
140
|
+
|
141
|
+
# form parameters
|
142
|
+
form_params = {}
|
143
|
+
file.each do |filename , context|
|
144
|
+
form_params[filename] = context
|
145
|
+
end
|
146
|
+
|
147
|
+
# http body (model)
|
148
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
149
|
+
post_body = ""
|
150
|
+
#auth_names = []
|
151
|
+
auth_names = ['JWT']
|
152
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
153
|
+
:header_params => header_params,
|
154
|
+
:query_params => query_params,
|
155
|
+
:form_params => form_params,
|
156
|
+
:body => post_body,
|
157
|
+
:auth_names => auth_names,
|
158
|
+
:return_type => 'Array<CellsDocumentProperty>')
|
159
|
+
if @api_client.config.debugging
|
160
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#get_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
161
|
+
end
|
162
|
+
return data, status_code, headers
|
163
|
+
end
|
164
|
+
|
165
|
+
#
|
166
|
+
#
|
167
|
+
# @param file File to upload
|
168
|
+
# @param datasource
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @option opts [String] :format (default to Xlsx)
|
171
|
+
# @return [FilesResult]
|
172
|
+
def post_assemble(file, datasource, opts = {})
|
173
|
+
data, _status_code, _headers = post_assemble_with_http_info(file, datasource, opts)
|
174
|
+
return data
|
175
|
+
end
|
176
|
+
|
177
|
+
#
|
178
|
+
#
|
179
|
+
# @param file File to upload
|
180
|
+
# @param datasource
|
181
|
+
# @param [Hash] opts the optional parameters
|
182
|
+
# @option opts [String] :format
|
183
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
184
|
+
def post_assemble_with_http_info(file, datasource, opts = {})
|
185
|
+
if @api_client.config.debugging
|
186
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_assemble ..."
|
187
|
+
end
|
188
|
+
@api_client.request_token_if_needed
|
189
|
+
# verify the required parameter 'file' is set
|
190
|
+
if @api_client.config.client_side_validation && file.nil?
|
191
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_assemble"
|
192
|
+
end
|
193
|
+
# verify the required parameter 'datasource' is set
|
194
|
+
if @api_client.config.client_side_validation && datasource.nil?
|
195
|
+
fail ArgumentError, "Missing the required parameter 'datasource' when calling LiteCellsApi.post_assemble"
|
196
|
+
end
|
197
|
+
# resource path
|
198
|
+
local_var_path = "/cells/assemble"
|
199
|
+
|
200
|
+
# query parameters
|
201
|
+
query_params = {}
|
202
|
+
query_params[:'datasource'] = datasource
|
203
|
+
query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
|
204
|
+
|
205
|
+
# header parameters
|
206
|
+
header_params = {}
|
207
|
+
# HTTP header 'Accept' (if needed)
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
209
|
+
# HTTP header 'Content-Type'
|
210
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
211
|
+
# header_params['Content-Type'] == 'multipart/form-data'
|
212
|
+
# form parameters
|
213
|
+
form_params = {}
|
214
|
+
file.each do |filename , context|
|
215
|
+
form_params[filename] = context
|
216
|
+
end
|
217
|
+
|
218
|
+
# http body (model)
|
219
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
220
|
+
post_body = ""
|
221
|
+
#auth_names = []
|
222
|
+
auth_names = ['JWT']
|
223
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
224
|
+
:header_params => header_params,
|
225
|
+
:query_params => query_params,
|
226
|
+
:form_params => form_params,
|
227
|
+
:body => post_body,
|
228
|
+
:auth_names => auth_names,
|
229
|
+
:return_type => 'FilesResult')
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_assemble\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
|
+
end
|
233
|
+
return data, status_code, headers
|
234
|
+
end
|
235
|
+
|
236
|
+
#
|
237
|
+
#
|
238
|
+
# @param file File to upload
|
239
|
+
# @param objecttype
|
240
|
+
# @param [Hash] opts the optional parameters
|
241
|
+
# @return [FilesResult]
|
242
|
+
def post_clear_objects(file, objecttype, opts = {})
|
243
|
+
data, _status_code, _headers = post_clear_objects_with_http_info(file, objecttype, opts)
|
244
|
+
return data
|
245
|
+
end
|
246
|
+
|
247
|
+
#
|
248
|
+
#
|
249
|
+
# @param file File to upload
|
250
|
+
# @param objecttype
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
253
|
+
def post_clear_objects_with_http_info(file, objecttype, opts = {})
|
254
|
+
if @api_client.config.debugging
|
255
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_clear_objects ..."
|
256
|
+
end
|
257
|
+
@api_client.request_token_if_needed
|
258
|
+
# verify the required parameter 'file' is set
|
259
|
+
if @api_client.config.client_side_validation && file.nil?
|
260
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_clear_objects"
|
261
|
+
end
|
262
|
+
# verify the required parameter 'objecttype' is set
|
263
|
+
if @api_client.config.client_side_validation && objecttype.nil?
|
264
|
+
fail ArgumentError, "Missing the required parameter 'objecttype' when calling LiteCellsApi.post_clear_objects"
|
265
|
+
end
|
266
|
+
# resource path
|
267
|
+
local_var_path = "/cells/clearobjects"
|
268
|
+
|
269
|
+
# query parameters
|
270
|
+
query_params = {}
|
271
|
+
query_params[:'objecttype'] = objecttype
|
272
|
+
|
273
|
+
# header parameters
|
274
|
+
header_params = {}
|
275
|
+
# HTTP header 'Accept' (if needed)
|
276
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
277
|
+
# HTTP header 'Content-Type'
|
278
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
279
|
+
|
280
|
+
# form parameters
|
281
|
+
form_params = {}
|
282
|
+
file.each do |filename , context|
|
283
|
+
form_params[filename] = context
|
284
|
+
end
|
285
|
+
|
286
|
+
# http body (model)
|
287
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
288
|
+
post_body = ""
|
289
|
+
#auth_names = []
|
290
|
+
auth_names = ['JWT']
|
291
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
292
|
+
:header_params => header_params,
|
293
|
+
:query_params => query_params,
|
294
|
+
:form_params => form_params,
|
295
|
+
:body => post_body,
|
296
|
+
:auth_names => auth_names,
|
297
|
+
:return_type => 'FilesResult')
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_clear_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
+
end
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
|
304
|
+
#
|
305
|
+
#
|
306
|
+
# @param file File to upload
|
307
|
+
# @param object_type
|
308
|
+
# @param format
|
309
|
+
# @param [Hash] opts the optional parameters
|
310
|
+
# @return [FilesResult]
|
311
|
+
def post_export(file, object_type, format, opts = {})
|
312
|
+
data, _status_code, _headers = post_export_with_http_info(file, object_type, format, opts)
|
313
|
+
return data
|
314
|
+
end
|
315
|
+
|
316
|
+
#
|
317
|
+
#
|
318
|
+
# @param file File to upload
|
319
|
+
# @param object_type
|
320
|
+
# @param format
|
321
|
+
# @param [Hash] opts the optional parameters
|
322
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
323
|
+
def post_export_with_http_info(file, object_type, format, opts = {})
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_export ..."
|
326
|
+
end
|
327
|
+
@api_client.request_token_if_needed
|
328
|
+
# verify the required parameter 'file' is set
|
329
|
+
if @api_client.config.client_side_validation && file.nil?
|
330
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_export"
|
331
|
+
end
|
332
|
+
# verify the required parameter 'object_type' is set
|
333
|
+
if @api_client.config.client_side_validation && object_type.nil?
|
334
|
+
fail ArgumentError, "Missing the required parameter 'object_type' when calling LiteCellsApi.post_export"
|
335
|
+
end
|
336
|
+
# verify the required parameter 'format' is set
|
337
|
+
if @api_client.config.client_side_validation && format.nil?
|
338
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling LiteCellsApi.post_export"
|
339
|
+
end
|
340
|
+
# resource path
|
341
|
+
local_var_path = "/cells/export"
|
342
|
+
|
343
|
+
# query parameters
|
344
|
+
query_params = {}
|
345
|
+
query_params[:'objectType'] = object_type
|
346
|
+
query_params[:'format'] = format
|
347
|
+
|
348
|
+
# header parameters
|
349
|
+
header_params = {}
|
350
|
+
# HTTP header 'Accept' (if needed)
|
351
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
352
|
+
# HTTP header 'Content-Type'
|
353
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
354
|
+
|
355
|
+
# form parameters
|
356
|
+
form_params = {}
|
357
|
+
file.each do |filename , context|
|
358
|
+
form_params[filename] = context
|
359
|
+
end
|
360
|
+
|
361
|
+
# http body (model)
|
362
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
363
|
+
post_body = ""
|
364
|
+
#auth_names = []
|
365
|
+
auth_names = ['JWT']
|
366
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
367
|
+
:header_params => header_params,
|
368
|
+
:query_params => query_params,
|
369
|
+
:form_params => form_params,
|
370
|
+
:body => post_body,
|
371
|
+
:auth_names => auth_names,
|
372
|
+
:return_type => 'FilesResult')
|
373
|
+
if @api_client.config.debugging
|
374
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
375
|
+
end
|
376
|
+
return data, status_code, headers
|
377
|
+
end
|
378
|
+
|
379
|
+
#
|
380
|
+
#
|
381
|
+
# @param file File to upload
|
382
|
+
# @param [Hash] opts the optional parameters
|
383
|
+
# @option opts [String] :format (default to xlsx)
|
384
|
+
# @option opts [BOOLEAN] :merge_to_one_sheet (default to false)
|
385
|
+
# @return [FileInfo]
|
386
|
+
def post_merge(file, opts = {})
|
387
|
+
data, _status_code, _headers = post_merge_with_http_info(file, opts)
|
388
|
+
return data
|
389
|
+
end
|
390
|
+
|
391
|
+
#
|
392
|
+
#
|
393
|
+
# @param file File to upload
|
394
|
+
# @param [Hash] opts the optional parameters
|
395
|
+
# @option opts [String] :format
|
396
|
+
# @option opts [BOOLEAN] :merge_to_one_sheet
|
397
|
+
# @return [Array<(FileInfo, Fixnum, Hash)>] FileInfo data, response status code and response headers
|
398
|
+
def post_merge_with_http_info(file, opts = {})
|
399
|
+
if @api_client.config.debugging
|
400
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_merge ..."
|
401
|
+
end
|
402
|
+
@api_client.request_token_if_needed
|
403
|
+
# verify the required parameter 'file' is set
|
404
|
+
if @api_client.config.client_side_validation && file.nil?
|
405
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_merge"
|
406
|
+
end
|
407
|
+
# resource path
|
408
|
+
local_var_path = "/cells/merge"
|
409
|
+
|
410
|
+
# query parameters
|
411
|
+
query_params = {}
|
412
|
+
query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
|
413
|
+
query_params[:'mergeToOneSheet'] = opts[:'merge_to_one_sheet'] if !opts[:'merge_to_one_sheet'].nil?
|
414
|
+
|
415
|
+
# header parameters
|
416
|
+
header_params = {}
|
417
|
+
# HTTP header 'Accept' (if needed)
|
418
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
419
|
+
# HTTP header 'Content-Type'
|
420
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
421
|
+
|
422
|
+
# form parameters
|
423
|
+
form_params = {}
|
424
|
+
file.each do |filename , context|
|
425
|
+
form_params[filename] = context
|
426
|
+
end
|
427
|
+
|
428
|
+
# http body (model)
|
429
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
430
|
+
post_body = ""
|
431
|
+
#auth_names = []
|
432
|
+
auth_names = ['JWT']
|
433
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
434
|
+
:header_params => header_params,
|
435
|
+
:query_params => query_params,
|
436
|
+
:form_params => form_params,
|
437
|
+
:body => post_body,
|
438
|
+
:auth_names => auth_names,
|
439
|
+
:return_type => 'FileInfo')
|
440
|
+
if @api_client.config.debugging
|
441
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
442
|
+
end
|
443
|
+
return data, status_code, headers
|
444
|
+
end
|
445
|
+
|
446
|
+
#
|
447
|
+
#
|
448
|
+
# @param file File to upload
|
449
|
+
# @param document_properties Cells document property.
|
450
|
+
# @param [Hash] opts the optional parameters
|
451
|
+
# @return [FilesResult]
|
452
|
+
def post_metadata(file, document_properties, opts = {})
|
453
|
+
data, _status_code, _headers = post_metadata_with_http_info(file, document_properties, opts)
|
454
|
+
return data
|
455
|
+
end
|
456
|
+
|
457
|
+
#
|
458
|
+
#
|
459
|
+
# @param file File to upload
|
460
|
+
# @param document_properties Cells document property.
|
461
|
+
# @param [Hash] opts the optional parameters
|
462
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
463
|
+
def post_metadata_with_http_info(file, document_properties, opts = {})
|
464
|
+
if @api_client.config.debugging
|
465
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_metadata ..."
|
466
|
+
end
|
467
|
+
@api_client.request_token_if_needed
|
468
|
+
# verify the required parameter 'file' is set
|
469
|
+
if @api_client.config.client_side_validation && file.nil?
|
470
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_metadata"
|
471
|
+
end
|
472
|
+
# verify the required parameter 'document_properties' is set
|
473
|
+
if @api_client.config.client_side_validation && document_properties.nil?
|
474
|
+
fail ArgumentError, "Missing the required parameter 'document_properties' when calling LiteCellsApi.post_metadata"
|
475
|
+
end
|
476
|
+
# resource path
|
477
|
+
local_var_path = "/cells/metadata/update"
|
478
|
+
|
479
|
+
# query parameters
|
480
|
+
query_params = {}
|
481
|
+
|
482
|
+
# header parameters
|
483
|
+
header_params = {}
|
484
|
+
# HTTP header 'Accept' (if needed)
|
485
|
+
header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
|
486
|
+
# HTTP header 'Content-Type'
|
487
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
488
|
+
|
489
|
+
# form parameters
|
490
|
+
form_params = {}
|
491
|
+
file.each do |filename , context|
|
492
|
+
form_params[filename] = context
|
493
|
+
end
|
494
|
+
|
495
|
+
# http body (model)
|
496
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
497
|
+
post_body = ""
|
498
|
+
|
499
|
+
# http body (model)
|
500
|
+
post_body = @api_client.object_to_http_body(document_properties)
|
501
|
+
if post_body
|
502
|
+
form_params['documentproperties'] = post_body.to_json
|
503
|
+
end
|
504
|
+
#auth_names = []
|
505
|
+
auth_names = ['JWT']
|
506
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
507
|
+
:header_params => header_params,
|
508
|
+
:query_params => query_params,
|
509
|
+
:form_params => form_params,
|
510
|
+
:body => post_body,
|
511
|
+
:auth_names => auth_names,
|
512
|
+
:return_type => 'FilesResult')
|
513
|
+
if @api_client.config.debugging
|
514
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
515
|
+
end
|
516
|
+
return data, status_code, headers
|
517
|
+
end
|
518
|
+
|
519
|
+
#
|
520
|
+
#
|
521
|
+
# @param file File to upload
|
522
|
+
# @param password
|
523
|
+
# @param [Hash] opts the optional parameters
|
524
|
+
# @return [FilesResult]
|
525
|
+
def post_protect(file, password, opts = {})
|
526
|
+
data, _status_code, _headers = post_protect_with_http_info(file, password, opts)
|
527
|
+
return data
|
528
|
+
end
|
529
|
+
|
530
|
+
#
|
531
|
+
#
|
532
|
+
# @param file File to upload
|
533
|
+
# @param password
|
534
|
+
# @param [Hash] opts the optional parameters
|
535
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
536
|
+
def post_protect_with_http_info(file, password, opts = {})
|
537
|
+
if @api_client.config.debugging
|
538
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_protect ..."
|
539
|
+
end
|
540
|
+
@api_client.request_token_if_needed
|
541
|
+
# verify the required parameter 'file' is set
|
542
|
+
if @api_client.config.client_side_validation && file.nil?
|
543
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_protect"
|
544
|
+
end
|
545
|
+
# verify the required parameter 'password' is set
|
546
|
+
if @api_client.config.client_side_validation && password.nil?
|
547
|
+
fail ArgumentError, "Missing the required parameter 'password' when calling LiteCellsApi.post_protect"
|
548
|
+
end
|
549
|
+
# resource path
|
550
|
+
local_var_path = "/cells/protect"
|
551
|
+
|
552
|
+
# query parameters
|
553
|
+
query_params = {}
|
554
|
+
query_params[:'password'] = password
|
555
|
+
|
556
|
+
# header parameters
|
557
|
+
header_params = {}
|
558
|
+
# HTTP header 'Accept' (if needed)
|
559
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
560
|
+
# HTTP header 'Content-Type'
|
561
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
562
|
+
|
563
|
+
# form parameters
|
564
|
+
form_params = {}
|
565
|
+
file.each do |filename , context|
|
566
|
+
form_params[filename] = context
|
567
|
+
end
|
568
|
+
|
569
|
+
# http body (model)
|
570
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
571
|
+
post_body = ""
|
572
|
+
#auth_names = []
|
573
|
+
auth_names = ['JWT']
|
574
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
575
|
+
:header_params => header_params,
|
576
|
+
:query_params => query_params,
|
577
|
+
:form_params => form_params,
|
578
|
+
:body => post_body,
|
579
|
+
:auth_names => auth_names,
|
580
|
+
:return_type => 'FilesResult')
|
581
|
+
if @api_client.config.debugging
|
582
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_protect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
583
|
+
end
|
584
|
+
return data, status_code, headers
|
585
|
+
end
|
586
|
+
|
587
|
+
#
|
588
|
+
#
|
589
|
+
# @param file File to upload
|
590
|
+
# @param text
|
591
|
+
# @param [Hash] opts the optional parameters
|
592
|
+
# @option opts [String] :password
|
593
|
+
# @option opts [String] :sheetname
|
594
|
+
# @option opts [String] :path
|
595
|
+
# @option opts [String] :storage_name
|
596
|
+
# @return [Array<TextItem>]
|
597
|
+
def post_search(file, text, opts = {})
|
598
|
+
data, _status_code, _headers = post_search_with_http_info(file, text, opts)
|
599
|
+
return data
|
600
|
+
end
|
601
|
+
|
602
|
+
#
|
603
|
+
#
|
604
|
+
# @param file File to upload
|
605
|
+
# @param text
|
606
|
+
# @param [Hash] opts the optional parameters
|
607
|
+
# @option opts [String] :password
|
608
|
+
# @option opts [String] :sheetname
|
609
|
+
# @option opts [String] :path
|
610
|
+
# @option opts [String] :storage_name
|
611
|
+
# @return [Array<(Array<TextItem>, Fixnum, Hash)>] Array<TextItem> data, response status code and response headers
|
612
|
+
def post_search_with_http_info(file, text, opts = {})
|
613
|
+
if @api_client.config.debugging
|
614
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_search ..."
|
615
|
+
end
|
616
|
+
@api_client.request_token_if_needed
|
617
|
+
# verify the required parameter 'file' is set
|
618
|
+
if @api_client.config.client_side_validation && file.nil?
|
619
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_search"
|
620
|
+
end
|
621
|
+
# verify the required parameter 'text' is set
|
622
|
+
if @api_client.config.client_side_validation && text.nil?
|
623
|
+
fail ArgumentError, "Missing the required parameter 'text' when calling LiteCellsApi.post_search"
|
624
|
+
end
|
625
|
+
# resource path
|
626
|
+
local_var_path = "/cells/search"
|
627
|
+
|
628
|
+
# query parameters
|
629
|
+
query_params = {}
|
630
|
+
query_params[:'text'] = text
|
631
|
+
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
|
632
|
+
query_params[:'sheetname'] = opts[:'sheetname'] if !opts[:'sheetname'].nil?
|
633
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
634
|
+
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
635
|
+
|
636
|
+
# header parameters
|
637
|
+
header_params = {}
|
638
|
+
# HTTP header 'Accept' (if needed)
|
639
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
640
|
+
# HTTP header 'Content-Type'
|
641
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
642
|
+
|
643
|
+
# form parameters
|
644
|
+
form_params = {}
|
645
|
+
file.each do |filename , context|
|
646
|
+
form_params[filename] = context
|
647
|
+
end
|
648
|
+
|
649
|
+
# http body (model)
|
650
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
651
|
+
post_body = ""
|
652
|
+
#auth_names = []
|
653
|
+
auth_names = ['JWT']
|
654
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
655
|
+
:header_params => header_params,
|
656
|
+
:query_params => query_params,
|
657
|
+
:form_params => form_params,
|
658
|
+
:body => post_body,
|
659
|
+
:auth_names => auth_names,
|
660
|
+
:return_type => 'Array<TextItem>')
|
661
|
+
if @api_client.config.debugging
|
662
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
663
|
+
end
|
664
|
+
return data, status_code, headers
|
665
|
+
end
|
666
|
+
|
667
|
+
#
|
668
|
+
#
|
669
|
+
# @param file File to upload
|
670
|
+
# @param format
|
671
|
+
# @param [Hash] opts the optional parameters
|
672
|
+
# @option opts [String] :password
|
673
|
+
# @option opts [Integer] :from
|
674
|
+
# @option opts [Integer] :to
|
675
|
+
# @option opts [String] :path
|
676
|
+
# @option opts [String] :storage_name
|
677
|
+
# @return [FilesResult]
|
678
|
+
def post_split(file, format, opts = {})
|
679
|
+
data, _status_code, _headers = post_split_with_http_info(file, format, opts)
|
680
|
+
return data
|
681
|
+
end
|
682
|
+
|
683
|
+
#
|
684
|
+
#
|
685
|
+
# @param file File to upload
|
686
|
+
# @param format
|
687
|
+
# @param [Hash] opts the optional parameters
|
688
|
+
# @option opts [String] :password
|
689
|
+
# @option opts [Integer] :from
|
690
|
+
# @option opts [Integer] :to
|
691
|
+
# @option opts [String] :path
|
692
|
+
# @option opts [String] :storage_name
|
693
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
694
|
+
def post_split_with_http_info(file, format, opts = {})
|
695
|
+
if @api_client.config.debugging
|
696
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_split ..."
|
697
|
+
end
|
698
|
+
@api_client.request_token_if_needed
|
699
|
+
# verify the required parameter 'file' is set
|
700
|
+
if @api_client.config.client_side_validation && file.nil?
|
701
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_split"
|
702
|
+
end
|
703
|
+
# verify the required parameter 'format' is set
|
704
|
+
if @api_client.config.client_side_validation && format.nil?
|
705
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling LiteCellsApi.post_split"
|
706
|
+
end
|
707
|
+
# resource path
|
708
|
+
local_var_path = "/cells/split"
|
709
|
+
|
710
|
+
# query parameters
|
711
|
+
query_params = {}
|
712
|
+
query_params[:'format'] = format
|
713
|
+
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
|
714
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
715
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
716
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
717
|
+
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
718
|
+
|
719
|
+
# header parameters
|
720
|
+
header_params = {}
|
721
|
+
# HTTP header 'Accept' (if needed)
|
722
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
723
|
+
# HTTP header 'Content-Type'
|
724
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
725
|
+
|
726
|
+
# form parameters
|
727
|
+
form_params = {}
|
728
|
+
file.each do |filename , context|
|
729
|
+
form_params[filename] = context
|
730
|
+
end
|
731
|
+
|
732
|
+
# http body (model)
|
733
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
734
|
+
post_body = ""
|
735
|
+
#auth_names = []
|
736
|
+
auth_names = ['JWT']
|
737
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
738
|
+
:header_params => header_params,
|
739
|
+
:query_params => query_params,
|
740
|
+
:form_params => form_params,
|
741
|
+
:body => post_body,
|
742
|
+
:auth_names => auth_names,
|
743
|
+
:return_type => 'FilesResult')
|
744
|
+
if @api_client.config.debugging
|
745
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_split\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
746
|
+
end
|
747
|
+
return data, status_code, headers
|
748
|
+
end
|
749
|
+
|
750
|
+
#
|
751
|
+
#
|
752
|
+
# @param file File to upload
|
753
|
+
# @param password
|
754
|
+
# @param [Hash] opts the optional parameters
|
755
|
+
# @return [FilesResult]
|
756
|
+
def post_unlock(file, password, opts = {})
|
757
|
+
data, _status_code, _headers = post_unlock_with_http_info(file, password, opts)
|
758
|
+
return data
|
759
|
+
end
|
760
|
+
|
761
|
+
#
|
762
|
+
#
|
763
|
+
# @param file File to upload
|
764
|
+
# @param password
|
765
|
+
# @param [Hash] opts the optional parameters
|
766
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
767
|
+
def post_unlock_with_http_info(file, password, opts = {})
|
768
|
+
if @api_client.config.debugging
|
769
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_unlock ..."
|
770
|
+
end
|
771
|
+
@api_client.request_token_if_needed
|
772
|
+
# verify the required parameter 'file' is set
|
773
|
+
if @api_client.config.client_side_validation && file.nil?
|
774
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_unlock"
|
775
|
+
end
|
776
|
+
# verify the required parameter 'password' is set
|
777
|
+
if @api_client.config.client_side_validation && password.nil?
|
778
|
+
fail ArgumentError, "Missing the required parameter 'password' when calling LiteCellsApi.post_unlock"
|
779
|
+
end
|
780
|
+
# resource path
|
781
|
+
local_var_path = "/cells/unlock"
|
782
|
+
|
783
|
+
# query parameters
|
784
|
+
query_params = {}
|
785
|
+
query_params[:'password'] = password
|
786
|
+
|
787
|
+
# header parameters
|
788
|
+
header_params = {}
|
789
|
+
# HTTP header 'Accept' (if needed)
|
790
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
791
|
+
# HTTP header 'Content-Type'
|
792
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
793
|
+
|
794
|
+
# form parameters
|
795
|
+
form_params = {}
|
796
|
+
file.each do |filename , context|
|
797
|
+
form_params[filename] = context
|
798
|
+
end
|
799
|
+
|
800
|
+
# http body (model)
|
801
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
802
|
+
post_body = ""
|
803
|
+
#auth_names = []
|
804
|
+
auth_names = ['JWT']
|
805
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
806
|
+
:header_params => header_params,
|
807
|
+
:query_params => query_params,
|
808
|
+
:form_params => form_params,
|
809
|
+
:body => post_body,
|
810
|
+
:auth_names => auth_names,
|
811
|
+
:return_type => 'FilesResult')
|
812
|
+
if @api_client.config.debugging
|
813
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_unlock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
814
|
+
end
|
815
|
+
return data, status_code, headers
|
816
|
+
end
|
817
|
+
|
818
|
+
#
|
819
|
+
#
|
820
|
+
# @param file File to upload
|
821
|
+
# @param text
|
822
|
+
# @param color
|
823
|
+
# @param [Hash] opts the optional parameters
|
824
|
+
# @return [FilesResult]
|
825
|
+
def post_watermark(file, text, color, opts = {})
|
826
|
+
data, _status_code, _headers = post_watermark_with_http_info(file, text, color, opts)
|
827
|
+
return data
|
828
|
+
end
|
829
|
+
|
830
|
+
#
|
831
|
+
#
|
832
|
+
# @param file File to upload
|
833
|
+
# @param text
|
834
|
+
# @param color
|
835
|
+
# @param [Hash] opts the optional parameters
|
836
|
+
# @return [Array<(FilesResult, Fixnum, Hash)>] FilesResult data, response status code and response headers
|
837
|
+
def post_watermark_with_http_info(file, text, color, opts = {})
|
838
|
+
if @api_client.config.debugging
|
839
|
+
@api_client.config.logger.debug "Calling API: LiteCellsApi.post_watermark ..."
|
840
|
+
end
|
841
|
+
@api_client.request_token_if_needed
|
842
|
+
# verify the required parameter 'file' is set
|
843
|
+
if @api_client.config.client_side_validation && file.nil?
|
844
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling LiteCellsApi.post_watermark"
|
845
|
+
end
|
846
|
+
# verify the required parameter 'text' is set
|
847
|
+
if @api_client.config.client_side_validation && text.nil?
|
848
|
+
fail ArgumentError, "Missing the required parameter 'text' when calling LiteCellsApi.post_watermark"
|
849
|
+
end
|
850
|
+
# verify the required parameter 'color' is set
|
851
|
+
if @api_client.config.client_side_validation && color.nil?
|
852
|
+
fail ArgumentError, "Missing the required parameter 'color' when calling LiteCellsApi.post_watermark"
|
853
|
+
end
|
854
|
+
# resource path
|
855
|
+
local_var_path = "/cells/watermark"
|
856
|
+
|
857
|
+
# query parameters
|
858
|
+
query_params = {}
|
859
|
+
query_params[:'text'] = text
|
860
|
+
query_params[:'color'] = color
|
861
|
+
|
862
|
+
# header parameters
|
863
|
+
header_params = {}
|
864
|
+
# HTTP header 'Accept' (if needed)
|
865
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
866
|
+
# HTTP header 'Content-Type'
|
867
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
868
|
+
|
869
|
+
# form parameters
|
870
|
+
form_params = {}
|
871
|
+
file.each do |filename , context|
|
872
|
+
form_params[filename] = context
|
873
|
+
end
|
874
|
+
|
875
|
+
# http body (model)
|
876
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
877
|
+
post_body = ""
|
878
|
+
#auth_names = []
|
879
|
+
auth_names = ['JWT']
|
880
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
881
|
+
:header_params => header_params,
|
882
|
+
:query_params => query_params,
|
883
|
+
:form_params => form_params,
|
884
|
+
:body => post_body,
|
885
|
+
:auth_names => auth_names,
|
886
|
+
:return_type => 'FilesResult')
|
887
|
+
if @api_client.config.debugging
|
888
|
+
@api_client.config.logger.debug "API called: LiteCellsApi#post_watermark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
889
|
+
end
|
890
|
+
return data, status_code, headers
|
891
|
+
end
|
892
|
+
end
|
893
|
+
end
|