slidize_cloud 24.9.0 → 24.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/README.md +118 -0
- data/Rakefile +10 -0
- data/TestData/macros.pptm +0 -0
- data/TestData/master.pptx +0 -0
- data/TestData/protected.pptx +0 -0
- data/TestData/test.pptx +0 -0
- data/TestData/watermark.png +0 -0
- data/git_push.sh +57 -0
- data/lib/slidize_cloud/api/slidize_api.rb +829 -0
- data/lib/slidize_cloud/api_client.rb +451 -0
- data/lib/slidize_cloud/api_error.rb +75 -0
- data/lib/slidize_cloud/configuration.rb +389 -0
- data/lib/slidize_cloud/models/convert_request.rb +238 -0
- data/lib/slidize_cloud/models/convert_to_video_request.rb +245 -0
- data/lib/slidize_cloud/models/export_format.rb +83 -0
- data/lib/slidize_cloud/models/image_watermark_options.rb +247 -0
- data/lib/slidize_cloud/models/image_watermark_request.rb +256 -0
- data/lib/slidize_cloud/models/merge_options.rb +246 -0
- data/lib/slidize_cloud/models/merge_request.rb +247 -0
- data/lib/slidize_cloud/models/protect_request.rb +245 -0
- data/lib/slidize_cloud/models/protection_options.rb +256 -0
- data/lib/slidize_cloud/models/replace_text_options.rb +256 -0
- data/lib/slidize_cloud/models/replace_text_request.rb +247 -0
- data/lib/slidize_cloud/models/split_options.rb +237 -0
- data/lib/slidize_cloud/models/split_request.rb +245 -0
- data/lib/slidize_cloud/models/text_watermark_options.rb +277 -0
- data/lib/slidize_cloud/models/text_watermark_request.rb +247 -0
- data/lib/slidize_cloud/models/unprotect_request.rb +236 -0
- data/lib/slidize_cloud/models/video_options.rb +287 -0
- data/lib/slidize_cloud/models/video_resolution_type.rb +59 -0
- data/lib/slidize_cloud/models/video_transition_type.rb +63 -0
- data/lib/slidize_cloud/version.rb +32 -0
- data/lib/slidize_cloud.rb +76 -0
- data/slidize_cloud.gemspec +56 -0
- data/spec/api_client_spec.rb +240 -0
- data/spec/configuration_spec.rb +99 -0
- data/spec/spec_helper.rb +128 -0
- metadata +44 -3
@@ -0,0 +1,829 @@
|
|
1
|
+
=begin
|
2
|
+
/**
|
3
|
+
* --------------------------------------------------------------------------------------------------------------------
|
4
|
+
* <copyright company="Smallize">
|
5
|
+
* Copyright (c) 2024 Slidize for Cloud
|
6
|
+
* </copyright>
|
7
|
+
* <summary>
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
13
|
+
* furnished to do so, subject to the following conditions:
|
14
|
+
*
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
16
|
+
* copies or substantial portions of the Software.
|
17
|
+
*
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
24
|
+
* SOFTWARE.
|
25
|
+
* </summary>
|
26
|
+
* --------------------------------------------------------------------------------------------------------------------
|
27
|
+
*/
|
28
|
+
=end
|
29
|
+
|
30
|
+
require 'cgi'
|
31
|
+
|
32
|
+
module SlidizeCloud
|
33
|
+
class SlidizeApi
|
34
|
+
attr_accessor :api_client
|
35
|
+
|
36
|
+
def initialize(api_client = ApiClient.default)
|
37
|
+
@api_client = api_client
|
38
|
+
end
|
39
|
+
# Converts files provided in the request body into target format and returns conversion result.
|
40
|
+
# @param format [ExportFormat] Output file format.
|
41
|
+
# @param documents [Array<File>]
|
42
|
+
# @param [Hash] opts the optional parameters
|
43
|
+
# @return [File]
|
44
|
+
def convert(format, documents, opts = {})
|
45
|
+
data, _status_code, _headers = convert_with_http_info(format, documents, opts)
|
46
|
+
data
|
47
|
+
end
|
48
|
+
|
49
|
+
# Converts files provided in the request body into target format and returns conversion result.
|
50
|
+
# @param format [ExportFormat] Output file format.
|
51
|
+
# @param documents [Array<File>]
|
52
|
+
# @param [Hash] opts the optional parameters
|
53
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
54
|
+
def convert_with_http_info(format, documents, opts = {})
|
55
|
+
if @api_client.config.debugging
|
56
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.convert ...'
|
57
|
+
end
|
58
|
+
# verify the required parameter 'format' is set
|
59
|
+
if @api_client.config.client_side_validation && format.nil?
|
60
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling SlidizeApi.convert"
|
61
|
+
end
|
62
|
+
# verify the required parameter 'documents' is set
|
63
|
+
if @api_client.config.client_side_validation && documents.nil?
|
64
|
+
fail ArgumentError, "Missing the required parameter 'documents' when calling SlidizeApi.convert"
|
65
|
+
end
|
66
|
+
# resource path
|
67
|
+
local_var_path = '/convert/{format}'.sub('{' + 'format' + '}', CGI.escape(format.to_s))
|
68
|
+
|
69
|
+
# query parameters
|
70
|
+
query_params = opts[:query_params] || {}
|
71
|
+
|
72
|
+
# header parameters
|
73
|
+
header_params = opts[:header_params] || {}
|
74
|
+
# HTTP header 'Accept' (if needed)
|
75
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
76
|
+
# HTTP header 'Content-Type'
|
77
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
78
|
+
if !content_type.nil?
|
79
|
+
header_params['Content-Type'] = content_type
|
80
|
+
end
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = opts[:form_params] || {}
|
84
|
+
form_params['documents'] = @api_client.build_collection_param(documents, :multi)
|
85
|
+
|
86
|
+
# http body (model)
|
87
|
+
post_body = opts[:debug_body]
|
88
|
+
|
89
|
+
# return_type
|
90
|
+
return_type = opts[:debug_return_type] || 'File'
|
91
|
+
|
92
|
+
# auth_names
|
93
|
+
auth_names = opts[:debug_auth_names] || []
|
94
|
+
|
95
|
+
new_options = opts.merge(
|
96
|
+
:operation => :"SlidizeApi.convert",
|
97
|
+
:header_params => header_params,
|
98
|
+
:query_params => query_params,
|
99
|
+
:form_params => form_params,
|
100
|
+
:body => post_body,
|
101
|
+
:auth_names => auth_names,
|
102
|
+
:return_type => return_type
|
103
|
+
)
|
104
|
+
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug "API called: SlidizeApi#convert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
108
|
+
end
|
109
|
+
return data, status_code, headers
|
110
|
+
end
|
111
|
+
|
112
|
+
# Converts file provided in the request body into video.
|
113
|
+
# @param document [File]
|
114
|
+
# @param [Hash] opts the optional parameters
|
115
|
+
# @option opts [VideoOptions] :options
|
116
|
+
# @return [File]
|
117
|
+
def convert_to_video(document, opts = {})
|
118
|
+
data, _status_code, _headers = convert_to_video_with_http_info(document, opts)
|
119
|
+
data
|
120
|
+
end
|
121
|
+
|
122
|
+
# Converts file provided in the request body into video.
|
123
|
+
# @param document [File]
|
124
|
+
# @param [Hash] opts the optional parameters
|
125
|
+
# @option opts [VideoOptions] :options
|
126
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
127
|
+
def convert_to_video_with_http_info(document, opts = {})
|
128
|
+
if @api_client.config.debugging
|
129
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.convert_to_video ...'
|
130
|
+
end
|
131
|
+
# verify the required parameter 'document' is set
|
132
|
+
if @api_client.config.client_side_validation && document.nil?
|
133
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling SlidizeApi.convert_to_video"
|
134
|
+
end
|
135
|
+
# resource path
|
136
|
+
local_var_path = '/video'
|
137
|
+
|
138
|
+
# query parameters
|
139
|
+
query_params = opts[:query_params] || {}
|
140
|
+
|
141
|
+
# header parameters
|
142
|
+
header_params = opts[:header_params] || {}
|
143
|
+
# HTTP header 'Accept' (if needed)
|
144
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
145
|
+
# HTTP header 'Content-Type'
|
146
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
147
|
+
if !content_type.nil?
|
148
|
+
header_params['Content-Type'] = content_type
|
149
|
+
end
|
150
|
+
|
151
|
+
# form parameters
|
152
|
+
form_params = opts[:form_params] || {}
|
153
|
+
form_params['document'] = document
|
154
|
+
form_params['options'] = opts[:'options'] if !opts[:'options'].nil?
|
155
|
+
|
156
|
+
# http body (model)
|
157
|
+
post_body = opts[:debug_body]
|
158
|
+
|
159
|
+
# return_type
|
160
|
+
return_type = opts[:debug_return_type] || 'File'
|
161
|
+
|
162
|
+
# auth_names
|
163
|
+
auth_names = opts[:debug_auth_names] || []
|
164
|
+
|
165
|
+
new_options = opts.merge(
|
166
|
+
:operation => :"SlidizeApi.convert_to_video",
|
167
|
+
:header_params => header_params,
|
168
|
+
:query_params => query_params,
|
169
|
+
:form_params => form_params,
|
170
|
+
:body => post_body,
|
171
|
+
:auth_names => auth_names,
|
172
|
+
:return_type => return_type
|
173
|
+
)
|
174
|
+
|
175
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
176
|
+
if @api_client.config.debugging
|
177
|
+
@api_client.config.logger.debug "API called: SlidizeApi#convert_to_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
178
|
+
end
|
179
|
+
return data, status_code, headers
|
180
|
+
end
|
181
|
+
|
182
|
+
# Adds image watermarks and return result.
|
183
|
+
# @param documents [Array<File>]
|
184
|
+
# @param image [File]
|
185
|
+
# @param [Hash] opts the optional parameters
|
186
|
+
# @option opts [ImageWatermarkOptions] :options
|
187
|
+
# @return [File]
|
188
|
+
def image_watermark(documents, image, opts = {})
|
189
|
+
data, _status_code, _headers = image_watermark_with_http_info(documents, image, opts)
|
190
|
+
data
|
191
|
+
end
|
192
|
+
|
193
|
+
# Adds image watermarks and return result.
|
194
|
+
# @param documents [Array<File>]
|
195
|
+
# @param image [File]
|
196
|
+
# @param [Hash] opts the optional parameters
|
197
|
+
# @option opts [ImageWatermarkOptions] :options
|
198
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
199
|
+
def image_watermark_with_http_info(documents, image, opts = {})
|
200
|
+
if @api_client.config.debugging
|
201
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.image_watermark ...'
|
202
|
+
end
|
203
|
+
# verify the required parameter 'documents' is set
|
204
|
+
if @api_client.config.client_side_validation && documents.nil?
|
205
|
+
fail ArgumentError, "Missing the required parameter 'documents' when calling SlidizeApi.image_watermark"
|
206
|
+
end
|
207
|
+
# verify the required parameter 'image' is set
|
208
|
+
if @api_client.config.client_side_validation && image.nil?
|
209
|
+
fail ArgumentError, "Missing the required parameter 'image' when calling SlidizeApi.image_watermark"
|
210
|
+
end
|
211
|
+
# resource path
|
212
|
+
local_var_path = '/watermark/image'
|
213
|
+
|
214
|
+
# query parameters
|
215
|
+
query_params = opts[:query_params] || {}
|
216
|
+
|
217
|
+
# header parameters
|
218
|
+
header_params = opts[:header_params] || {}
|
219
|
+
# HTTP header 'Accept' (if needed)
|
220
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
221
|
+
# HTTP header 'Content-Type'
|
222
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
223
|
+
if !content_type.nil?
|
224
|
+
header_params['Content-Type'] = content_type
|
225
|
+
end
|
226
|
+
|
227
|
+
# form parameters
|
228
|
+
form_params = opts[:form_params] || {}
|
229
|
+
form_params['documents'] = @api_client.build_collection_param(documents, :multi)
|
230
|
+
form_params['image'] = image
|
231
|
+
form_params['options'] = opts[:'options'] if !opts[:'options'].nil?
|
232
|
+
|
233
|
+
# http body (model)
|
234
|
+
post_body = opts[:debug_body]
|
235
|
+
|
236
|
+
# return_type
|
237
|
+
return_type = opts[:debug_return_type] || 'File'
|
238
|
+
|
239
|
+
# auth_names
|
240
|
+
auth_names = opts[:debug_auth_names] || []
|
241
|
+
|
242
|
+
new_options = opts.merge(
|
243
|
+
:operation => :"SlidizeApi.image_watermark",
|
244
|
+
:header_params => header_params,
|
245
|
+
:query_params => query_params,
|
246
|
+
:form_params => form_params,
|
247
|
+
:body => post_body,
|
248
|
+
:auth_names => auth_names,
|
249
|
+
:return_type => return_type
|
250
|
+
)
|
251
|
+
|
252
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
253
|
+
if @api_client.config.debugging
|
254
|
+
@api_client.config.logger.debug "API called: SlidizeApi#image_watermark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
255
|
+
end
|
256
|
+
return data, status_code, headers
|
257
|
+
end
|
258
|
+
|
259
|
+
# Merges files provided in the request and saves the merge result into target format.
|
260
|
+
# @param format [ExportFormat] Output file format.
|
261
|
+
# @param documents [Array<File>]
|
262
|
+
# @param [Hash] opts the optional parameters
|
263
|
+
# @option opts [MergeOptions] :options
|
264
|
+
# @return [File]
|
265
|
+
def merge(format, documents, opts = {})
|
266
|
+
data, _status_code, _headers = merge_with_http_info(format, documents, opts)
|
267
|
+
data
|
268
|
+
end
|
269
|
+
|
270
|
+
# Merges files provided in the request and saves the merge result into target format.
|
271
|
+
# @param format [ExportFormat] Output file format.
|
272
|
+
# @param documents [Array<File>]
|
273
|
+
# @param [Hash] opts the optional parameters
|
274
|
+
# @option opts [MergeOptions] :options
|
275
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
276
|
+
def merge_with_http_info(format, documents, opts = {})
|
277
|
+
if @api_client.config.debugging
|
278
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.merge ...'
|
279
|
+
end
|
280
|
+
# verify the required parameter 'format' is set
|
281
|
+
if @api_client.config.client_side_validation && format.nil?
|
282
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling SlidizeApi.merge"
|
283
|
+
end
|
284
|
+
# verify the required parameter 'documents' is set
|
285
|
+
if @api_client.config.client_side_validation && documents.nil?
|
286
|
+
fail ArgumentError, "Missing the required parameter 'documents' when calling SlidizeApi.merge"
|
287
|
+
end
|
288
|
+
# resource path
|
289
|
+
local_var_path = '/merge/{format}'.sub('{' + 'format' + '}', CGI.escape(format.to_s))
|
290
|
+
|
291
|
+
# query parameters
|
292
|
+
query_params = opts[:query_params] || {}
|
293
|
+
|
294
|
+
# header parameters
|
295
|
+
header_params = opts[:header_params] || {}
|
296
|
+
# HTTP header 'Accept' (if needed)
|
297
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
298
|
+
# HTTP header 'Content-Type'
|
299
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
300
|
+
if !content_type.nil?
|
301
|
+
header_params['Content-Type'] = content_type
|
302
|
+
end
|
303
|
+
|
304
|
+
# form parameters
|
305
|
+
form_params = opts[:form_params] || {}
|
306
|
+
form_params['documents'] = @api_client.build_collection_param(documents, :multi)
|
307
|
+
form_params['options'] = opts[:'options'] if !opts[:'options'].nil?
|
308
|
+
|
309
|
+
# http body (model)
|
310
|
+
post_body = opts[:debug_body]
|
311
|
+
|
312
|
+
# return_type
|
313
|
+
return_type = opts[:debug_return_type] || 'File'
|
314
|
+
|
315
|
+
# auth_names
|
316
|
+
auth_names = opts[:debug_auth_names] || []
|
317
|
+
|
318
|
+
new_options = opts.merge(
|
319
|
+
:operation => :"SlidizeApi.merge",
|
320
|
+
:header_params => header_params,
|
321
|
+
:query_params => query_params,
|
322
|
+
:form_params => form_params,
|
323
|
+
:body => post_body,
|
324
|
+
:auth_names => auth_names,
|
325
|
+
:return_type => return_type
|
326
|
+
)
|
327
|
+
|
328
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
329
|
+
if @api_client.config.debugging
|
330
|
+
@api_client.config.logger.debug "API called: SlidizeApi#merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
331
|
+
end
|
332
|
+
return data, status_code, headers
|
333
|
+
end
|
334
|
+
|
335
|
+
# Protects presentation with specified password and returns result.
|
336
|
+
# @param document [File]
|
337
|
+
# @param [Hash] opts the optional parameters
|
338
|
+
# @option opts [ProtectionOptions] :options
|
339
|
+
# @return [File]
|
340
|
+
def protect(document, opts = {})
|
341
|
+
data, _status_code, _headers = protect_with_http_info(document, opts)
|
342
|
+
data
|
343
|
+
end
|
344
|
+
|
345
|
+
# Protects presentation with specified password and returns result.
|
346
|
+
# @param document [File]
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @option opts [ProtectionOptions] :options
|
349
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
350
|
+
def protect_with_http_info(document, opts = {})
|
351
|
+
if @api_client.config.debugging
|
352
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.protect ...'
|
353
|
+
end
|
354
|
+
# verify the required parameter 'document' is set
|
355
|
+
if @api_client.config.client_side_validation && document.nil?
|
356
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling SlidizeApi.protect"
|
357
|
+
end
|
358
|
+
# resource path
|
359
|
+
local_var_path = '/lock'
|
360
|
+
|
361
|
+
# query parameters
|
362
|
+
query_params = opts[:query_params] || {}
|
363
|
+
|
364
|
+
# header parameters
|
365
|
+
header_params = opts[:header_params] || {}
|
366
|
+
# HTTP header 'Accept' (if needed)
|
367
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
368
|
+
# HTTP header 'Content-Type'
|
369
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
370
|
+
if !content_type.nil?
|
371
|
+
header_params['Content-Type'] = content_type
|
372
|
+
end
|
373
|
+
|
374
|
+
# form parameters
|
375
|
+
form_params = opts[:form_params] || {}
|
376
|
+
form_params['document'] = document
|
377
|
+
form_params['options'] = opts[:'options'] if !opts[:'options'].nil?
|
378
|
+
|
379
|
+
# http body (model)
|
380
|
+
post_body = opts[:debug_body]
|
381
|
+
|
382
|
+
# return_type
|
383
|
+
return_type = opts[:debug_return_type] || 'File'
|
384
|
+
|
385
|
+
# auth_names
|
386
|
+
auth_names = opts[:debug_auth_names] || []
|
387
|
+
|
388
|
+
new_options = opts.merge(
|
389
|
+
:operation => :"SlidizeApi.protect",
|
390
|
+
:header_params => header_params,
|
391
|
+
:query_params => query_params,
|
392
|
+
:form_params => form_params,
|
393
|
+
:body => post_body,
|
394
|
+
:auth_names => auth_names,
|
395
|
+
:return_type => return_type
|
396
|
+
)
|
397
|
+
|
398
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
399
|
+
if @api_client.config.debugging
|
400
|
+
@api_client.config.logger.debug "API called: SlidizeApi#protect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
401
|
+
end
|
402
|
+
return data, status_code, headers
|
403
|
+
end
|
404
|
+
|
405
|
+
# Remove annotations from presentation
|
406
|
+
# @param document [File]
|
407
|
+
# @param [Hash] opts the optional parameters
|
408
|
+
# @return [File]
|
409
|
+
def remove_annotations(document, opts = {})
|
410
|
+
data, _status_code, _headers = remove_annotations_with_http_info(document, opts)
|
411
|
+
data
|
412
|
+
end
|
413
|
+
|
414
|
+
# Remove annotations from presentation
|
415
|
+
# @param document [File]
|
416
|
+
# @param [Hash] opts the optional parameters
|
417
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
418
|
+
def remove_annotations_with_http_info(document, opts = {})
|
419
|
+
if @api_client.config.debugging
|
420
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.remove_annotations ...'
|
421
|
+
end
|
422
|
+
# verify the required parameter 'document' is set
|
423
|
+
if @api_client.config.client_side_validation && document.nil?
|
424
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling SlidizeApi.remove_annotations"
|
425
|
+
end
|
426
|
+
# resource path
|
427
|
+
local_var_path = '/removeAnnotations'
|
428
|
+
|
429
|
+
# query parameters
|
430
|
+
query_params = opts[:query_params] || {}
|
431
|
+
|
432
|
+
# header parameters
|
433
|
+
header_params = opts[:header_params] || {}
|
434
|
+
# HTTP header 'Accept' (if needed)
|
435
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
436
|
+
# HTTP header 'Content-Type'
|
437
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
438
|
+
if !content_type.nil?
|
439
|
+
header_params['Content-Type'] = content_type
|
440
|
+
end
|
441
|
+
|
442
|
+
# form parameters
|
443
|
+
form_params = opts[:form_params] || {}
|
444
|
+
form_params['document'] = document
|
445
|
+
|
446
|
+
# http body (model)
|
447
|
+
post_body = opts[:debug_body]
|
448
|
+
|
449
|
+
# return_type
|
450
|
+
return_type = opts[:debug_return_type] || 'File'
|
451
|
+
|
452
|
+
# auth_names
|
453
|
+
auth_names = opts[:debug_auth_names] || []
|
454
|
+
|
455
|
+
new_options = opts.merge(
|
456
|
+
:operation => :"SlidizeApi.remove_annotations",
|
457
|
+
:header_params => header_params,
|
458
|
+
:query_params => query_params,
|
459
|
+
:form_params => form_params,
|
460
|
+
:body => post_body,
|
461
|
+
:auth_names => auth_names,
|
462
|
+
:return_type => return_type
|
463
|
+
)
|
464
|
+
|
465
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
466
|
+
if @api_client.config.debugging
|
467
|
+
@api_client.config.logger.debug "API called: SlidizeApi#remove_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
468
|
+
end
|
469
|
+
return data, status_code, headers
|
470
|
+
end
|
471
|
+
|
472
|
+
# Remove macros from presentation
|
473
|
+
# @param document [File]
|
474
|
+
# @param [Hash] opts the optional parameters
|
475
|
+
# @return [File]
|
476
|
+
def remove_macros(document, opts = {})
|
477
|
+
data, _status_code, _headers = remove_macros_with_http_info(document, opts)
|
478
|
+
data
|
479
|
+
end
|
480
|
+
|
481
|
+
# Remove macros from presentation
|
482
|
+
# @param document [File]
|
483
|
+
# @param [Hash] opts the optional parameters
|
484
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
485
|
+
def remove_macros_with_http_info(document, opts = {})
|
486
|
+
if @api_client.config.debugging
|
487
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.remove_macros ...'
|
488
|
+
end
|
489
|
+
# verify the required parameter 'document' is set
|
490
|
+
if @api_client.config.client_side_validation && document.nil?
|
491
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling SlidizeApi.remove_macros"
|
492
|
+
end
|
493
|
+
# resource path
|
494
|
+
local_var_path = '/removeMacros'
|
495
|
+
|
496
|
+
# query parameters
|
497
|
+
query_params = opts[:query_params] || {}
|
498
|
+
|
499
|
+
# header parameters
|
500
|
+
header_params = opts[:header_params] || {}
|
501
|
+
# HTTP header 'Accept' (if needed)
|
502
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
503
|
+
# HTTP header 'Content-Type'
|
504
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
505
|
+
if !content_type.nil?
|
506
|
+
header_params['Content-Type'] = content_type
|
507
|
+
end
|
508
|
+
|
509
|
+
# form parameters
|
510
|
+
form_params = opts[:form_params] || {}
|
511
|
+
form_params['document'] = document
|
512
|
+
|
513
|
+
# http body (model)
|
514
|
+
post_body = opts[:debug_body]
|
515
|
+
|
516
|
+
# return_type
|
517
|
+
return_type = opts[:debug_return_type] || 'File'
|
518
|
+
|
519
|
+
# auth_names
|
520
|
+
auth_names = opts[:debug_auth_names] || []
|
521
|
+
|
522
|
+
new_options = opts.merge(
|
523
|
+
:operation => :"SlidizeApi.remove_macros",
|
524
|
+
:header_params => header_params,
|
525
|
+
:query_params => query_params,
|
526
|
+
:form_params => form_params,
|
527
|
+
:body => post_body,
|
528
|
+
:auth_names => auth_names,
|
529
|
+
:return_type => return_type
|
530
|
+
)
|
531
|
+
|
532
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
533
|
+
if @api_client.config.debugging
|
534
|
+
@api_client.config.logger.debug "API called: SlidizeApi#remove_macros\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
535
|
+
end
|
536
|
+
return data, status_code, headers
|
537
|
+
end
|
538
|
+
|
539
|
+
# Replace text in presentation.
|
540
|
+
# @param documents [Array<File>]
|
541
|
+
# @param [Hash] opts the optional parameters
|
542
|
+
# @option opts [ReplaceTextOptions] :options
|
543
|
+
# @return [File]
|
544
|
+
def replace_text(documents, opts = {})
|
545
|
+
data, _status_code, _headers = replace_text_with_http_info(documents, opts)
|
546
|
+
data
|
547
|
+
end
|
548
|
+
|
549
|
+
# Replace text in presentation.
|
550
|
+
# @param documents [Array<File>]
|
551
|
+
# @param [Hash] opts the optional parameters
|
552
|
+
# @option opts [ReplaceTextOptions] :options
|
553
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
554
|
+
def replace_text_with_http_info(documents, opts = {})
|
555
|
+
if @api_client.config.debugging
|
556
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.replace_text ...'
|
557
|
+
end
|
558
|
+
# verify the required parameter 'documents' is set
|
559
|
+
if @api_client.config.client_side_validation && documents.nil?
|
560
|
+
fail ArgumentError, "Missing the required parameter 'documents' when calling SlidizeApi.replace_text"
|
561
|
+
end
|
562
|
+
# resource path
|
563
|
+
local_var_path = '/replaceText'
|
564
|
+
|
565
|
+
# query parameters
|
566
|
+
query_params = opts[:query_params] || {}
|
567
|
+
|
568
|
+
# header parameters
|
569
|
+
header_params = opts[:header_params] || {}
|
570
|
+
# HTTP header 'Accept' (if needed)
|
571
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
572
|
+
# HTTP header 'Content-Type'
|
573
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
574
|
+
if !content_type.nil?
|
575
|
+
header_params['Content-Type'] = content_type
|
576
|
+
end
|
577
|
+
|
578
|
+
# form parameters
|
579
|
+
form_params = opts[:form_params] || {}
|
580
|
+
form_params['documents'] = @api_client.build_collection_param(documents, :multi)
|
581
|
+
form_params['options'] = opts[:'options'] if !opts[:'options'].nil?
|
582
|
+
|
583
|
+
# http body (model)
|
584
|
+
post_body = opts[:debug_body]
|
585
|
+
|
586
|
+
# return_type
|
587
|
+
return_type = opts[:debug_return_type] || 'File'
|
588
|
+
|
589
|
+
# auth_names
|
590
|
+
auth_names = opts[:debug_auth_names] || []
|
591
|
+
|
592
|
+
new_options = opts.merge(
|
593
|
+
:operation => :"SlidizeApi.replace_text",
|
594
|
+
:header_params => header_params,
|
595
|
+
:query_params => query_params,
|
596
|
+
:form_params => form_params,
|
597
|
+
:body => post_body,
|
598
|
+
:auth_names => auth_names,
|
599
|
+
:return_type => return_type
|
600
|
+
)
|
601
|
+
|
602
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
603
|
+
if @api_client.config.debugging
|
604
|
+
@api_client.config.logger.debug "API called: SlidizeApi#replace_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
605
|
+
end
|
606
|
+
return data, status_code, headers
|
607
|
+
end
|
608
|
+
|
609
|
+
# Splits presentation according to the specified slides range and saves result into target format.
|
610
|
+
# @param format [ExportFormat] Output file format.
|
611
|
+
# @param document [File]
|
612
|
+
# @param [Hash] opts the optional parameters
|
613
|
+
# @option opts [SplitOptions] :options
|
614
|
+
# @return [File]
|
615
|
+
def split(format, document, opts = {})
|
616
|
+
data, _status_code, _headers = split_with_http_info(format, document, opts)
|
617
|
+
data
|
618
|
+
end
|
619
|
+
|
620
|
+
# Splits presentation according to the specified slides range and saves result into target format.
|
621
|
+
# @param format [ExportFormat] Output file format.
|
622
|
+
# @param document [File]
|
623
|
+
# @param [Hash] opts the optional parameters
|
624
|
+
# @option opts [SplitOptions] :options
|
625
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
626
|
+
def split_with_http_info(format, document, opts = {})
|
627
|
+
if @api_client.config.debugging
|
628
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.split ...'
|
629
|
+
end
|
630
|
+
# verify the required parameter 'format' is set
|
631
|
+
if @api_client.config.client_side_validation && format.nil?
|
632
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling SlidizeApi.split"
|
633
|
+
end
|
634
|
+
# verify the required parameter 'document' is set
|
635
|
+
if @api_client.config.client_side_validation && document.nil?
|
636
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling SlidizeApi.split"
|
637
|
+
end
|
638
|
+
# resource path
|
639
|
+
local_var_path = '/split/{format}'.sub('{' + 'format' + '}', CGI.escape(format.to_s))
|
640
|
+
|
641
|
+
# query parameters
|
642
|
+
query_params = opts[:query_params] || {}
|
643
|
+
|
644
|
+
# header parameters
|
645
|
+
header_params = opts[:header_params] || {}
|
646
|
+
# HTTP header 'Accept' (if needed)
|
647
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
648
|
+
# HTTP header 'Content-Type'
|
649
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
650
|
+
if !content_type.nil?
|
651
|
+
header_params['Content-Type'] = content_type
|
652
|
+
end
|
653
|
+
|
654
|
+
# form parameters
|
655
|
+
form_params = opts[:form_params] || {}
|
656
|
+
form_params['document'] = document
|
657
|
+
form_params['options'] = opts[:'options'] if !opts[:'options'].nil?
|
658
|
+
|
659
|
+
# http body (model)
|
660
|
+
post_body = opts[:debug_body]
|
661
|
+
|
662
|
+
# return_type
|
663
|
+
return_type = opts[:debug_return_type] || 'File'
|
664
|
+
|
665
|
+
# auth_names
|
666
|
+
auth_names = opts[:debug_auth_names] || []
|
667
|
+
|
668
|
+
new_options = opts.merge(
|
669
|
+
:operation => :"SlidizeApi.split",
|
670
|
+
:header_params => header_params,
|
671
|
+
:query_params => query_params,
|
672
|
+
:form_params => form_params,
|
673
|
+
:body => post_body,
|
674
|
+
:auth_names => auth_names,
|
675
|
+
:return_type => return_type
|
676
|
+
)
|
677
|
+
|
678
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
679
|
+
if @api_client.config.debugging
|
680
|
+
@api_client.config.logger.debug "API called: SlidizeApi#split\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
681
|
+
end
|
682
|
+
return data, status_code, headers
|
683
|
+
end
|
684
|
+
|
685
|
+
# Adds text watermarks and return result.
|
686
|
+
# @param documents [Array<File>]
|
687
|
+
# @param [Hash] opts the optional parameters
|
688
|
+
# @option opts [TextWatermarkOptions] :options
|
689
|
+
# @return [File]
|
690
|
+
def text_watermark(documents, opts = {})
|
691
|
+
data, _status_code, _headers = text_watermark_with_http_info(documents, opts)
|
692
|
+
data
|
693
|
+
end
|
694
|
+
|
695
|
+
# Adds text watermarks and return result.
|
696
|
+
# @param documents [Array<File>]
|
697
|
+
# @param [Hash] opts the optional parameters
|
698
|
+
# @option opts [TextWatermarkOptions] :options
|
699
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
700
|
+
def text_watermark_with_http_info(documents, opts = {})
|
701
|
+
if @api_client.config.debugging
|
702
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.text_watermark ...'
|
703
|
+
end
|
704
|
+
# verify the required parameter 'documents' is set
|
705
|
+
if @api_client.config.client_side_validation && documents.nil?
|
706
|
+
fail ArgumentError, "Missing the required parameter 'documents' when calling SlidizeApi.text_watermark"
|
707
|
+
end
|
708
|
+
# resource path
|
709
|
+
local_var_path = '/watermark/text'
|
710
|
+
|
711
|
+
# query parameters
|
712
|
+
query_params = opts[:query_params] || {}
|
713
|
+
|
714
|
+
# header parameters
|
715
|
+
header_params = opts[:header_params] || {}
|
716
|
+
# HTTP header 'Accept' (if needed)
|
717
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
718
|
+
# HTTP header 'Content-Type'
|
719
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
720
|
+
if !content_type.nil?
|
721
|
+
header_params['Content-Type'] = content_type
|
722
|
+
end
|
723
|
+
|
724
|
+
# form parameters
|
725
|
+
form_params = opts[:form_params] || {}
|
726
|
+
form_params['documents'] = @api_client.build_collection_param(documents, :multi)
|
727
|
+
form_params['options'] = opts[:'options'] if !opts[:'options'].nil?
|
728
|
+
|
729
|
+
# http body (model)
|
730
|
+
post_body = opts[:debug_body]
|
731
|
+
|
732
|
+
# return_type
|
733
|
+
return_type = opts[:debug_return_type] || 'File'
|
734
|
+
|
735
|
+
# auth_names
|
736
|
+
auth_names = opts[:debug_auth_names] || []
|
737
|
+
|
738
|
+
new_options = opts.merge(
|
739
|
+
:operation => :"SlidizeApi.text_watermark",
|
740
|
+
:header_params => header_params,
|
741
|
+
:query_params => query_params,
|
742
|
+
:form_params => form_params,
|
743
|
+
:body => post_body,
|
744
|
+
:auth_names => auth_names,
|
745
|
+
:return_type => return_type
|
746
|
+
)
|
747
|
+
|
748
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
749
|
+
if @api_client.config.debugging
|
750
|
+
@api_client.config.logger.debug "API called: SlidizeApi#text_watermark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
751
|
+
end
|
752
|
+
return data, status_code, headers
|
753
|
+
end
|
754
|
+
|
755
|
+
# Removes password from the presentation and returns result.
|
756
|
+
# @param password [String] Password to remove.
|
757
|
+
# @param document [File]
|
758
|
+
# @param [Hash] opts the optional parameters
|
759
|
+
# @return [File]
|
760
|
+
def unprotect(password, document, opts = {})
|
761
|
+
data, _status_code, _headers = unprotect_with_http_info(password, document, opts)
|
762
|
+
data
|
763
|
+
end
|
764
|
+
|
765
|
+
# Removes password from the presentation and returns result.
|
766
|
+
# @param password [String] Password to remove.
|
767
|
+
# @param document [File]
|
768
|
+
# @param [Hash] opts the optional parameters
|
769
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
770
|
+
def unprotect_with_http_info(password, document, opts = {})
|
771
|
+
if @api_client.config.debugging
|
772
|
+
@api_client.config.logger.debug 'Calling API: SlidizeApi.unprotect ...'
|
773
|
+
end
|
774
|
+
# verify the required parameter 'password' is set
|
775
|
+
if @api_client.config.client_side_validation && password.nil?
|
776
|
+
fail ArgumentError, "Missing the required parameter 'password' when calling SlidizeApi.unprotect"
|
777
|
+
end
|
778
|
+
# verify the required parameter 'document' is set
|
779
|
+
if @api_client.config.client_side_validation && document.nil?
|
780
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling SlidizeApi.unprotect"
|
781
|
+
end
|
782
|
+
# resource path
|
783
|
+
local_var_path = '/unlock'
|
784
|
+
|
785
|
+
# query parameters
|
786
|
+
query_params = opts[:query_params] || {}
|
787
|
+
|
788
|
+
# header parameters
|
789
|
+
header_params = opts[:header_params] || {}
|
790
|
+
# HTTP header 'Accept' (if needed)
|
791
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
792
|
+
# HTTP header 'Content-Type'
|
793
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
794
|
+
if !content_type.nil?
|
795
|
+
header_params['Content-Type'] = content_type
|
796
|
+
end
|
797
|
+
header_params[:'password'] = password
|
798
|
+
|
799
|
+
# form parameters
|
800
|
+
form_params = opts[:form_params] || {}
|
801
|
+
form_params['document'] = document
|
802
|
+
|
803
|
+
# http body (model)
|
804
|
+
post_body = opts[:debug_body]
|
805
|
+
|
806
|
+
# return_type
|
807
|
+
return_type = opts[:debug_return_type] || 'File'
|
808
|
+
|
809
|
+
# auth_names
|
810
|
+
auth_names = opts[:debug_auth_names] || []
|
811
|
+
|
812
|
+
new_options = opts.merge(
|
813
|
+
:operation => :"SlidizeApi.unprotect",
|
814
|
+
:header_params => header_params,
|
815
|
+
:query_params => query_params,
|
816
|
+
:form_params => form_params,
|
817
|
+
:body => post_body,
|
818
|
+
:auth_names => auth_names,
|
819
|
+
:return_type => return_type
|
820
|
+
)
|
821
|
+
|
822
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
823
|
+
if @api_client.config.debugging
|
824
|
+
@api_client.config.logger.debug "API called: SlidizeApi#unprotect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
825
|
+
end
|
826
|
+
return data, status_code, headers
|
827
|
+
end
|
828
|
+
end
|
829
|
+
end
|