aspose_slides_cloud 23.9.0 → 23.11.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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -9
  3. data/README.md +10 -0
  4. data/aspose_slides_cloud.gemspec +0 -1
  5. data/docker-entrypoint.sh +1 -0
  6. data/lib/aspose_slides_cloud/api/slides_api.rb +12 -4
  7. data/lib/aspose_slides_cloud/api/slides_async_api.rb +539 -0
  8. data/lib/aspose_slides_cloud/api_client.rb +2 -1
  9. data/lib/aspose_slides_cloud/models/operation.rb +218 -0
  10. data/lib/aspose_slides_cloud/models/operation_progress.rb +121 -0
  11. data/lib/aspose_slides_cloud/models/slide.rb +11 -1
  12. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +2 -1
  13. data/lib/aspose_slides_cloud/models/slide_show_transition.rb +489 -0
  14. data/lib/aspose_slides_cloud/type_registry.rb +3 -0
  15. data/lib/aspose_slides_cloud/version.rb +1 -1
  16. data/lib/aspose_slides_cloud.rb +4 -0
  17. data/spec/api/slides_api_spec.rb +2018 -2018
  18. data/spec/api/slides_async_api_spec.rb +1277 -0
  19. data/spec/spec_utils.rb +37 -7
  20. data/spec/use_cases/abstract_class_spec.rb +1 -1
  21. data/spec/use_cases/animation_spec.rb +28 -28
  22. data/spec/use_cases/async_api_spec.rb +171 -0
  23. data/spec/use_cases/chart_spec.rb +51 -51
  24. data/spec/use_cases/comment_spec.rb +17 -17
  25. data/spec/use_cases/create_spec.rb +22 -22
  26. data/spec/use_cases/font_spec.rb +24 -24
  27. data/spec/use_cases/header_footer_spec.rb +9 -9
  28. data/spec/use_cases/hyperlink_spec.rb +10 -10
  29. data/spec/use_cases/image_spec.rb +16 -16
  30. data/spec/use_cases/layout_slide_spec.rb +41 -41
  31. data/spec/use_cases/master_slide_spec.rb +40 -40
  32. data/spec/use_cases/math_spec.rb +15 -15
  33. data/spec/use_cases/merge_spec.rb +15 -15
  34. data/spec/use_cases/notes_slide_spec.rb +39 -39
  35. data/spec/use_cases/nullable_field_spec.rb +7 -7
  36. data/spec/use_cases/paragraph_spec.rb +38 -38
  37. data/spec/use_cases/pipeline_spec.rb +1 -1
  38. data/spec/use_cases/portion_spec.rb +34 -34
  39. data/spec/use_cases/property_spec.rb +38 -38
  40. data/spec/use_cases/section_spec.rb +16 -16
  41. data/spec/use_cases/shape_format_spec.rb +12 -12
  42. data/spec/use_cases/shape_spec.rb +87 -87
  43. data/spec/use_cases/slide_spec.rb +48 -32
  44. data/spec/use_cases/split_spec.rb +12 -12
  45. data/spec/use_cases/table_spec.rb +38 -38
  46. data/spec/use_cases/text_format_spec.rb +4 -4
  47. data/spec/use_cases/text_spec.rb +28 -28
  48. data/spec/use_cases/vba_spec.rb +10 -10
  49. data/spec/use_cases/watermark_spec.rb +36 -36
  50. data/testConfig.json +2 -1
  51. data/testRules.json +13 -2
  52. metadata +10 -24
  53. data/spec/use_cases/convert_spec.rb +0 -199
@@ -0,0 +1,539 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
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
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'uri'
24
+
25
+ module AsposeSlidesCloud
26
+ class SlidesAsyncApi
27
+ attr_accessor :api_client
28
+
29
+ def initialize(configuration = Configuration.default)
30
+ @api_client = AsposeSlidesCloud::ApiClient.new(configuration)
31
+ end
32
+
33
+ # @param id
34
+ def get_operation_result(id)
35
+ data, _status_code, _headers = get_operation_result_with_http_info(id)
36
+ data
37
+ end
38
+
39
+ # @param id
40
+ def get_operation_result_with_http_info(id)
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.get_operation_result ...'
43
+ end
44
+
45
+ # verify the required parameter 'id' is set
46
+ if @api_client.config.client_side_validation && id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'id' when calling SlidesAsyncApi.get_operation_result"
48
+ end
49
+ # resource path
50
+ local_var_path = '/slides/async/{id}/result'
51
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'id', id)
52
+
53
+ # query parameters
54
+ query_params = {}
55
+
56
+ # header parameters
57
+ header_params = {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
60
+ # HTTP header 'Content-Type'
61
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
62
+
63
+ # http body (model)
64
+ post_body = nil
65
+
66
+ # form parameters
67
+ post_files = []
68
+
69
+ auth_names = ['JWT']
70
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :body => post_body,
74
+ :files => post_files,
75
+ :auth_names => auth_names,
76
+ :return_type => 'File')
77
+ return data, status_code, headers
78
+ end
79
+ # @param id
80
+ def get_operation_status(id)
81
+ data, _status_code, _headers = get_operation_status_with_http_info(id)
82
+ data
83
+ end
84
+
85
+ # @param id
86
+ def get_operation_status_with_http_info(id)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.get_operation_status ...'
89
+ end
90
+
91
+ # verify the required parameter 'id' is set
92
+ if @api_client.config.client_side_validation && id.nil?
93
+ fail ArgumentError, "Missing the required parameter 'id' when calling SlidesAsyncApi.get_operation_status"
94
+ end
95
+ # resource path
96
+ local_var_path = '/slides/async/{id}'
97
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'id', id)
98
+
99
+ # query parameters
100
+ query_params = {}
101
+
102
+ # header parameters
103
+ header_params = {}
104
+ # HTTP header 'Accept' (if needed)
105
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
106
+ # HTTP header 'Content-Type'
107
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
108
+
109
+ # http body (model)
110
+ post_body = nil
111
+
112
+ # form parameters
113
+ post_files = []
114
+
115
+ auth_names = ['JWT']
116
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
117
+ :header_params => header_params,
118
+ :query_params => query_params,
119
+ :body => post_body,
120
+ :files => post_files,
121
+ :auth_names => auth_names,
122
+ :return_type => 'Operation')
123
+ return data, status_code, headers
124
+ end
125
+ # @param document Document data.
126
+ # @param format
127
+ # @param password
128
+ # @param storage
129
+ # @param fonts_folder
130
+ # @param slides
131
+ # @param options
132
+ def start_convert(document, format, password = nil, storage = nil, fonts_folder = nil, slides = nil, options = nil)
133
+ data, _status_code, _headers = start_convert_with_http_info(document, format, password, storage, fonts_folder, slides, options)
134
+ data
135
+ end
136
+
137
+ # @param document Document data.
138
+ # @param format
139
+ # @param password
140
+ # @param storage
141
+ # @param fonts_folder
142
+ # @param slides
143
+ # @param options
144
+ def start_convert_with_http_info(document, format, password = nil, storage = nil, fonts_folder = nil, slides = nil, options = nil)
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.start_convert ...'
147
+ end
148
+
149
+ # verify the required parameter 'document' is set
150
+ if @api_client.config.client_side_validation && document.nil?
151
+ fail ArgumentError, "Missing the required parameter 'document' when calling SlidesAsyncApi.start_convert"
152
+ end
153
+ # verify the required parameter 'format' is set
154
+ if @api_client.config.client_side_validation && format.nil?
155
+ fail ArgumentError, "Missing the required parameter 'format' when calling SlidesAsyncApi.start_convert"
156
+ end
157
+ # verify enum value
158
+ if @api_client.config.client_side_validation && !['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Html5', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp', 'Xaml', 'Mpeg4'].any?{ |s| s.casecmp(format)==0 }
159
+ fail ArgumentError, "Invalid value for parameter format: " + format + ". Must be one of Pdf, Xps, Tiff, Pptx, Odp, Otp, Ppt, Pps, Ppsx, Pptm, Ppsm, Pot, Potx, Potm, Html, Html5, Swf, Svg, Jpeg, Png, Gif, Bmp, Fodp, Xaml, Mpeg4"
160
+ end
161
+ # resource path
162
+ local_var_path = '/slides/async/convert/{format}'
163
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'format', format)
164
+
165
+ # query parameters
166
+ query_params = {}
167
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
168
+ query_params[:'fontsFolder'] = @api_client.prepare_for_query(fonts_folder) unless fonts_folder.nil?
169
+ query_params[:'slides'] = @api_client.prepare_for_query(slides) unless slides.nil?
170
+
171
+ # header parameters
172
+ header_params = {}
173
+ # HTTP header 'Accept' (if needed)
174
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
175
+ # HTTP header 'Content-Type'
176
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
177
+ header_params[:'password'] = password unless password.nil?
178
+
179
+ # http body (model)
180
+ post_body = @api_client.object_to_http_body(options)
181
+
182
+ # form parameters
183
+ post_files = []
184
+ if document
185
+ post_files = post_files.push(document)
186
+ end
187
+
188
+ auth_names = ['JWT']
189
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
190
+ :header_params => header_params,
191
+ :query_params => query_params,
192
+ :body => post_body,
193
+ :files => post_files,
194
+ :auth_names => auth_names,
195
+ :return_type => 'String')
196
+ return data, status_code, headers
197
+ end
198
+ # @param document Document data.
199
+ # @param format
200
+ # @param out_path
201
+ # @param password
202
+ # @param storage
203
+ # @param fonts_folder
204
+ # @param slides
205
+ # @param options
206
+ def start_convert_and_save(document, format, out_path, password = nil, storage = nil, fonts_folder = nil, slides = nil, options = nil)
207
+ data, _status_code, _headers = start_convert_and_save_with_http_info(document, format, out_path, password, storage, fonts_folder, slides, options)
208
+ data
209
+ end
210
+
211
+ # @param document Document data.
212
+ # @param format
213
+ # @param out_path
214
+ # @param password
215
+ # @param storage
216
+ # @param fonts_folder
217
+ # @param slides
218
+ # @param options
219
+ def start_convert_and_save_with_http_info(document, format, out_path, password = nil, storage = nil, fonts_folder = nil, slides = nil, options = nil)
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.start_convert_and_save ...'
222
+ end
223
+
224
+ # verify the required parameter 'document' is set
225
+ if @api_client.config.client_side_validation && document.nil?
226
+ fail ArgumentError, "Missing the required parameter 'document' when calling SlidesAsyncApi.start_convert_and_save"
227
+ end
228
+ # verify the required parameter 'format' is set
229
+ if @api_client.config.client_side_validation && format.nil?
230
+ fail ArgumentError, "Missing the required parameter 'format' when calling SlidesAsyncApi.start_convert_and_save"
231
+ end
232
+ # verify enum value
233
+ if @api_client.config.client_side_validation && !['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Html5', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp', 'Xaml', 'Mpeg4'].any?{ |s| s.casecmp(format)==0 }
234
+ fail ArgumentError, "Invalid value for parameter format: " + format + ". Must be one of Pdf, Xps, Tiff, Pptx, Odp, Otp, Ppt, Pps, Ppsx, Pptm, Ppsm, Pot, Potx, Potm, Html, Html5, Swf, Svg, Jpeg, Png, Gif, Bmp, Fodp, Xaml, Mpeg4"
235
+ end
236
+ # verify the required parameter 'out_path' is set
237
+ if @api_client.config.client_side_validation && out_path.nil?
238
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling SlidesAsyncApi.start_convert_and_save"
239
+ end
240
+ # resource path
241
+ local_var_path = '/slides/async/convert/{format}'
242
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'format', format)
243
+
244
+ # query parameters
245
+ query_params = {}
246
+ query_params[:'outPath'] = @api_client.prepare_for_query(out_path) unless out_path.nil?
247
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
248
+ query_params[:'fontsFolder'] = @api_client.prepare_for_query(fonts_folder) unless fonts_folder.nil?
249
+ query_params[:'slides'] = @api_client.prepare_for_query(slides) unless slides.nil?
250
+
251
+ # header parameters
252
+ header_params = {}
253
+ # HTTP header 'Accept' (if needed)
254
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
255
+ # HTTP header 'Content-Type'
256
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
257
+ header_params[:'password'] = password unless password.nil?
258
+
259
+ # http body (model)
260
+ post_body = @api_client.object_to_http_body(options)
261
+
262
+ # form parameters
263
+ post_files = []
264
+ if document
265
+ post_files = post_files.push(document)
266
+ end
267
+
268
+ auth_names = ['JWT']
269
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
270
+ :header_params => header_params,
271
+ :query_params => query_params,
272
+ :body => post_body,
273
+ :files => post_files,
274
+ :auth_names => auth_names,
275
+ :return_type => 'String')
276
+ return data, status_code, headers
277
+ end
278
+ # @param name
279
+ # @param format
280
+ # @param options
281
+ # @param password
282
+ # @param folder
283
+ # @param storage
284
+ # @param fonts_folder
285
+ # @param slides
286
+ def start_download_presentation(name, format, options = nil, password = nil, folder = nil, storage = nil, fonts_folder = nil, slides = nil)
287
+ data, _status_code, _headers = start_download_presentation_with_http_info(name, format, options, password, folder, storage, fonts_folder, slides)
288
+ data
289
+ end
290
+
291
+ # @param name
292
+ # @param format
293
+ # @param options
294
+ # @param password
295
+ # @param folder
296
+ # @param storage
297
+ # @param fonts_folder
298
+ # @param slides
299
+ def start_download_presentation_with_http_info(name, format, options = nil, password = nil, folder = nil, storage = nil, fonts_folder = nil, slides = nil)
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.start_download_presentation ...'
302
+ end
303
+
304
+ # verify the required parameter 'name' is set
305
+ if @api_client.config.client_side_validation && name.nil?
306
+ fail ArgumentError, "Missing the required parameter 'name' when calling SlidesAsyncApi.start_download_presentation"
307
+ end
308
+ # verify the required parameter 'format' is set
309
+ if @api_client.config.client_side_validation && format.nil?
310
+ fail ArgumentError, "Missing the required parameter 'format' when calling SlidesAsyncApi.start_download_presentation"
311
+ end
312
+ # verify enum value
313
+ if @api_client.config.client_side_validation && !['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Html5', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp', 'Xaml', 'Mpeg4'].any?{ |s| s.casecmp(format)==0 }
314
+ fail ArgumentError, "Invalid value for parameter format: " + format + ". Must be one of Pdf, Xps, Tiff, Pptx, Odp, Otp, Ppt, Pps, Ppsx, Pptm, Ppsm, Pot, Potx, Potm, Html, Html5, Swf, Svg, Jpeg, Png, Gif, Bmp, Fodp, Xaml, Mpeg4"
315
+ end
316
+ # resource path
317
+ local_var_path = '/slides/async/{name}/{format}'
318
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'name', name)
319
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'format', format)
320
+
321
+ # query parameters
322
+ query_params = {}
323
+ query_params[:'folder'] = @api_client.prepare_for_query(folder) unless folder.nil?
324
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
325
+ query_params[:'fontsFolder'] = @api_client.prepare_for_query(fonts_folder) unless fonts_folder.nil?
326
+ query_params[:'slides'] = @api_client.prepare_for_query(slides) unless slides.nil?
327
+
328
+ # header parameters
329
+ header_params = {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
+ # HTTP header 'Content-Type'
333
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
334
+ header_params[:'password'] = password unless password.nil?
335
+
336
+ # http body (model)
337
+ post_body = @api_client.object_to_http_body(options)
338
+
339
+ # form parameters
340
+ post_files = []
341
+
342
+ auth_names = ['JWT']
343
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
344
+ :header_params => header_params,
345
+ :query_params => query_params,
346
+ :body => post_body,
347
+ :files => post_files,
348
+ :auth_names => auth_names,
349
+ :return_type => 'String')
350
+ return data, status_code, headers
351
+ end
352
+ # @param files Files to merge
353
+ # @param request
354
+ # @param storage
355
+ def start_merge(files = nil, request = nil, storage = nil)
356
+ data, _status_code, _headers = start_merge_with_http_info(files, request, storage)
357
+ data
358
+ end
359
+
360
+ # @param files Files to merge
361
+ # @param request
362
+ # @param storage
363
+ def start_merge_with_http_info(files = nil, request = nil, storage = nil)
364
+ if @api_client.config.debugging
365
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.start_merge ...'
366
+ end
367
+
368
+ # resource path
369
+ local_var_path = '/slides/async/merge'
370
+
371
+ # query parameters
372
+ query_params = {}
373
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
374
+
375
+ # header parameters
376
+ header_params = {}
377
+ # HTTP header 'Accept' (if needed)
378
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
379
+ # HTTP header 'Content-Type'
380
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
381
+
382
+ # http body (model)
383
+ post_body = @api_client.object_to_http_body(request)
384
+
385
+ # form parameters
386
+ post_files = []
387
+ if files
388
+ post_files = post_files.concat(files)
389
+ end
390
+
391
+ auth_names = ['JWT']
392
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
393
+ :header_params => header_params,
394
+ :query_params => query_params,
395
+ :body => post_body,
396
+ :files => post_files,
397
+ :auth_names => auth_names,
398
+ :return_type => 'String')
399
+ return data, status_code, headers
400
+ end
401
+ # @param out_path
402
+ # @param files Files to merge
403
+ # @param request
404
+ # @param storage
405
+ def start_merge_and_save(out_path, files = nil, request = nil, storage = nil)
406
+ data, _status_code, _headers = start_merge_and_save_with_http_info(out_path, files, request, storage)
407
+ data
408
+ end
409
+
410
+ # @param out_path
411
+ # @param files Files to merge
412
+ # @param request
413
+ # @param storage
414
+ def start_merge_and_save_with_http_info(out_path, files = nil, request = nil, storage = nil)
415
+ if @api_client.config.debugging
416
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.start_merge_and_save ...'
417
+ end
418
+
419
+ # verify the required parameter 'out_path' is set
420
+ if @api_client.config.client_side_validation && out_path.nil?
421
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling SlidesAsyncApi.start_merge_and_save"
422
+ end
423
+ # resource path
424
+ local_var_path = '/slides/async/merge'
425
+
426
+ # query parameters
427
+ query_params = {}
428
+ query_params[:'outPath'] = @api_client.prepare_for_query(out_path) unless out_path.nil?
429
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
430
+
431
+ # header parameters
432
+ header_params = {}
433
+ # HTTP header 'Accept' (if needed)
434
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
435
+ # HTTP header 'Content-Type'
436
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
437
+
438
+ # http body (model)
439
+ post_body = @api_client.object_to_http_body(request)
440
+
441
+ # form parameters
442
+ post_files = []
443
+ if files
444
+ post_files = post_files.concat(files)
445
+ end
446
+
447
+ auth_names = ['JWT']
448
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
449
+ :header_params => header_params,
450
+ :query_params => query_params,
451
+ :body => post_body,
452
+ :files => post_files,
453
+ :auth_names => auth_names,
454
+ :return_type => 'String')
455
+ return data, status_code, headers
456
+ end
457
+ # @param name
458
+ # @param format
459
+ # @param out_path
460
+ # @param options
461
+ # @param password
462
+ # @param folder
463
+ # @param storage
464
+ # @param fonts_folder
465
+ # @param slides
466
+ def start_save_presentation(name, format, out_path, options = nil, password = nil, folder = nil, storage = nil, fonts_folder = nil, slides = nil)
467
+ data, _status_code, _headers = start_save_presentation_with_http_info(name, format, out_path, options, password, folder, storage, fonts_folder, slides)
468
+ data
469
+ end
470
+
471
+ # @param name
472
+ # @param format
473
+ # @param out_path
474
+ # @param options
475
+ # @param password
476
+ # @param folder
477
+ # @param storage
478
+ # @param fonts_folder
479
+ # @param slides
480
+ def start_save_presentation_with_http_info(name, format, out_path, options = nil, password = nil, folder = nil, storage = nil, fonts_folder = nil, slides = nil)
481
+ if @api_client.config.debugging
482
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.start_save_presentation ...'
483
+ end
484
+
485
+ # verify the required parameter 'name' is set
486
+ if @api_client.config.client_side_validation && name.nil?
487
+ fail ArgumentError, "Missing the required parameter 'name' when calling SlidesAsyncApi.start_save_presentation"
488
+ end
489
+ # verify the required parameter 'format' is set
490
+ if @api_client.config.client_side_validation && format.nil?
491
+ fail ArgumentError, "Missing the required parameter 'format' when calling SlidesAsyncApi.start_save_presentation"
492
+ end
493
+ # verify enum value
494
+ if @api_client.config.client_side_validation && !['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Html5', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp', 'Xaml', 'Mpeg4'].any?{ |s| s.casecmp(format)==0 }
495
+ fail ArgumentError, "Invalid value for parameter format: " + format + ". Must be one of Pdf, Xps, Tiff, Pptx, Odp, Otp, Ppt, Pps, Ppsx, Pptm, Ppsm, Pot, Potx, Potm, Html, Html5, Swf, Svg, Jpeg, Png, Gif, Bmp, Fodp, Xaml, Mpeg4"
496
+ end
497
+ # verify the required parameter 'out_path' is set
498
+ if @api_client.config.client_side_validation && out_path.nil?
499
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling SlidesAsyncApi.start_save_presentation"
500
+ end
501
+ # resource path
502
+ local_var_path = '/slides/async/{name}/{format}'
503
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'name', name)
504
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'format', format)
505
+
506
+ # query parameters
507
+ query_params = {}
508
+ query_params[:'outPath'] = @api_client.prepare_for_query(out_path) unless out_path.nil?
509
+ query_params[:'folder'] = @api_client.prepare_for_query(folder) unless folder.nil?
510
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
511
+ query_params[:'fontsFolder'] = @api_client.prepare_for_query(fonts_folder) unless fonts_folder.nil?
512
+ query_params[:'slides'] = @api_client.prepare_for_query(slides) unless slides.nil?
513
+
514
+ # header parameters
515
+ header_params = {}
516
+ # HTTP header 'Accept' (if needed)
517
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
518
+ # HTTP header 'Content-Type'
519
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
520
+ header_params[:'password'] = password unless password.nil?
521
+
522
+ # http body (model)
523
+ post_body = @api_client.object_to_http_body(options)
524
+
525
+ # form parameters
526
+ post_files = []
527
+
528
+ auth_names = ['JWT']
529
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
530
+ :header_params => header_params,
531
+ :query_params => query_params,
532
+ :body => post_body,
533
+ :files => post_files,
534
+ :auth_names => auth_names,
535
+ :return_type => 'String')
536
+ return data, status_code, headers
537
+ end
538
+ end
539
+ end
@@ -221,7 +221,8 @@ module AsposeSlidesCloud
221
221
  return nil if body.nil? || body.empty?
222
222
 
223
223
  # return response body directly for String return type
224
- return body if return_type == 'String' or return_type == 'File'
224
+ return body.delete_prefix('"').delete_suffix('"') if return_type == 'String'
225
+ return body if return_type == 'File'
225
226
 
226
227
  # ensuring a default content type
227
228
  content_type = response.headers['Content-Type'] || 'application/json'