groupdocs_conversion_cloud 19.4 → 21.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_conversion_cloud.rb +6 -2
  3. data/lib/groupdocs_conversion_cloud/api/convert_api.rb +342 -0
  4. data/lib/groupdocs_conversion_cloud/api/file_api.rb +7 -7
  5. data/lib/groupdocs_conversion_cloud/api/folder_api.rb +7 -7
  6. data/lib/groupdocs_conversion_cloud/api/{conversion_api.rb → info_api.rb} +54 -43
  7. data/lib/groupdocs_conversion_cloud/api/storage_api.rb +5 -5
  8. data/lib/groupdocs_conversion_cloud/api_client.rb +1 -1
  9. data/lib/groupdocs_conversion_cloud/api_error.rb +1 -1
  10. data/lib/groupdocs_conversion_cloud/configuration.rb +1 -1
  11. data/lib/groupdocs_conversion_cloud/models/bmp_convert_options.rb +102 -5
  12. data/lib/groupdocs_conversion_cloud/models/bmp_load_options.rb +1 -1
  13. data/lib/groupdocs_conversion_cloud/models/cad_load_options.rb +1 -1
  14. data/lib/groupdocs_conversion_cloud/models/cgm_convert_options.rb +102 -5
  15. data/lib/groupdocs_conversion_cloud/models/convert_options.rb +1 -1
  16. data/lib/groupdocs_conversion_cloud/models/convert_settings.rb +15 -5
  17. data/lib/groupdocs_conversion_cloud/models/csv_load_options.rb +15 -5
  18. data/lib/groupdocs_conversion_cloud/models/dcm_convert_options.rb +102 -5
  19. data/lib/groupdocs_conversion_cloud/models/dcm_load_options.rb +1 -1
  20. data/lib/groupdocs_conversion_cloud/models/dgn_load_options.rb +1 -1
  21. data/lib/groupdocs_conversion_cloud/models/diagram_load_options.rb +1 -1
  22. data/lib/groupdocs_conversion_cloud/models/disc_usage.rb +1 -1
  23. data/lib/groupdocs_conversion_cloud/models/djvu_convert_options.rb +102 -5
  24. data/lib/groupdocs_conversion_cloud/models/dng_convert_options.rb +102 -5
  25. data/lib/groupdocs_conversion_cloud/models/dng_load_options.rb +1 -1
  26. data/lib/groupdocs_conversion_cloud/models/doc_convert_options.rb +1 -1
  27. data/lib/groupdocs_conversion_cloud/models/doc_load_options.rb +50 -5
  28. data/lib/groupdocs_conversion_cloud/models/docm_convert_options.rb +1 -1
  29. data/lib/groupdocs_conversion_cloud/models/docm_load_options.rb +50 -5
  30. data/lib/groupdocs_conversion_cloud/models/document_metadata.rb +396 -0
  31. data/lib/groupdocs_conversion_cloud/models/docx_convert_options.rb +1 -1
  32. data/lib/groupdocs_conversion_cloud/models/docx_load_options.rb +50 -5
  33. data/lib/groupdocs_conversion_cloud/models/dot_convert_options.rb +1 -1
  34. data/lib/groupdocs_conversion_cloud/models/dot_load_options.rb +50 -5
  35. data/lib/groupdocs_conversion_cloud/models/dotm_convert_options.rb +1 -1
  36. data/lib/groupdocs_conversion_cloud/models/dotm_load_options.rb +50 -5
  37. data/lib/groupdocs_conversion_cloud/models/dotx_convert_options.rb +1 -1
  38. data/lib/groupdocs_conversion_cloud/models/dotx_load_options.rb +50 -5
  39. data/lib/groupdocs_conversion_cloud/models/dwf_load_options.rb +1 -1
  40. data/lib/groupdocs_conversion_cloud/models/dwg_load_options.rb +1 -1
  41. data/lib/groupdocs_conversion_cloud/models/dxf_load_options.rb +1 -1
  42. data/lib/groupdocs_conversion_cloud/models/email_load_options.rb +57 -5
  43. data/lib/groupdocs_conversion_cloud/models/emf_convert_options.rb +102 -5
  44. data/lib/groupdocs_conversion_cloud/models/emf_load_options.rb +1 -1
  45. data/lib/groupdocs_conversion_cloud/models/eml_load_options.rb +57 -5
  46. data/lib/groupdocs_conversion_cloud/models/emlx_load_options.rb +57 -5
  47. data/lib/groupdocs_conversion_cloud/models/epub_convert_options.rb +1 -1
  48. data/lib/groupdocs_conversion_cloud/models/error.rb +1 -1
  49. data/lib/groupdocs_conversion_cloud/models/error_details.rb +1 -1
  50. data/lib/groupdocs_conversion_cloud/models/field_label.rb +266 -0
  51. data/lib/groupdocs_conversion_cloud/models/file_version.rb +1 -1
  52. data/lib/groupdocs_conversion_cloud/models/file_versions.rb +1 -1
  53. data/lib/groupdocs_conversion_cloud/models/files_list.rb +1 -1
  54. data/lib/groupdocs_conversion_cloud/models/files_upload_result.rb +1 -1
  55. data/lib/groupdocs_conversion_cloud/models/gif_convert_options.rb +102 -5
  56. data/lib/groupdocs_conversion_cloud/models/gif_load_options.rb +1 -1
  57. data/lib/groupdocs_conversion_cloud/models/html_convert_options.rb +17 -2
  58. data/lib/groupdocs_conversion_cloud/models/html_load_options.rb +219 -0
  59. data/lib/groupdocs_conversion_cloud/models/ico_convert_options.rb +102 -5
  60. data/lib/groupdocs_conversion_cloud/models/ico_load_options.rb +1 -1
  61. data/lib/groupdocs_conversion_cloud/models/ifc_load_options.rb +1 -1
  62. data/lib/groupdocs_conversion_cloud/models/igs_load_options.rb +1 -1
  63. data/lib/groupdocs_conversion_cloud/models/image_convert_options.rb +102 -5
  64. data/lib/groupdocs_conversion_cloud/models/image_load_options.rb +1 -1
  65. data/lib/groupdocs_conversion_cloud/models/j2c_convert_options.rb +99 -2
  66. data/lib/groupdocs_conversion_cloud/models/j2c_load_options.rb +1 -1
  67. data/lib/groupdocs_conversion_cloud/models/j2k_convert_options.rb +99 -2
  68. data/lib/groupdocs_conversion_cloud/models/j2k_load_options.rb +1 -1
  69. data/lib/groupdocs_conversion_cloud/models/jp2_convert_options.rb +99 -2
  70. data/lib/groupdocs_conversion_cloud/models/jp2_load_options.rb +1 -1
  71. data/lib/groupdocs_conversion_cloud/models/jpeg_convert_options.rb +99 -2
  72. data/lib/groupdocs_conversion_cloud/models/jpeg_load_options.rb +1 -1
  73. data/lib/groupdocs_conversion_cloud/models/jpf_convert_options.rb +99 -2
  74. data/lib/groupdocs_conversion_cloud/models/jpf_load_options.rb +1 -1
  75. data/lib/groupdocs_conversion_cloud/models/jpg_convert_options.rb +99 -2
  76. data/lib/groupdocs_conversion_cloud/models/jpg_load_options.rb +1 -1
  77. data/lib/groupdocs_conversion_cloud/models/jpm_convert_options.rb +99 -2
  78. data/lib/groupdocs_conversion_cloud/models/jpm_load_options.rb +1 -1
  79. data/lib/groupdocs_conversion_cloud/models/jpx_convert_options.rb +99 -2
  80. data/lib/groupdocs_conversion_cloud/models/jpx_load_options.rb +1 -1
  81. data/lib/groupdocs_conversion_cloud/models/load_options.rb +1 -1
  82. data/lib/groupdocs_conversion_cloud/models/mht_load_options.rb +57 -5
  83. data/lib/groupdocs_conversion_cloud/models/mobi_load_options.rb +50 -5
  84. data/lib/groupdocs_conversion_cloud/models/msg_load_options.rb +57 -5
  85. data/lib/groupdocs_conversion_cloud/models/object_exist.rb +1 -1
  86. data/lib/groupdocs_conversion_cloud/models/odg_convert_options.rb +102 -5
  87. data/lib/groupdocs_conversion_cloud/models/odg_load_options.rb +1 -1
  88. data/lib/groupdocs_conversion_cloud/models/odp_convert_options.rb +1 -1
  89. data/lib/groupdocs_conversion_cloud/models/odp_load_options.rb +1 -1
  90. data/lib/groupdocs_conversion_cloud/models/ods_convert_options.rb +1 -1
  91. data/lib/groupdocs_conversion_cloud/models/ods_load_options.rb +1 -1
  92. data/lib/groupdocs_conversion_cloud/models/odt_convert_options.rb +1 -1
  93. data/lib/groupdocs_conversion_cloud/models/odt_load_options.rb +50 -5
  94. data/lib/groupdocs_conversion_cloud/models/one_load_options.rb +1 -1
  95. data/lib/groupdocs_conversion_cloud/models/ost_load_options.rb +57 -5
  96. data/lib/groupdocs_conversion_cloud/models/otp_convert_options.rb +1 -1
  97. data/lib/groupdocs_conversion_cloud/models/otp_load_options.rb +1 -1
  98. data/lib/groupdocs_conversion_cloud/models/ots_convert_options.rb +1 -1
  99. data/lib/groupdocs_conversion_cloud/models/ots_load_options.rb +1 -1
  100. data/lib/groupdocs_conversion_cloud/models/ott_convert_options.rb +1 -1
  101. data/lib/groupdocs_conversion_cloud/models/ott_load_options.rb +50 -5
  102. data/lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb +11 -56
  103. data/lib/groupdocs_conversion_cloud/models/pdf_load_options.rb +1 -1
  104. data/lib/groupdocs_conversion_cloud/models/plt_load_options.rb +1 -1
  105. data/lib/groupdocs_conversion_cloud/models/png_convert_options.rb +102 -5
  106. data/lib/groupdocs_conversion_cloud/models/png_load_options.rb +1 -1
  107. data/lib/groupdocs_conversion_cloud/models/potm_convert_options.rb +1 -1
  108. data/lib/groupdocs_conversion_cloud/models/potm_load_options.rb +1 -1
  109. data/lib/groupdocs_conversion_cloud/models/potx_convert_options.rb +1 -1
  110. data/lib/groupdocs_conversion_cloud/models/potx_load_options.rb +1 -1
  111. data/lib/groupdocs_conversion_cloud/models/pps_convert_options.rb +1 -1
  112. data/lib/groupdocs_conversion_cloud/models/pps_load_options.rb +1 -1
  113. data/lib/groupdocs_conversion_cloud/models/ppsm_convert_options.rb +1 -1
  114. data/lib/groupdocs_conversion_cloud/models/ppsm_load_options.rb +1 -1
  115. data/lib/groupdocs_conversion_cloud/models/ppsx_convert_options.rb +1 -1
  116. data/lib/groupdocs_conversion_cloud/models/ppsx_load_options.rb +1 -1
  117. data/lib/groupdocs_conversion_cloud/models/ppt_convert_options.rb +1 -1
  118. data/lib/groupdocs_conversion_cloud/models/ppt_load_options.rb +1 -1
  119. data/lib/groupdocs_conversion_cloud/models/pptm_convert_options.rb +1 -1
  120. data/lib/groupdocs_conversion_cloud/models/pptm_load_options.rb +1 -1
  121. data/lib/groupdocs_conversion_cloud/models/pptx_convert_options.rb +1 -1
  122. data/lib/groupdocs_conversion_cloud/models/pptx_load_options.rb +1 -1
  123. data/lib/groupdocs_conversion_cloud/models/presentation_convert_options.rb +1 -1
  124. data/lib/groupdocs_conversion_cloud/models/presentation_load_options.rb +1 -1
  125. data/lib/groupdocs_conversion_cloud/models/psd_convert_options.rb +78 -2
  126. data/lib/groupdocs_conversion_cloud/models/psd_load_options.rb +1 -1
  127. data/lib/groupdocs_conversion_cloud/models/pst_load_options.rb +57 -5
  128. data/lib/groupdocs_conversion_cloud/models/rtf_convert_options.rb +1 -1
  129. data/lib/groupdocs_conversion_cloud/models/spreadsheet_convert_options.rb +1 -1
  130. data/lib/groupdocs_conversion_cloud/models/spreadsheet_load_options.rb +1 -1
  131. data/lib/groupdocs_conversion_cloud/models/stl_load_options.rb +1 -1
  132. data/lib/groupdocs_conversion_cloud/models/storage_exist.rb +1 -1
  133. data/lib/groupdocs_conversion_cloud/models/storage_file.rb +1 -1
  134. data/lib/groupdocs_conversion_cloud/models/stored_converted_result.rb +1 -1
  135. data/lib/groupdocs_conversion_cloud/models/supported_format.rb +1 -1
  136. data/lib/groupdocs_conversion_cloud/models/svg_convert_options.rb +1 -1
  137. data/lib/groupdocs_conversion_cloud/models/tif_convert_options.rb +78 -2
  138. data/lib/groupdocs_conversion_cloud/models/tif_load_options.rb +1 -1
  139. data/lib/groupdocs_conversion_cloud/models/tiff_convert_options.rb +78 -2
  140. data/lib/groupdocs_conversion_cloud/models/tiff_load_options.rb +1 -1
  141. data/lib/groupdocs_conversion_cloud/models/tsv_convert_options.rb +1 -1
  142. data/lib/groupdocs_conversion_cloud/models/tsv_load_options.rb +1 -1
  143. data/lib/groupdocs_conversion_cloud/models/txt_convert_options.rb +1 -1
  144. data/lib/groupdocs_conversion_cloud/models/txt_load_options.rb +15 -5
  145. data/lib/groupdocs_conversion_cloud/models/vdw_load_options.rb +1 -1
  146. data/lib/groupdocs_conversion_cloud/models/vdx_load_options.rb +1 -1
  147. data/lib/groupdocs_conversion_cloud/models/vsd_load_options.rb +1 -1
  148. data/lib/groupdocs_conversion_cloud/models/vsdm_load_options.rb +1 -1
  149. data/lib/groupdocs_conversion_cloud/models/vsdx_load_options.rb +1 -1
  150. data/lib/groupdocs_conversion_cloud/models/vss_load_options.rb +1 -1
  151. data/lib/groupdocs_conversion_cloud/models/vssm_load_options.rb +1 -1
  152. data/lib/groupdocs_conversion_cloud/models/vssx_load_options.rb +1 -1
  153. data/lib/groupdocs_conversion_cloud/models/vst_load_options.rb +1 -1
  154. data/lib/groupdocs_conversion_cloud/models/vstm_load_options.rb +1 -1
  155. data/lib/groupdocs_conversion_cloud/models/vstx_load_options.rb +1 -1
  156. data/lib/groupdocs_conversion_cloud/models/vsx_load_options.rb +1 -1
  157. data/lib/groupdocs_conversion_cloud/models/vtx_load_options.rb +1 -1
  158. data/lib/groupdocs_conversion_cloud/models/watermark_options.rb +32 -2
  159. data/lib/groupdocs_conversion_cloud/models/webp_convert_options.rb +99 -2
  160. data/lib/groupdocs_conversion_cloud/models/webp_load_options.rb +1 -1
  161. data/lib/groupdocs_conversion_cloud/models/wmf_convert_options.rb +102 -5
  162. data/lib/groupdocs_conversion_cloud/models/wmf_load_options.rb +1 -1
  163. data/lib/groupdocs_conversion_cloud/models/word_processing_convert_options.rb +1 -1
  164. data/lib/groupdocs_conversion_cloud/models/word_processing_load_options.rb +50 -5
  165. data/lib/groupdocs_conversion_cloud/models/xls2003_convert_options.rb +1 -1
  166. data/lib/groupdocs_conversion_cloud/models/xls2003_load_options.rb +1 -1
  167. data/lib/groupdocs_conversion_cloud/models/xls_convert_options.rb +1 -1
  168. data/lib/groupdocs_conversion_cloud/models/xls_load_options.rb +1 -1
  169. data/lib/groupdocs_conversion_cloud/models/xlsb_convert_options.rb +1 -1
  170. data/lib/groupdocs_conversion_cloud/models/xlsb_load_options.rb +1 -1
  171. data/lib/groupdocs_conversion_cloud/models/xlsm_convert_options.rb +1 -1
  172. data/lib/groupdocs_conversion_cloud/models/xlsm_load_options.rb +1 -1
  173. data/lib/groupdocs_conversion_cloud/models/xlsx_convert_options.rb +1 -1
  174. data/lib/groupdocs_conversion_cloud/models/xlsx_load_options.rb +1 -1
  175. data/lib/groupdocs_conversion_cloud/models/xltm_convert_options.rb +1 -1
  176. data/lib/groupdocs_conversion_cloud/models/xltm_load_options.rb +1 -1
  177. data/lib/groupdocs_conversion_cloud/models/xltx_convert_options.rb +1 -1
  178. data/lib/groupdocs_conversion_cloud/models/xltx_load_options.rb +1 -1
  179. data/lib/groupdocs_conversion_cloud/models/xml_load_options.rb +1 -1
  180. data/lib/groupdocs_conversion_cloud/models/xps_convert_options.rb +1 -1
  181. data/lib/groupdocs_conversion_cloud/version.rb +2 -2
  182. metadata +7 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 318acced2d73772d827e8c49c490eb12a7d02c55
4
- data.tar.gz: f4ace8c6f615d561befa441256d35ba0857d9b14
3
+ metadata.gz: 277b1445c5dc9fde773bc897b52bb2342cd8cbfb
4
+ data.tar.gz: 82b8f6da1ca19a4f39e21ae43a74520ed96862d6
5
5
  SHA512:
6
- metadata.gz: f69b1560c1b2cb04f01b116cfaf30ae730466ad1151a8cb18234f684cf3733e7f4063a78b8051a52640d0b8dce8a8c5b337c369a2c34735350d387a925c06194
7
- data.tar.gz: 4fec31cd43d930f23fdf952341e3aec5364b0281a9ef8c23ac6a08565528f35ad1e528263dd290f47e9b8190d0ae1baad39c96dd32daa94b21c99add498dcd70
6
+ metadata.gz: af29f8a41fa98040494ce075226777c0ad6c6026eb070304f24d0bdb576e4d11055c28d12c002fbbe7364fb61b34e92310117249f0ef518769bc7eb2cde81b5b
7
+ data.tar.gz: d39b339a03f2b5793be791c065c200f286399260253cd16f55237f82981d18d7656ea87f9267346361c3fae1b198a276978fc7d8181092b00607f646f7cbc83b
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="groupdocs_conversion_cloud.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -33,8 +33,10 @@ require_relative 'groupdocs_conversion_cloud/configuration'
33
33
  require_relative 'groupdocs_conversion_cloud/models/convert_options'
34
34
  require_relative 'groupdocs_conversion_cloud/models/convert_settings'
35
35
  require_relative 'groupdocs_conversion_cloud/models/disc_usage'
36
+ require_relative 'groupdocs_conversion_cloud/models/document_metadata'
36
37
  require_relative 'groupdocs_conversion_cloud/models/error'
37
38
  require_relative 'groupdocs_conversion_cloud/models/error_details'
39
+ require_relative 'groupdocs_conversion_cloud/models/field_label'
38
40
  require_relative 'groupdocs_conversion_cloud/models/file_versions'
39
41
  require_relative 'groupdocs_conversion_cloud/models/files_list'
40
42
  require_relative 'groupdocs_conversion_cloud/models/files_upload_result'
@@ -51,6 +53,7 @@ require_relative 'groupdocs_conversion_cloud/models/diagram_load_options'
51
53
  require_relative 'groupdocs_conversion_cloud/models/email_load_options'
52
54
  require_relative 'groupdocs_conversion_cloud/models/file_version'
53
55
  require_relative 'groupdocs_conversion_cloud/models/html_convert_options'
56
+ require_relative 'groupdocs_conversion_cloud/models/html_load_options'
54
57
  require_relative 'groupdocs_conversion_cloud/models/image_convert_options'
55
58
  require_relative 'groupdocs_conversion_cloud/models/image_load_options'
56
59
  require_relative 'groupdocs_conversion_cloud/models/one_load_options'
@@ -199,7 +202,8 @@ require_relative 'groupdocs_conversion_cloud/models/jpx_convert_options'
199
202
  require_relative 'groupdocs_conversion_cloud/models/tif_convert_options'
200
203
 
201
204
  # APIs
202
- require_relative 'groupdocs_conversion_cloud/api/conversion_api'
205
+ require_relative 'groupdocs_conversion_cloud/api/convert_api'
203
206
  require_relative 'groupdocs_conversion_cloud/api/file_api'
204
207
  require_relative 'groupdocs_conversion_cloud/api/folder_api'
208
+ require_relative 'groupdocs_conversion_cloud/api/info_api'
205
209
  require_relative 'groupdocs_conversion_cloud/api/storage_api'
@@ -0,0 +1,342 @@
1
+ # -----------------------------------------------------------------------------------
2
+ # <copyright company="Aspose Pty Ltd" file="convert.rb">
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+ # </summary>
24
+ # -----------------------------------------------------------------------------------
25
+
26
+ require 'uri'
27
+ require 'date'
28
+
29
+ module GroupDocsConversionCloud
30
+ #
31
+ # GroupDocs.Conversion Cloud API
32
+ #
33
+ class ConvertApi
34
+ attr_accessor :config
35
+
36
+ #make ConvertApi.new private
37
+ private_class_method :new
38
+
39
+ # Initializes new instance of ConvertApi
40
+ #
41
+ # @param [config] Configuration
42
+ # @return [ConvertApi] New instance of ConvertApi
43
+ def initialize(config)
44
+ @config = config
45
+ @api_client = ApiClient.new(config)
46
+ @access_token = nil
47
+ end
48
+
49
+ # Initializes new instance of ConvertApi
50
+ #
51
+ # @param [app_sid] Application identifier (App SID)
52
+ # @param [app_key] Application private key (App Key)
53
+ # @return [ConvertApi] New instance of ConvertApi
54
+ def self.from_keys(app_sid, app_key)
55
+ config = Configuration.new(app_sid, app_key)
56
+ return new(config)
57
+ end
58
+
59
+ # Initializes new instance of ConvertApi
60
+ #
61
+ # @param [config] Configuration
62
+ # @return [ConvertApi] New instance of ConvertApi
63
+ def self.from_config(config)
64
+ return new(config)
65
+ end
66
+
67
+ # Converts specified input document to format specified in the convertSettings with specified options
68
+ #
69
+ # @param request convert_document_request
70
+ # @return [Array<StoredConvertedResult>]
71
+ def convert_document(request)
72
+ data, _status_code, _headers = convert_document_with_http_info(request)
73
+ data
74
+ end
75
+
76
+ # Converts specified input document to format specified in the convertSettings with specified options
77
+ #
78
+ # @param request convert_document_request
79
+ # @return [Array<(Array<StoredConvertedResult>, Fixnum, Hash)>]
80
+ # Array<StoredConvertedResult> data, response status code and response headers
81
+ def convert_document_with_http_info(request)
82
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? ConvertDocumentRequest
83
+
84
+ @api_client.config.logger.debug 'Calling API: ConversionApi.convert_document ...' if @api_client.config.debugging
85
+ # verify the required parameter 'convert_settings' is set
86
+ raise ArgumentError, 'Missing the required parameter convert_settings when calling ConversionApi.convert_document' if @api_client.config.client_side_validation && request.convert_settings.nil?
87
+ # resource path
88
+ local_var_path = '/conversion'
89
+
90
+ # query parameters
91
+ query_params = {}
92
+
93
+ # header parameters
94
+ header_params = {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
97
+ # HTTP header 'Content-Type'
98
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
99
+
100
+ # form parameters
101
+ form_params = {}
102
+
103
+ # http body (model)
104
+ post_body = @api_client.object_to_http_body(request.convert_settings)
105
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
106
+ header_params: header_params,
107
+ query_params: query_params,
108
+ form_params: form_params,
109
+ body: post_body,
110
+ access_token: get_access_token,
111
+ return_type: if request.convert_settings.output_path.nil? then 'File' else 'Array<StoredConvertedResult>' end)
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug "API called:
114
+ ConversionApi#convert_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
115
+ end
116
+ [data, status_code, headers]
117
+ end
118
+
119
+
120
+ # Converts input document file to format specified
121
+ #
122
+ # @param request convert_document_direct_request
123
+ # @return [File]
124
+ def convert_document_direct(request)
125
+ data, _status_code, _headers = convert_document_direct_with_http_info(request)
126
+ data
127
+ end
128
+
129
+ # Converts input document file to format specified
130
+ #
131
+ # @param request convert_document_direct_request
132
+ # @return [Array<(File, Fixnum, Hash)>]
133
+ # File data, response status code and response headers
134
+ def convert_document_direct_with_http_info(request)
135
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? ConvertDocumentDirectRequest
136
+
137
+ @api_client.config.logger.debug 'Calling API: ConvertApi.convert_document_direct ...' if @api_client.config.debugging
138
+ # verify the required parameter 'format' is set
139
+ raise ArgumentError, 'Missing the required parameter format when calling ConvertApi.convert_document_direct' if @api_client.config.client_side_validation && request.format.nil?
140
+ # verify the required parameter 'file' is set
141
+ raise ArgumentError, 'Missing the required parameter file when calling ConvertApi.convert_document_direct' if @api_client.config.client_side_validation && request.file.nil?
142
+ # resource path
143
+ local_var_path = '/conversion'
144
+
145
+ # query parameters
146
+ query_params = {}
147
+ query_params[downcase_first_letter('format')] = request.format
148
+
149
+ if local_var_path.include? ('{' + downcase_first_letter('fromPage') + '}')
150
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('fromPage') + '}', request.from_page.to_s)
151
+ else
152
+ query_params[downcase_first_letter('fromPage')] = request.from_page unless request.from_page.nil?
153
+ end
154
+ if local_var_path.include? ('{' + downcase_first_letter('pagesCount') + '}')
155
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('pagesCount') + '}', request.pages_count.to_s)
156
+ else
157
+ query_params[downcase_first_letter('pagesCount')] = request.pages_count unless request.pages_count.nil?
158
+ end
159
+
160
+ # header parameters
161
+ header_params = {}
162
+ # HTTP header 'Accept' (if needed)
163
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
164
+ # HTTP header 'Content-Type'
165
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
166
+
167
+ # form parameters
168
+ form_params = {}
169
+ form_params[downcase_first_letter('File')] = request.file
170
+
171
+ # http body (model)
172
+ post_body = nil
173
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
174
+ header_params: header_params,
175
+ query_params: query_params,
176
+ form_params: form_params,
177
+ body: post_body,
178
+ access_token: get_access_token,
179
+ return_type: 'File')
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug "API called:
182
+ ConvertApi#convert_document_direct\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
+ end
184
+ [data, status_code, headers]
185
+ end
186
+
187
+ #
188
+ # Helper method to convert first letter to downcase
189
+ #
190
+ private def downcase_first_letter(str)
191
+ value = str[0].downcase + str[1..-1]
192
+ value
193
+ end
194
+
195
+ #
196
+ # Retrieves access token
197
+ #
198
+ private def get_access_token
199
+ if @access_token.nil? then
200
+ request_access_token
201
+ end
202
+
203
+ @access_token
204
+ end
205
+
206
+ #
207
+ # Gets a access token from server
208
+ #
209
+ private def request_access_token
210
+ auth_config = Configuration.new(@config.app_sid, @config.app_key)
211
+ auth_config.api_base_url = @config.api_base_url
212
+ auth_config.debugging = @config.debugging
213
+ auth_config.logger = @config.logger
214
+ auth_config.temp_folder_path = @config.temp_folder_path
215
+ auth_config.client_side_validation = @config.client_side_validation
216
+ auth_config.api_version = ''
217
+
218
+ auth_api_client = ApiClient.new(auth_config)
219
+
220
+ request_url = "/connect/token"
221
+ post_data = "grant_type=client_credentials&client_id=#{@config.app_sid}&client_secret=#{@config.app_key}"
222
+
223
+ data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
224
+
225
+ @access_token = data[:access_token]
226
+
227
+ expires_in_seconds = data[:expires_in].to_i - 5 * 60
228
+ expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
229
+ @access_token_expires_at = DateTime.now + expires_in_days
230
+ end
231
+
232
+ # requires all files inside a directory from current dir
233
+ # @param _dir can be relative path like '/lib' or "../lib"
234
+ private def require_all(_dir)
235
+ Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
236
+ require file
237
+ end
238
+ end
239
+ end
240
+ end
241
+ #
242
+ # --------------------------------------------------------------------------------------------------------------------
243
+ # <copyright company="Aspose Pty Ltd" file="convert_document_request.rb">
244
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
245
+ # </copyright>
246
+ # <summary>
247
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
248
+ # of this software and associated documentation files (the "Software"), to deal
249
+ # in the Software without restriction, including without limitation the rights
250
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
251
+ # copies of the Software, and to permit persons to whom the Software is
252
+ # furnished to do so, subject to the following conditions:
253
+ #
254
+ # The above copyright notice and this permission notice shall be included in all
255
+ # copies or substantial portions of the Software.
256
+ #
257
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
258
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
259
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
260
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
261
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
262
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
263
+ # SOFTWARE.
264
+ # </summary>
265
+ # --------------------------------------------------------------------------------------------------------------------
266
+ #
267
+
268
+ module GroupDocsConversionCloud
269
+
270
+ #
271
+ # Request model for convert_document operation.
272
+ #
273
+ class ConvertDocumentRequest
274
+
275
+ # Gets or sets convert_settings
276
+ attr_accessor :convert_settings
277
+
278
+ #
279
+ # Initializes a new instance.
280
+ # @param convert_settings
281
+ def initialize(convert_settings)
282
+ self.convert_settings = convert_settings
283
+ end
284
+ end
285
+ end
286
+ #
287
+ # --------------------------------------------------------------------------------------------------------------------
288
+ # <copyright company="Aspose Pty Ltd" file="convert_document_direct_request.rb">
289
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
290
+ # </copyright>
291
+ # <summary>
292
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
293
+ # of this software and associated documentation files (the "Software"), to deal
294
+ # in the Software without restriction, including without limitation the rights
295
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
296
+ # copies of the Software, and to permit persons to whom the Software is
297
+ # furnished to do so, subject to the following conditions:
298
+ #
299
+ # The above copyright notice and this permission notice shall be included in all
300
+ # copies or substantial portions of the Software.
301
+ #
302
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
303
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
304
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
305
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
306
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
307
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
308
+ # SOFTWARE.
309
+ # </summary>
310
+ # --------------------------------------------------------------------------------------------------------------------
311
+ #
312
+
313
+ module GroupDocsConversionCloud
314
+
315
+ #
316
+ # Request model for convert_document_direct operation.
317
+ #
318
+ class ConvertDocumentDirectRequest
319
+
320
+ # Requested conversion format
321
+ attr_accessor :format
322
+ # Input file to convert
323
+ attr_accessor :file
324
+ # Page start conversion from
325
+ attr_accessor :from_page
326
+ # Number of pages to convert
327
+ attr_accessor :pages_count
328
+
329
+ #
330
+ # Initializes a new instance.
331
+ # @param format Requested conversion format
332
+ # @param file Input file to convert
333
+ # @param from_page Page start conversion from
334
+ # @param pages_count Number of pages to convert
335
+ def initialize(format, file, from_page = nil, pages_count = nil)
336
+ self.format = format
337
+ self.file = file
338
+ self.from_page = from_page
339
+ self.pages_count = pages_count
340
+ end
341
+ end
342
+ end
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="file.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -378,7 +378,7 @@ module GroupDocsConversionCloud
378
378
 
379
379
  # http body (model)
380
380
  post_body = nil
381
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
381
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
382
382
  header_params: header_params,
383
383
  query_params: query_params,
384
384
  form_params: form_params,
@@ -449,7 +449,7 @@ end
449
449
  #
450
450
  # --------------------------------------------------------------------------------------------------------------------
451
451
  # <copyright company="Aspose Pty Ltd" file="copy_file_request.rb">
452
- # Copyright (c) 2003-2019 Aspose Pty Ltd
452
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
453
453
  # </copyright>
454
454
  # <summary>
455
455
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -510,7 +510,7 @@ end
510
510
  #
511
511
  # --------------------------------------------------------------------------------------------------------------------
512
512
  # <copyright company="Aspose Pty Ltd" file="delete_file_request.rb">
513
- # Copyright (c) 2003-2019 Aspose Pty Ltd
513
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
514
514
  # </copyright>
515
515
  # <summary>
516
516
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -563,7 +563,7 @@ end
563
563
  #
564
564
  # --------------------------------------------------------------------------------------------------------------------
565
565
  # <copyright company="Aspose Pty Ltd" file="download_file_request.rb">
566
- # Copyright (c) 2003-2019 Aspose Pty Ltd
566
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
567
567
  # </copyright>
568
568
  # <summary>
569
569
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -616,7 +616,7 @@ end
616
616
  #
617
617
  # --------------------------------------------------------------------------------------------------------------------
618
618
  # <copyright company="Aspose Pty Ltd" file="move_file_request.rb">
619
- # Copyright (c) 2003-2019 Aspose Pty Ltd
619
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
620
620
  # </copyright>
621
621
  # <summary>
622
622
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -677,7 +677,7 @@ end
677
677
  #
678
678
  # --------------------------------------------------------------------------------------------------------------------
679
679
  # <copyright company="Aspose Pty Ltd" file="upload_file_request.rb">
680
- # Copyright (c) 2003-2019 Aspose Pty Ltd
680
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
681
681
  # </copyright>
682
682
  # <summary>
683
683
  # Permission is hereby granted, free of charge, to any person obtaining a copy