aspose_slides_cloud 23.7.0 → 23.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -9
  3. data/README.md +8 -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 +142 -9
  7. data/lib/aspose_slides_cloud/api/slides_async_api.rb +273 -0
  8. data/lib/aspose_slides_cloud/api_client.rb +2 -1
  9. data/lib/aspose_slides_cloud/models/operation.rb +209 -0
  10. data/lib/aspose_slides_cloud/type_registry.rb +1 -0
  11. data/lib/aspose_slides_cloud/version.rb +1 -1
  12. data/lib/aspose_slides_cloud.rb +2 -0
  13. data/spec/api/slides_api_spec.rb +2295 -2006
  14. data/spec/api/slides_async_api_spec.rb +554 -0
  15. data/spec/spec_utils.rb +38 -7
  16. data/spec/use_cases/abstract_class_spec.rb +1 -1
  17. data/spec/use_cases/animation_spec.rb +28 -28
  18. data/spec/use_cases/async_api_spec.rb +82 -0
  19. data/spec/use_cases/chart_spec.rb +51 -51
  20. data/spec/use_cases/comment_spec.rb +17 -17
  21. data/spec/use_cases/create_spec.rb +22 -22
  22. data/spec/use_cases/font_spec.rb +24 -24
  23. data/spec/use_cases/header_footer_spec.rb +9 -9
  24. data/spec/use_cases/hyperlink_spec.rb +10 -10
  25. data/spec/use_cases/image_spec.rb +34 -13
  26. data/spec/use_cases/layout_slide_spec.rb +41 -41
  27. data/spec/use_cases/master_slide_spec.rb +40 -40
  28. data/spec/use_cases/math_spec.rb +15 -15
  29. data/spec/use_cases/merge_spec.rb +15 -15
  30. data/spec/use_cases/notes_slide_spec.rb +39 -39
  31. data/spec/use_cases/nullable_field_spec.rb +7 -7
  32. data/spec/use_cases/paragraph_spec.rb +38 -38
  33. data/spec/use_cases/pipeline_spec.rb +1 -1
  34. data/spec/use_cases/portion_spec.rb +34 -34
  35. data/spec/use_cases/property_spec.rb +38 -38
  36. data/spec/use_cases/section_spec.rb +16 -16
  37. data/spec/use_cases/shape_format_spec.rb +12 -12
  38. data/spec/use_cases/shape_spec.rb +87 -87
  39. data/spec/use_cases/slide_spec.rb +32 -32
  40. data/spec/use_cases/split_spec.rb +12 -12
  41. data/spec/use_cases/table_spec.rb +38 -38
  42. data/spec/use_cases/text_format_spec.rb +4 -4
  43. data/spec/use_cases/text_spec.rb +28 -28
  44. data/spec/use_cases/vba_spec.rb +10 -10
  45. data/spec/use_cases/watermark_spec.rb +36 -36
  46. data/testConfig.json +2 -1
  47. data/testRules.json +8 -0
  48. metadata +8 -24
  49. data/spec/use_cases/convert_spec.rb +0 -199
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2f0e7c91523f8b7f2bc27e74d7635f76133d738ab3903809c32626ed9acf7c3
4
- data.tar.gz: e11651c0270c55bbb7872908ef4795bad88db76489159f14b32f2e0318fcfc6f
3
+ metadata.gz: 34682ffe3b102493761aff274ea1d1a4fa66dab39a1580ec5c8cdd2ebdd5f960
4
+ data.tar.gz: f9e5f28e25486125947e76b25f369b3cf431fec9b56bd47a0b88c1db730add11
5
5
  SHA512:
6
- metadata.gz: faef55cb3e345d6d9f99e61f4d9e1adf8063b3e6eb1ee5f097b3934271310f032222ab935ad13751b7f19fb61c7b7e718c5ee938b6d8bfa471ee9c9011245908
7
- data.tar.gz: 445d2f78ca1212c9cc35bdd95608a4d48488eebb27e241d848d31297ceadc14cb41ba1163d9e2a25077d89a5d7514bd9b1b707e948dca957690fb393e433ef86
6
+ metadata.gz: 47d210a979348472740898a3eddfffbe932687faefb42e800df63f01e1d39ecbd98386bba50f49843d7d1d40bd7b33d1c0dee1ac37dd1e252149df894b04927c
7
+ data.tar.gz: 49d6e58274292a16342479c98750a729ce0d90c10b3a3a03ed73c3eaf739708ad94d77b6065e08775232d177d9c37ed5a0ec5718423dc51d4af2c96c33242a09
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aspose_slides_cloud (23.7.0)
4
+ aspose_slides_cloud (23.10.0)
5
5
  faraday (~> 1.0, >= 1.0.0)
6
6
  faraday-httpclient (~> 1.0, >= 1.0.0)
7
7
  httpclient (~> 2.2, >= 2.2.0)
@@ -11,12 +11,10 @@ GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
13
  ZenTest (4.12.1)
14
- addressable (2.8.4)
14
+ addressable (2.8.5)
15
15
  public_suffix (>= 2.0.2, < 6.0)
16
16
  autotest (4.4.6)
17
17
  ZenTest (>= 4.4.1)
18
- autotest-fsevent (0.2.20)
19
- sys-uname
20
18
  autotest-growl (0.2.16)
21
19
  autotest-rails-pure (4.1.2)
22
20
  crack (0.4.5)
@@ -45,14 +43,13 @@ GEM
45
43
  faraday-patron (1.0.0)
46
44
  faraday-rack (1.0.0)
47
45
  faraday-retry (1.0.3)
48
- ffi (1.15.5)
49
46
  hashdiff (1.0.1)
50
47
  httpclient (2.8.3)
51
48
  json (2.6.3)
52
49
  multipart-post (2.3.0)
53
50
  public_suffix (5.0.3)
54
51
  rake (12.3.3)
55
- rexml (3.2.5)
52
+ rexml (3.2.6)
56
53
  rspec (3.12.0)
57
54
  rspec-core (~> 3.12.0)
58
55
  rspec-expectations (~> 3.12.0)
@@ -70,8 +67,6 @@ GEM
70
67
  rspec-core (>= 2, < 4, != 2.12.0)
71
68
  ruby2_keywords (0.0.5)
72
69
  rubyzip (2.3.2)
73
- sys-uname (1.2.3)
74
- ffi (~> 1.1)
75
70
  vcr (3.0.3)
76
71
  webmock (1.24.6)
77
72
  addressable (>= 2.3.6)
@@ -84,7 +79,6 @@ PLATFORMS
84
79
  DEPENDENCIES
85
80
  aspose_slides_cloud!
86
81
  autotest (~> 4.4, >= 4.4.6)
87
- autotest-fsevent (~> 0.2, >= 0.2.12)
88
82
  autotest-growl (~> 0.2, >= 0.2.16)
89
83
  autotest-rails-pure (~> 4.1, >= 4.1.2)
90
84
  rake (~> 12.3.3)
data/README.md CHANGED
@@ -27,6 +27,14 @@ You may want to check out Aspose free [Powerpoint to PDF](https://products.aspos
27
27
  **Web:** HTML/HTML5
28
28
  **Other:** MPEG4, SWF (export whole presentations)
29
29
 
30
+ ## Enhancements in Version 23.10
31
+
32
+ * Added asynchronous API - **SlidesAsyncApi** class with **StartConvert**, **StartDownloadPresentation**, **GetOperationStatus**, **GetOperationResult** methods that allow tracking progress of conversion operations.
33
+
34
+ ## Enhancements in Version 23.9
35
+
36
+ * Added **ReplaceImage** and **ReplaceImageOnline** methods that enable replacing images in a presentation.
37
+
30
38
  ## Enhancements in Version 23.7
31
39
 
32
40
  * New methods **ReplaceTextFormatting** and **ReplaceTextFormatting** allow to replace text with formatting.
@@ -49,7 +49,6 @@ Gem::Specification.new do |s|
49
49
  s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
50
50
  s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
51
51
  s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
52
- s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
53
52
  s.add_development_dependency 'rubyzip', '~> 2.3', '>= 2.3.0'
54
53
  s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
55
54
  s.test_files = `find spec/*`.split("\n").uniq.sort.select { |f| !f.empty? && f.start_with?("spec") }
data/docker-entrypoint.sh CHANGED
@@ -3,6 +3,7 @@
3
3
  sed -i 's~@your_client_id@~'"${CLIENT_ID}"'~g' testConfig.json
4
4
  sed -i 's~@your_client_secret@~'"${CLIENT_SECRET}"'~g' testConfig.json
5
5
  sed -i 's~@base_url@~'"${BASE_URL}"'~g' testConfig.json
6
+ sed -i 's~@async_base_url@~'"${BASE_ASYNC_URL}"'~g' testConfig.json
6
7
  sed -i 's~@base_auth_url@~'"${BASE_AUTH_URL}"'~g' testConfig.json
7
8
 
8
9
  mkdir testResults
@@ -2794,7 +2794,7 @@ module AsposeSlidesCloud
2794
2794
  # @param folder Document folder.
2795
2795
  # @param storage Document storage.
2796
2796
  # @param sub_shape Sub-shape path (e.g. \"3\", \"3/shapes/2).
2797
- def create_special_slide_shape(name, slide_index, slide_type, dto = nil, shape_to_clone = nil, position = nil, password = nil, folder = nil, storage = nil, sub_shape = nil)
2797
+ def create_special_slide_shape(name, slide_index, slide_type, dto, shape_to_clone = nil, position = nil, password = nil, folder = nil, storage = nil, sub_shape = nil)
2798
2798
  data, _status_code, _headers = create_special_slide_shape_with_http_info(name, slide_index, slide_type, dto, shape_to_clone, position, password, folder, storage, sub_shape)
2799
2799
  data
2800
2800
  end
@@ -2810,7 +2810,7 @@ module AsposeSlidesCloud
2810
2810
  # @param folder Document folder.
2811
2811
  # @param storage Document storage.
2812
2812
  # @param sub_shape Sub-shape path (e.g. \"3\", \"3/shapes/2).
2813
- def create_special_slide_shape_with_http_info(name, slide_index, slide_type, dto = nil, shape_to_clone = nil, position = nil, password = nil, folder = nil, storage = nil, sub_shape = nil)
2813
+ def create_special_slide_shape_with_http_info(name, slide_index, slide_type, dto, shape_to_clone = nil, position = nil, password = nil, folder = nil, storage = nil, sub_shape = nil)
2814
2814
  if @api_client.config.debugging
2815
2815
  @api_client.config.logger.debug 'Calling API: SlidesApi.create_special_slide_shape ...'
2816
2816
  end
@@ -2831,6 +2831,10 @@ module AsposeSlidesCloud
2831
2831
  if @api_client.config.client_side_validation && !['MasterSlide', 'LayoutSlide', 'NotesSlide'].any?{ |s| s.casecmp(slide_type)==0 }
2832
2832
  fail ArgumentError, "Invalid value for parameter slide_type: " + slide_type + ". Must be one of MasterSlide, LayoutSlide, NotesSlide"
2833
2833
  end
2834
+ # verify the required parameter 'dto' is set
2835
+ if @api_client.config.client_side_validation && dto.nil?
2836
+ fail ArgumentError, "Missing the required parameter 'dto' when calling SlidesApi.create_special_slide_shape"
2837
+ end
2834
2838
  # resource path
2835
2839
  local_var_path = '/slides/{name}/slides/{slideIndex}/{slideType}/shapes'
2836
2840
  local_var_path = @api_client.replace_path_parameter(local_var_path, 'name', name)
@@ -4975,7 +4979,7 @@ module AsposeSlidesCloud
4975
4979
  # Resets all presentation protection settings.
4976
4980
  # @param document Document data.
4977
4981
  # @param password Presentation password.
4978
- def delete_protection_online(document, password)
4982
+ def delete_protection_online(document, password = nil)
4979
4983
  data, _status_code, _headers = delete_protection_online_with_http_info(document, password)
4980
4984
  data
4981
4985
  end
@@ -4983,7 +4987,7 @@ module AsposeSlidesCloud
4983
4987
  # Resets all presentation protection settings.
4984
4988
  # @param document Document data.
4985
4989
  # @param password Presentation password.
4986
- def delete_protection_online_with_http_info(document, password)
4990
+ def delete_protection_online_with_http_info(document, password = nil)
4987
4991
  if @api_client.config.debugging
4988
4992
  @api_client.config.logger.debug 'Calling API: SlidesApi.delete_protection_online ...'
4989
4993
  end
@@ -4992,10 +4996,6 @@ module AsposeSlidesCloud
4992
4996
  if @api_client.config.client_side_validation && document.nil?
4993
4997
  fail ArgumentError, "Missing the required parameter 'document' when calling SlidesApi.delete_protection_online"
4994
4998
  end
4995
- # verify the required parameter 'password' is set
4996
- if @api_client.config.client_side_validation && password.nil?
4997
- fail ArgumentError, "Missing the required parameter 'password' when calling SlidesApi.delete_protection_online"
4998
- end
4999
4999
  # resource path
5000
5000
  local_var_path = '/slides/protection/delete'
5001
5001
 
@@ -5008,7 +5008,7 @@ module AsposeSlidesCloud
5008
5008
  header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
5009
5009
  # HTTP header 'Content-Type'
5010
5010
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
5011
- header_params[:'password'] = password
5011
+ header_params[:'password'] = password unless password.nil?
5012
5012
 
5013
5013
  # http body (model)
5014
5014
  post_body = nil
@@ -14366,6 +14366,139 @@ module AsposeSlidesCloud
14366
14366
  :return_type => 'File')
14367
14367
  return data, status_code, headers
14368
14368
  end
14369
+ # Replaces image by the specified index.
14370
+ # @param name Document name.
14371
+ # @param image_index Image index.
14372
+ # @param image Image data.
14373
+ # @param password Document password.
14374
+ # @param folder Document folder.
14375
+ # @param storage Document storage.
14376
+ def replace_image(name, image_index, image = nil, password = nil, folder = nil, storage = nil)
14377
+ replace_image_with_http_info(name, image_index, image, password, folder, storage)
14378
+ nil
14379
+ end
14380
+
14381
+ # Replaces image by the specified index.
14382
+ # @param name Document name.
14383
+ # @param image_index Image index.
14384
+ # @param image Image data.
14385
+ # @param password Document password.
14386
+ # @param folder Document folder.
14387
+ # @param storage Document storage.
14388
+ def replace_image_with_http_info(name, image_index, image = nil, password = nil, folder = nil, storage = nil)
14389
+ if @api_client.config.debugging
14390
+ @api_client.config.logger.debug 'Calling API: SlidesApi.replace_image ...'
14391
+ end
14392
+
14393
+ # verify the required parameter 'name' is set
14394
+ if @api_client.config.client_side_validation && name.nil?
14395
+ fail ArgumentError, "Missing the required parameter 'name' when calling SlidesApi.replace_image"
14396
+ end
14397
+ # verify the required parameter 'image_index' is set
14398
+ if @api_client.config.client_side_validation && image_index.nil?
14399
+ fail ArgumentError, "Missing the required parameter 'image_index' when calling SlidesApi.replace_image"
14400
+ end
14401
+ # resource path
14402
+ local_var_path = '/slides/{name}/images/{imageIndex}/replace'
14403
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'name', name)
14404
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'imageIndex', image_index)
14405
+
14406
+ # query parameters
14407
+ query_params = {}
14408
+ query_params[:'folder'] = @api_client.prepare_for_query(folder) unless folder.nil?
14409
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
14410
+
14411
+ # header parameters
14412
+ header_params = {}
14413
+ # HTTP header 'Accept' (if needed)
14414
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
14415
+ # HTTP header 'Content-Type'
14416
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
14417
+ header_params[:'password'] = password unless password.nil?
14418
+
14419
+ # http body (model)
14420
+ post_body = nil
14421
+
14422
+ # form parameters
14423
+ post_files = []
14424
+ if image
14425
+ post_files = post_files.push(image)
14426
+ end
14427
+
14428
+ auth_names = ['JWT']
14429
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
14430
+ :header_params => header_params,
14431
+ :query_params => query_params,
14432
+ :body => post_body,
14433
+ :files => post_files,
14434
+ :auth_names => auth_names)
14435
+ return data, status_code, headers
14436
+ end
14437
+ # Replaces image by the specified index and returns updated document.
14438
+ # @param document Document data.
14439
+ # @param image_index Image index.
14440
+ # @param image Image data.
14441
+ # @param password Password.
14442
+ def replace_image_online(document, image_index, image = nil, password = nil)
14443
+ data, _status_code, _headers = replace_image_online_with_http_info(document, image_index, image, password)
14444
+ data
14445
+ end
14446
+
14447
+ # Replaces image by the specified index and returns updated document.
14448
+ # @param document Document data.
14449
+ # @param image_index Image index.
14450
+ # @param image Image data.
14451
+ # @param password Password.
14452
+ def replace_image_online_with_http_info(document, image_index, image = nil, password = nil)
14453
+ if @api_client.config.debugging
14454
+ @api_client.config.logger.debug 'Calling API: SlidesApi.replace_image_online ...'
14455
+ end
14456
+
14457
+ # verify the required parameter 'document' is set
14458
+ if @api_client.config.client_side_validation && document.nil?
14459
+ fail ArgumentError, "Missing the required parameter 'document' when calling SlidesApi.replace_image_online"
14460
+ end
14461
+ # verify the required parameter 'image_index' is set
14462
+ if @api_client.config.client_side_validation && image_index.nil?
14463
+ fail ArgumentError, "Missing the required parameter 'image_index' when calling SlidesApi.replace_image_online"
14464
+ end
14465
+ # resource path
14466
+ local_var_path = '/slides/images/{imageIndex}/replace'
14467
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'imageIndex', image_index)
14468
+
14469
+ # query parameters
14470
+ query_params = {}
14471
+
14472
+ # header parameters
14473
+ header_params = {}
14474
+ # HTTP header 'Accept' (if needed)
14475
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
14476
+ # HTTP header 'Content-Type'
14477
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
14478
+ header_params[:'password'] = password unless password.nil?
14479
+
14480
+ # http body (model)
14481
+ post_body = nil
14482
+
14483
+ # form parameters
14484
+ post_files = []
14485
+ if document
14486
+ post_files = post_files.push(document)
14487
+ end
14488
+ if image
14489
+ post_files = post_files.push(image)
14490
+ end
14491
+
14492
+ auth_names = ['JWT']
14493
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
14494
+ :header_params => header_params,
14495
+ :query_params => query_params,
14496
+ :body => post_body,
14497
+ :files => post_files,
14498
+ :auth_names => auth_names,
14499
+ :return_type => 'File')
14500
+ return data, status_code, headers
14501
+ end
14369
14502
  # Replace text with a new value.
14370
14503
  # @param name Document name.
14371
14504
  # @param old_value Text value to be replaced.
@@ -0,0 +1,273 @@
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 name
199
+ # @param format
200
+ # @param options
201
+ # @param password
202
+ # @param folder
203
+ # @param storage
204
+ # @param fonts_folder
205
+ # @param slides
206
+ def start_download_presentation(name, format, options = nil, password = nil, folder = nil, storage = nil, fonts_folder = nil, slides = nil)
207
+ data, _status_code, _headers = start_download_presentation_with_http_info(name, format, options, password, folder, storage, fonts_folder, slides)
208
+ data
209
+ end
210
+
211
+ # @param name
212
+ # @param format
213
+ # @param options
214
+ # @param password
215
+ # @param folder
216
+ # @param storage
217
+ # @param fonts_folder
218
+ # @param slides
219
+ def start_download_presentation_with_http_info(name, format, options = nil, password = nil, folder = nil, storage = nil, fonts_folder = nil, slides = nil)
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug 'Calling API: SlidesAsyncApi.start_download_presentation ...'
222
+ end
223
+
224
+ # verify the required parameter 'name' is set
225
+ if @api_client.config.client_side_validation && name.nil?
226
+ fail ArgumentError, "Missing the required parameter 'name' when calling SlidesAsyncApi.start_download_presentation"
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_download_presentation"
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
+ # resource path
237
+ local_var_path = '/slides/async/{name}/{format}'
238
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'name', name)
239
+ local_var_path = @api_client.replace_path_parameter(local_var_path, 'format', format)
240
+
241
+ # query parameters
242
+ query_params = {}
243
+ query_params[:'folder'] = @api_client.prepare_for_query(folder) unless folder.nil?
244
+ query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
245
+ query_params[:'fontsFolder'] = @api_client.prepare_for_query(fonts_folder) unless fonts_folder.nil?
246
+ query_params[:'slides'] = @api_client.prepare_for_query(slides) unless slides.nil?
247
+
248
+ # header parameters
249
+ header_params = {}
250
+ # HTTP header 'Accept' (if needed)
251
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
252
+ # HTTP header 'Content-Type'
253
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
254
+ header_params[:'password'] = password unless password.nil?
255
+
256
+ # http body (model)
257
+ post_body = @api_client.object_to_http_body(options)
258
+
259
+ # form parameters
260
+ post_files = []
261
+
262
+ auth_names = ['JWT']
263
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
264
+ :header_params => header_params,
265
+ :query_params => query_params,
266
+ :body => post_body,
267
+ :files => post_files,
268
+ :auth_names => auth_names,
269
+ :return_type => 'String')
270
+ return data, status_code, headers
271
+ end
272
+ end
273
+ 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'