aspose_html_cloud 19.5.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b985c4678fd31b9d1161ef1f330f7c946ede7b0730228022836ecd37b2d45539
4
+ data.tar.gz: 7dc2cb8fc31f81717273a70c9de37a166f4725c8d2b44487f1bf5f5682ff1238
5
+ SHA512:
6
+ metadata.gz: 8f6ff4c3161881a4bf64e456a50c461c3be3566e0dc827fbce6845605fdb69a1626c5de27ec3516bba3a86005a683d0b9dd02d89250789af2867604f3f6061b8
7
+ data.tar.gz: 40c5f49f269f187e485a51cd234afae71356b0b2632ced0aeb68eab597f2636b00211084a0b5c59660ad8054bc787d7c319a0d5138880fd7f4172411a9ef93f6
@@ -0,0 +1,63 @@
1
+ # -*- coding: utf-8 -*-
2
+ =begin
3
+ --------------------------------------------------------------------------------------------------------------------
4
+ <copyright company="Aspose" file="aspose_html_cloud.rb">
5
+ </copyright>
6
+ Copyright (c) 2019 Aspose.HTML for Cloud
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
+ =end
28
+
29
+ # Common files
30
+ require 'aspose_html_cloud/api_client'
31
+ require 'aspose_html_cloud/api_error'
32
+ require 'aspose_html_cloud/version'
33
+ require 'aspose_html_cloud/configuration'
34
+
35
+ # APIs HTML
36
+ require 'aspose_html_cloud/api/html_api'
37
+
38
+ # APIs Storage
39
+ require 'aspose_html_cloud/api/storage_api'
40
+
41
+ # Models Storage
42
+ require 'aspose_html_cloud/models/disc_usage'
43
+ require 'aspose_html_cloud/models/error'
44
+ require 'aspose_html_cloud/models/error_details'
45
+ require 'aspose_html_cloud/models/file_version'
46
+ require 'aspose_html_cloud/models/file_versions'
47
+ require 'aspose_html_cloud/models/files_list'
48
+ require 'aspose_html_cloud/models/files_upload_result'
49
+ require 'aspose_html_cloud/models/object_exist'
50
+ require 'aspose_html_cloud/models/storage_exist'
51
+ require 'aspose_html_cloud/models/storage_file'
52
+
53
+ module AsposeHtml
54
+ class << self
55
+ def configure(args)
56
+ if block_given?
57
+ yield(Configuration.default(args))
58
+ else
59
+ Configuration.default(args)
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,2478 @@
1
+ # -*- coding: utf-8 -*-
2
+ =begin
3
+ --------------------------------------------------------------------------------------------------------------------
4
+ <copyright company="Aspose" file="html_api.rb">
5
+ </copyright>
6
+ Copyright (c) 2019 Aspose.HTML for Cloud
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
+ =end
28
+
29
+ require "uri"
30
+
31
+
32
+ module AsposeHtml
33
+ class HtmlApi
34
+ attr_accessor :api_client
35
+
36
+ def initialize(args)
37
+ @api_client = AsposeHtml::ApiClient.default(args)
38
+ end
39
+
40
+
41
+ ################################################################################
42
+ # Conversion Api
43
+ ################################################################################
44
+
45
+
46
+ # Convert the HTML, EPUB, SVG document from the storage by its name to the specified image format.
47
+ #
48
+ # @param name Document name.
49
+ # @param out_format Resulting image format (jpeg, png, bmp, tiff, gif).
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [Integer] :width Resulting image width.
52
+ # @option opts [Integer] :height Resulting image height.
53
+ # @option opts [Integer] :left_margin Left resulting image margin.
54
+ # @option opts [Integer] :right_margin Right resulting image margin.
55
+ # @option opts [Integer] :top_margin Top resulting image margin.
56
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
57
+ # @option opts [Integer] :resolution Resolution of resulting image.
58
+ # @option opts [String] :folder The source document folder.
59
+ # @option opts [String] :storage The source document storage.
60
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
61
+ def get_convert_document_to_image(name, out_format, opts = {})
62
+ data, _status_code, _headers = get_convert_document_to_image_with_http_info(name, out_format, opts)
63
+ return {file: data, status: _status_code, headers: _headers}
64
+ end
65
+
66
+ # Convert the HTML, EPUB, SVG document from the storage by its name to the specified image format.
67
+ #
68
+ # @param name Document name.
69
+ # @param out_format Resulting image format(jpeg, png, bmp, tiff, gif).
70
+ # @param [Hash] opts the optional parameters
71
+ # @option opts [Integer] :width Resulting image width.
72
+ # @option opts [Integer] :height Resulting image height.
73
+ # @option opts [Integer] :left_margin Left resulting image margin.
74
+ # @option opts [Integer] :right_margin Right resulting image margin.
75
+ # @option opts [Integer] :top_margin Top resulting image margin.
76
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
77
+ # @option opts [Integer] :resolution Resolution of resulting image.
78
+ # @option opts [String] :folder The source document folder.
79
+ # @option opts [String] :storage The source document storage.
80
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
81
+ def get_convert_document_to_image_with_http_info(name, out_format, opts = {})
82
+ if @api_client.config.debug
83
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_image ..."
84
+ end
85
+ # verify the required parameter 'name' is set
86
+ if @api_client.config.client_side_validation && name.nil?
87
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_convert_document_to_image"
88
+ end
89
+ # verify the required parameter 'out_format' is set
90
+ if @api_client.config.client_side_validation && out_format.nil?
91
+ fail ArgumentError, "Missing the required parameter 'out_format' when calling HtmlApi.get_convert_document_to_image"
92
+ end
93
+ # resource path
94
+ local_var_path = "/html/{name}/convert/image/{outFormat}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'outFormat' + '}', out_format.to_s)
95
+
96
+ # query parameters
97
+ query_params = {}
98
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
99
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
100
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
101
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
102
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
103
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
104
+ query_params[:'resolution'] = opts[:'resolution'] if !opts[:'resolution'].nil?
105
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
106
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
107
+
108
+ # header parameters
109
+ header_params = {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
112
+ # HTTP header 'Content-Type'
113
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
114
+
115
+ # form parameters
116
+ form_params = {}
117
+
118
+ # http body (model)
119
+ post_body = nil
120
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :return_type => 'File')
126
+ if @api_client.config.debug
127
+ @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
128
+ end
129
+ return data, status_code, headers
130
+ end
131
+
132
+ # Convert the HTML page from the web by its URL to the specified image format.
133
+ #
134
+ # @param source_url Source page URL.
135
+ # @param out_format Resulting image format(jpeg, png, bmp, tiff, gif).
136
+ # @param [Hash] opts the optional parameters
137
+ # @option opts [Integer] :width Resulting image width.
138
+ # @option opts [Integer] :height Resulting image height.
139
+ # @option opts [Integer] :left_margin Left resulting image margin.
140
+ # @option opts [Integer] :right_margin Right resulting image margin.
141
+ # @option opts [Integer] :top_margin Top resulting image margin.
142
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
143
+ # @option opts [Integer] :resolution Resolution of resulting image.
144
+ # @option opts [String] :folder The document folder.
145
+ # @option opts [String] :storage The document storage.
146
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
147
+ def get_convert_document_to_image_by_url(source_url, out_format, opts = {})
148
+ data, _status_code, _headers = get_convert_document_to_image_by_url_with_http_info(source_url, out_format, opts)
149
+ return {file: data, status: _status_code, headers: _headers}
150
+ end
151
+
152
+ # Convert the HTML page from the web by its URL to the specified image format.
153
+ #
154
+ # @param source_url Source page URL.
155
+ # @param out_format Resulting image format(jpeg, png, bmp, tiff, gif).
156
+ # @param [Hash] opts the optional parameters
157
+ # @option opts [Integer] :width Resulting image width.
158
+ # @option opts [Integer] :height Resulting image height.
159
+ # @option opts [Integer] :left_margin Left resulting image margin.
160
+ # @option opts [Integer] :right_margin Right resulting image margin.
161
+ # @option opts [Integer] :top_margin Top resulting image margin.
162
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
163
+ # @option opts [Integer] :resolution Resolution of resulting image.
164
+ # @option opts [String] :folder The document folder.
165
+ # @option opts [String] :storage The document storage.
166
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
167
+ def get_convert_document_to_image_by_url_with_http_info(source_url, out_format, opts = {})
168
+ if @api_client.config.debug
169
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_image_by_url ..."
170
+ end
171
+ # verify the required parameter 'source_url' is set
172
+ if @api_client.config.client_side_validation && source_url.nil?
173
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_convert_document_to_image_by_url"
174
+ end
175
+ # verify the required parameter 'out_format' is set
176
+ if @api_client.config.client_side_validation && out_format.nil?
177
+ fail ArgumentError, "Missing the required parameter 'out_format' when calling HtmlApi.get_convert_document_to_image_by_url"
178
+ end
179
+ # resource path
180
+ local_var_path = "/html/convert/image/{outFormat}".sub('{' + 'outFormat' + '}', out_format.to_s)
181
+
182
+ # query parameters
183
+ query_params = {}
184
+ query_params[:'sourceUrl'] = source_url
185
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
186
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
187
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
188
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
189
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
190
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
191
+ query_params[:'resolution'] = opts[:'resolution'] if !opts[:'resolution'].nil?
192
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
193
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
194
+
195
+ # header parameters
196
+ header_params = {}
197
+ # HTTP header 'Accept' (if needed)
198
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
199
+ # HTTP header 'Content-Type'
200
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
201
+
202
+ # form parameters
203
+ form_params = {}
204
+
205
+ # http body (model)
206
+ post_body = nil
207
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
208
+ :header_params => header_params,
209
+ :query_params => query_params,
210
+ :form_params => form_params,
211
+ :body => post_body,
212
+ :return_type => 'File')
213
+ if @api_client.config.debug
214
+ @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_image_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
215
+ end
216
+ return data, status_code, headers
217
+ end
218
+
219
+ # Convert the HTML, EPUB, SVG document from the storage by its name to PDF.
220
+ #
221
+ # @param name Document name.
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [Integer] :width Resulting image width.
224
+ # @option opts [Integer] :height Resulting image height.
225
+ # @option opts [Integer] :left_margin Left resulting image margin.
226
+ # @option opts [Integer] :right_margin Right resulting image margin.
227
+ # @option opts [Integer] :top_margin Top resulting image margin.
228
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
229
+ # @option opts [String] :folder The document folder.
230
+ # @option opts [String] :storage The document storage.
231
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
232
+ def get_convert_document_to_pdf(name, opts = {})
233
+ data, _status_code, _headers = get_convert_document_to_pdf_with_http_info(name, opts)
234
+ return {file: data, status: _status_code, headers: _headers}
235
+ end
236
+
237
+ # Convert the HTML, EPUB, SVG document from the storage by its name to PDF.
238
+ #
239
+ # @param name Document name.
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [Integer] :width Resulting image width.
242
+ # @option opts [Integer] :height Resulting image height.
243
+ # @option opts [Integer] :left_margin Left resulting image margin.
244
+ # @option opts [Integer] :right_margin Right resulting image margin.
245
+ # @option opts [Integer] :top_margin Top resulting image margin.
246
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
247
+ # @option opts [String] :folder The document folder.
248
+ # @option opts [String] :storage The document storage.
249
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
250
+ def get_convert_document_to_pdf_with_http_info(name, opts = {})
251
+ if @api_client.config.debug
252
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_pdf ..."
253
+ end
254
+ # verify the required parameter 'name' is set
255
+ if @api_client.config.client_side_validation && name.nil?
256
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_convert_document_to_pdf"
257
+ end
258
+ # resource path
259
+ local_var_path = "/html/{name}/convert/pdf".sub('{' + 'name' + '}', name.to_s)
260
+
261
+ # query parameters
262
+ query_params = {}
263
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
264
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
265
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
266
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
267
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
268
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
269
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
270
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
271
+
272
+ # header parameters
273
+ header_params = {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
276
+ # HTTP header 'Content-Type'
277
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
278
+
279
+ # form parameters
280
+ form_params = {}
281
+
282
+ # http body (model)
283
+ post_body = nil
284
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
285
+ :header_params => header_params,
286
+ :query_params => query_params,
287
+ :form_params => form_params,
288
+ :body => post_body,
289
+ :return_type => 'File')
290
+ if @api_client.config.debug
291
+ @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
292
+ end
293
+ return data, status_code, headers
294
+ end
295
+
296
+ # Convert the HTML page from the web by its URL to PDF.
297
+ #
298
+ # @param source_url Source page URL.
299
+ # @param [Hash] opts the optional parameters
300
+ # @option opts [Integer] :width Resulting image width.
301
+ # @option opts [Integer] :height Resulting image height.
302
+ # @option opts [Integer] :left_margin Left resulting image margin.
303
+ # @option opts [Integer] :right_margin Right resulting image margin.
304
+ # @option opts [Integer] :top_margin Top resulting image margin.
305
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
306
+ # @option opts [String] :folder The document folder.
307
+ # @option opts [String] :storage The document storage.
308
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
309
+ def get_convert_document_to_pdf_by_url(source_url, opts = {})
310
+ data, _status_code, _headers = get_convert_document_to_pdf_by_url_with_http_info(source_url, opts)
311
+ return {file: data, status: _status_code, headers: _headers}
312
+ end
313
+
314
+ # Convert the HTML page from the web by its URL to PDF.
315
+ #
316
+ # @param source_url Source page URL.
317
+ # @param [Hash] opts the optional parameters
318
+ # @option opts [Integer] :width Resulting image width.
319
+ # @option opts [Integer] :height Resulting image height.
320
+ # @option opts [Integer] :left_margin Left resulting image margin.
321
+ # @option opts [Integer] :right_margin Right resulting image margin.
322
+ # @option opts [Integer] :top_margin Top resulting image margin.
323
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
324
+ # @option opts [String] :folder The document folder.
325
+ # @option opts [String] :storage The document storage.
326
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
327
+ def get_convert_document_to_pdf_by_url_with_http_info(source_url, opts = {})
328
+ if @api_client.config.debug
329
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_pdf_by_url ..."
330
+ end
331
+ # verify the required parameter 'source_url' is set
332
+ if @api_client.config.client_side_validation && source_url.nil?
333
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_convert_document_to_pdf_by_url"
334
+ end
335
+ # resource path
336
+ local_var_path = "/html/convert/pdf"
337
+
338
+ # query parameters
339
+ query_params = {}
340
+ query_params[:'sourceUrl'] = source_url
341
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
342
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
343
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
344
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
345
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
346
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
347
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
348
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
349
+
350
+ # header parameters
351
+ header_params = {}
352
+ # HTTP header 'Accept' (if needed)
353
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
354
+ # HTTP header 'Content-Type'
355
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
356
+
357
+ # form parameters
358
+ form_params = {}
359
+
360
+ # http body (model)
361
+ post_body = nil
362
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
363
+ :header_params => header_params,
364
+ :query_params => query_params,
365
+ :form_params => form_params,
366
+ :body => post_body,
367
+ :return_type => 'File')
368
+ if @api_client.config.debug
369
+ @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_pdf_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ end
371
+ return data, status_code, headers
372
+ end
373
+
374
+ # Convert the HTML, EPUB, SVG document from the storage by its name to XPS.
375
+ #
376
+ # @param name Document name.
377
+ # @param [Hash] opts the optional parameters
378
+ # @option opts [Integer] :width Resulting image width.
379
+ # @option opts [Integer] :height Resulting image height.
380
+ # @option opts [Integer] :left_margin Left resulting image margin.
381
+ # @option opts [Integer] :right_margin Right resulting image margin.
382
+ # @option opts [Integer] :top_margin Top resulting image margin.
383
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
384
+ # @option opts [String] :folder The document folder.
385
+ # @option opts [String] :storage The document storage.
386
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
387
+ def get_convert_document_to_xps(name, opts = {})
388
+ data, _status_code, _headers = get_convert_document_to_xps_with_http_info(name, opts)
389
+ return {file: data, status: _status_code, headers: _headers}
390
+ end
391
+
392
+ # Convert the HTML, EPUB, SVG document from the storage by its name to XPS.
393
+ #
394
+ # @param name Document name.
395
+ # @param [Hash] opts the optional parameters
396
+ # @option opts [Integer] :width Resulting image width.
397
+ # @option opts [Integer] :height Resulting image height.
398
+ # @option opts [Integer] :left_margin Left resulting image margin.
399
+ # @option opts [Integer] :right_margin Right resulting image margin.
400
+ # @option opts [Integer] :top_margin Top resulting image margin.
401
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
402
+ # @option opts [String] :folder The document folder.
403
+ # @option opts [String] :storage The document storage.
404
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
405
+ def get_convert_document_to_xps_with_http_info(name, opts = {})
406
+ if @api_client.config.debug
407
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_xps ..."
408
+ end
409
+ # verify the required parameter 'name' is set
410
+ if @api_client.config.client_side_validation && name.nil?
411
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_convert_document_to_xps"
412
+ end
413
+ # resource path
414
+ local_var_path = "/html/{name}/convert/xps".sub('{' + 'name' + '}', name.to_s)
415
+
416
+ # query parameters
417
+ query_params = {}
418
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
419
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
420
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
421
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
422
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
423
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
424
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
425
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
426
+
427
+ # header parameters
428
+ header_params = {}
429
+ # HTTP header 'Accept' (if needed)
430
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
431
+ # HTTP header 'Content-Type'
432
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
433
+
434
+ # form parameters
435
+ form_params = {}
436
+
437
+ # http body (model)
438
+ post_body = nil
439
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
440
+ :header_params => header_params,
441
+ :query_params => query_params,
442
+ :form_params => form_params,
443
+ :body => post_body,
444
+ :return_type => 'File')
445
+ if @api_client.config.debug
446
+ @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
447
+ end
448
+ return data, status_code, headers
449
+ end
450
+
451
+ # Convert the HTML page from the web by its URL to XPS.
452
+ #
453
+ # @param source_url Source page URL.
454
+ # @param [Hash] opts the optional parameters
455
+ # @option opts [Integer] :width Resulting image width.
456
+ # @option opts [Integer] :height Resulting image height.
457
+ # @option opts [Integer] :left_margin Left resulting image margin.
458
+ # @option opts [Integer] :right_margin Right resulting image margin.
459
+ # @option opts [Integer] :top_margin Top resulting image margin.
460
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
461
+ # @option opts [String] :folder The document folder.
462
+ # @option opts [String] :storage The document storage.
463
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
464
+ def get_convert_document_to_xps_by_url(source_url, opts = {})
465
+ data, _status_code, _headers = get_convert_document_to_xps_by_url_with_http_info(source_url, opts)
466
+ return {file: data, status: _status_code, headers: _headers}
467
+ end
468
+
469
+ # Convert the HTML page from the web by its URL to XPS.
470
+ #
471
+ # @param source_url Source page URL.
472
+ # @param [Hash] opts the optional parameters
473
+ # @option opts [Integer] :width Resulting image width.
474
+ # @option opts [Integer] :height Resulting image height.
475
+ # @option opts [Integer] :left_margin Left resulting image margin.
476
+ # @option opts [Integer] :right_margin Right resulting image margin.
477
+ # @option opts [Integer] :top_margin Top resulting image margin.
478
+ # @option opts [Integer] :bottom_margin Bottom resulting image margin.
479
+ # @option opts [String] :folder The document folder.
480
+ # @option opts [String] :storage The document storage.
481
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
482
+ def get_convert_document_to_xps_by_url_with_http_info(source_url, opts = {})
483
+ if @api_client.config.debug
484
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_xps_by_url ..."
485
+ end
486
+ # verify the required parameter 'source_url' is set
487
+ if @api_client.config.client_side_validation && source_url.nil?
488
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_convert_document_to_xps_by_url"
489
+ end
490
+ # resource path
491
+ local_var_path = "/html/convert/xps"
492
+
493
+ # query parameters
494
+ query_params = {}
495
+ query_params[:'sourceUrl'] = source_url
496
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
497
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
498
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
499
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
500
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
501
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
502
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
503
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
504
+
505
+ # header parameters
506
+ header_params = {}
507
+ # HTTP header 'Accept' (if needed)
508
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
509
+ # HTTP header 'Content-Type'
510
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
511
+
512
+ # form parameters
513
+ form_params = {}
514
+
515
+ # http body (model)
516
+ post_body = nil
517
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
518
+ :header_params => header_params,
519
+ :query_params => query_params,
520
+ :form_params => form_params,
521
+ :body => post_body,
522
+ :return_type => 'File')
523
+ if @api_client.config.debug
524
+ @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_xps_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
525
+ end
526
+ return data, status_code, headers
527
+ end
528
+
529
+
530
+ # Converts the HTML, EPUB, SVG document (in request content) to the specified image format and uploads resulting file to storage.
531
+ #
532
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.jpg)
533
+ # @param out_format (jpeg, png, bmp, tiff, gif)
534
+ # @param file A file to be converted.
535
+ # @param [Hash] opts the optional parameters
536
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
537
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
538
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
539
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
540
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
541
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
542
+ # @option opts [Integer] :resolution Resolution of resulting image. Default is 96 dpi.
543
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
544
+ def post_convert_document_in_request_to_image(out_path, out_format, file, opts = {})
545
+ data, _status_code, _headers = post_convert_document_in_request_to_image_with_http_info(out_path, out_format, file, opts)
546
+ return {file: data, status: _status_code, headers: _headers}
547
+ end
548
+
549
+ # Converts the HTML, EPUB, SVG document (in request content) to the specified image format and uploads resulting file to storage.
550
+ #
551
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.jpg)
552
+ # @param out_format (jpeg, png, bmp, tiff, gif)
553
+ # @param file A file to be converted.
554
+ # @param [Hash] opts the optional parameters
555
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
556
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
557
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
558
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
559
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
560
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
561
+ # @option opts [Integer] :resolution Resolution of resulting image. Default is 96 dpi.
562
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
563
+ def post_convert_document_in_request_to_image_with_http_info(out_path, out_format, file, opts = {})
564
+ if @api_client.config.debug
565
+ @api_client.config.logger.debug "Calling API: ConversionApi.post_convert_document_in_request_to_image ..."
566
+ end
567
+ # verify the required parameter 'out_path' is set
568
+ if @api_client.config.client_side_validation && out_path.nil?
569
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.post_convert_document_in_request_to_image"
570
+ end
571
+ # verify the required parameter 'out_format' is set
572
+ if @api_client.config.client_side_validation && out_format.nil?
573
+ fail ArgumentError, "Missing the required parameter 'out_format' when calling ConversionApi.post_convert_document_in_request_to_image"
574
+ end
575
+ # verify the required parameter 'file' is set
576
+ if @api_client.config.client_side_validation && file.nil?
577
+ fail ArgumentError, "Missing the required parameter 'file' when calling ConversionApi.post_convert_document_in_request_to_image"
578
+ end
579
+ # resource path
580
+ local_var_path = "/html/convert/image/{outFormat}".sub('{' + 'outFormat' + '}', out_format.to_s)
581
+
582
+ # query parameters
583
+ query_params = {}
584
+ query_params[:'outPath'] = out_path
585
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
586
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
587
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
588
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
589
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
590
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
591
+ query_params[:'resolution'] = opts[:'resolution'] if !opts[:'resolution'].nil?
592
+
593
+ # header parameters
594
+ header_params = {}
595
+ # HTTP header 'Accept' (if needed)
596
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
597
+ # HTTP header 'Content-Type'
598
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
599
+
600
+ # form parameters
601
+ form_params = {
602
+ file: File::open(file,'rb')
603
+ }
604
+ post_body = nil
605
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
606
+ :header_params => header_params,
607
+ :query_params => query_params,
608
+ :form_params => form_params,
609
+ :body => post_body,
610
+ :return_type => 'File')
611
+ if @api_client.config.debug
612
+ @api_client.config.logger.debug "API called: ConversionApi#post_convert_document_in_request_to_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
613
+ end
614
+ return data, status_code, headers
615
+ end
616
+
617
+ # Converts the HTML, EPUB, SVG document (in request content) to PDF and uploads resulting file to storage.
618
+ #
619
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf)
620
+ # @param file A file to be converted.
621
+ # @param [Hash] opts the optional parameters
622
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
623
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
624
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
625
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
626
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
627
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
628
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
629
+ def post_convert_document_in_request_to_pdf(out_path, file, opts = {})
630
+ data, _status_code, _headers = post_convert_document_in_request_to_pdf_with_http_info(out_path, file, opts)
631
+ return {file: data, status: _status_code, headers: _headers}
632
+ end
633
+
634
+ # Converts the HTML, EPUB, SVG document (in request content) to PDF and uploads resulting file to storage.
635
+ #
636
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf)
637
+ # @param file A file to be converted.
638
+ # @param [Hash] opts the optional parameters
639
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
640
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
641
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
642
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
643
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
644
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
645
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
646
+ def post_convert_document_in_request_to_pdf_with_http_info(out_path, file, opts = {})
647
+ if @api_client.config.debug
648
+ @api_client.config.logger.debug "Calling API: ConversionApi.post_convert_document_in_request_to_pdf ..."
649
+ end
650
+ # verify the required parameter 'out_path' is set
651
+ if @api_client.config.client_side_validation && out_path.nil?
652
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.post_convert_document_in_request_to_pdf"
653
+ end
654
+ # verify the required parameter 'file' is set
655
+ if @api_client.config.client_side_validation && file.nil?
656
+ fail ArgumentError, "Missing the required parameter 'file' when calling ConversionApi.post_convert_document_in_request_to_pdf"
657
+ end
658
+ # resource path
659
+ local_var_path = "/html/convert/pdf"
660
+
661
+ # query parameters
662
+ query_params = {}
663
+ query_params[:'outPath'] = out_path
664
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
665
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
666
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
667
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
668
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
669
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
670
+
671
+ # header parameters
672
+ header_params = {}
673
+ # HTTP header 'Accept' (if needed)
674
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
675
+ # HTTP header 'Content-Type'
676
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
677
+
678
+ # form parameters
679
+ form_params = {
680
+ file: File::open(file,'rb')
681
+ }
682
+
683
+ # http body (model)
684
+ post_body = nil
685
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
686
+ :header_params => header_params,
687
+ :query_params => query_params,
688
+ :form_params => form_params,
689
+ :body => post_body,
690
+ :return_type => 'File')
691
+ if @api_client.config.debug
692
+ @api_client.config.logger.debug "API called: ConversionApi#post_convert_document_in_request_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
693
+ end
694
+ return data, status_code, headers
695
+ end
696
+
697
+ # Converts the HTML, EPUB, SVG document (in request content) to XPS and uploads resulting file to storage.
698
+ #
699
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.xps)
700
+ # @param file A file to be converted.
701
+ # @param [Hash] opts the optional parameters
702
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
703
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
704
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
705
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
706
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
707
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
708
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
709
+ def post_convert_document_in_request_to_xps(out_path, file, opts = {})
710
+ data, _status_code, _headers = post_convert_document_in_request_to_xps_with_http_info(out_path, file, opts)
711
+ return {file: data, status: _status_code, headers: _headers}
712
+ end
713
+
714
+ # Converts the HTML, EPUB, SVG document (in request content) to XPS and uploads resulting file to storage.
715
+ #
716
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.xps)
717
+ # @param file A file to be converted.
718
+ # @param [Hash] opts the optional parameters
719
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
720
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
721
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
722
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
723
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
724
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
725
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
726
+ def post_convert_document_in_request_to_xps_with_http_info(out_path, file, opts = {})
727
+ if @api_client.config.debug
728
+ @api_client.config.logger.debug "Calling API: ConversionApi.post_convert_document_in_request_to_xps ..."
729
+ end
730
+ # verify the required parameter 'out_path' is set
731
+ if @api_client.config.client_side_validation && out_path.nil?
732
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.post_convert_document_in_request_to_xps"
733
+ end
734
+ # verify the required parameter 'file' is set
735
+ if @api_client.config.client_side_validation && file.nil?
736
+ fail ArgumentError, "Missing the required parameter 'file' when calling ConversionApi.post_convert_document_in_request_to_xps"
737
+ end
738
+ # resource path
739
+ local_var_path = "/html/convert/xps"
740
+
741
+ # query parameters
742
+ query_params = {}
743
+ query_params[:'outPath'] = out_path
744
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
745
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
746
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
747
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
748
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
749
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
750
+
751
+ # header parameters
752
+ header_params = {}
753
+ # HTTP header 'Accept' (if needed)
754
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
755
+ # HTTP header 'Content-Type'
756
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
757
+
758
+ # form parameters
759
+ form_params = {
760
+ file: File::open(file,'rb')
761
+ }
762
+
763
+ # http body (model)
764
+ post_body = nil
765
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
766
+ :header_params => header_params,
767
+ :query_params => query_params,
768
+ :form_params => form_params,
769
+ :body => post_body,
770
+ :return_type => 'File')
771
+ if @api_client.config.debug
772
+ @api_client.config.logger.debug "API called: ConversionApi#post_convert_document_in_request_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
773
+ end
774
+ return data, status_code, headers
775
+ end
776
+
777
+ # Converts the HTML, EPUB, SVG document (located on storage) to the specified image format and uploads resulting file to storage.
778
+ #
779
+ # @param name Document name.
780
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.jpg)
781
+ # @param out_format(jpeg, png, bmp, tiff, gif)
782
+ # @param [Hash] opts the optional parameters
783
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
784
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
785
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
786
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
787
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
788
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
789
+ # @option opts [Integer] :resolution Resolution of resulting image. Default is 96 dpi.
790
+ # @option opts [String] :folder The source document folder.
791
+ # @option opts [String] :storage The source and resulting document storage.
792
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
793
+ def put_convert_document_to_image(name, out_path, out_format, opts = {})
794
+ data, _status_code, _headers = put_convert_document_to_image_with_http_info(name, out_path, out_format, opts)
795
+ return {file: data, status: _status_code, headers: _headers}
796
+ end
797
+
798
+ # Converts the HTML, EPUB, SVG document (located on storage) to the specified image format and uploads resulting file to storage.
799
+ #
800
+ # @param name Document name.
801
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.jpg)
802
+ # @param out_format(jpeg, png, bmp, tiff, gif)
803
+ # @param [Hash] opts the optional parameters
804
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
805
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
806
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
807
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
808
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
809
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
810
+ # @option opts [Integer] :resolution Resolution of resulting image. Default is 96 dpi.
811
+ # @option opts [String] :folder The source document folder.
812
+ # @option opts [String] :storage The source and resulting document storage.
813
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
814
+ def put_convert_document_to_image_with_http_info(name, out_path, out_format, opts = {})
815
+ if @api_client.config.debug
816
+ @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_to_image ..."
817
+ end
818
+ # verify the required parameter 'name' is set
819
+ if @api_client.config.client_side_validation && name.nil?
820
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConversionApi.put_convert_document_to_image"
821
+ end
822
+ # verify the required parameter 'out_path' is set
823
+ if @api_client.config.client_side_validation && out_path.nil?
824
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_to_image"
825
+ end
826
+ # verify the required parameter 'out_format' is set
827
+ if @api_client.config.client_side_validation && out_format.nil?
828
+ fail ArgumentError, "Missing the required parameter 'out_format' when calling ConversionApi.put_convert_document_to_image"
829
+ end
830
+ # resource path
831
+ local_var_path = "/html/{name}/convert/image/{outFormat}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'outFormat' + '}', out_format.to_s)
832
+
833
+ # query parameters
834
+ query_params = {}
835
+ query_params[:'outPath'] = out_path
836
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
837
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
838
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
839
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
840
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
841
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
842
+ query_params[:'resolution'] = opts[:'resolution'] if !opts[:'resolution'].nil?
843
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
844
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
845
+
846
+ # header parameters
847
+ header_params = {}
848
+ # HTTP header 'Accept' (if needed)
849
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
850
+ # HTTP header 'Content-Type'
851
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
852
+
853
+ # form parameters
854
+ form_params = {}
855
+
856
+ # http body (model)
857
+ post_body = nil
858
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
859
+ :header_params => header_params,
860
+ :query_params => query_params,
861
+ :form_params => form_params,
862
+ :body => post_body,
863
+ :return_type => 'File')
864
+ if @api_client.config.debug
865
+ @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_to_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
866
+ end
867
+ return data, status_code, headers
868
+ end
869
+
870
+ # Converts the HTML, EPUB, SVG document (located on storage) to PDF and uploads resulting file to storage.
871
+ #
872
+ # @param name Document name.
873
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf)
874
+ # @param [Hash] opts the optional parameters
875
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
876
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
877
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
878
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
879
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
880
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
881
+ # @option opts [String] :folder The source document folder.
882
+ # @option opts [String] :storage The source and resulting document storage.
883
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
884
+ def put_convert_document_to_pdf(name, out_path, opts = {})
885
+ data, _status_code, _headers = put_convert_document_to_pdf_with_http_info(name, out_path, opts)
886
+ return {file: data, status: _status_code, headers: _headers}
887
+ end
888
+
889
+ # Converts the HTML, EPUB, SVG document (located on storage) to PDF and uploads resulting file to storage.
890
+ #
891
+ # @param name Document name.
892
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf)
893
+ # @param [Hash] opts the optional parameters
894
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
895
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
896
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
897
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
898
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
899
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
900
+ # @option opts [String] :folder The source document folder.
901
+ # @option opts [String] :storage The source and resulting document storage.
902
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
903
+ def put_convert_document_to_pdf_with_http_info(name, out_path, opts = {})
904
+ if @api_client.config.debug
905
+ @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_to_pdf ..."
906
+ end
907
+ # verify the required parameter 'name' is set
908
+ if @api_client.config.client_side_validation && name.nil?
909
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConversionApi.put_convert_document_to_pdf"
910
+ end
911
+ # verify the required parameter 'out_path' is set
912
+ if @api_client.config.client_side_validation && out_path.nil?
913
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_to_pdf"
914
+ end
915
+ # resource path
916
+ local_var_path = "/html/{name}/convert/pdf".sub('{' + 'name' + '}', name.to_s)
917
+
918
+ # query parameters
919
+ query_params = {}
920
+ query_params[:'outPath'] = out_path
921
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
922
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
923
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
924
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
925
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
926
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
927
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
928
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
929
+
930
+ # header parameters
931
+ header_params = {}
932
+ # HTTP header 'Accept' (if needed)
933
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
934
+ # HTTP header 'Content-Type'
935
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
936
+
937
+ # form parameters
938
+ form_params = {}
939
+
940
+ # http body (model)
941
+ post_body = nil
942
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
943
+ :header_params => header_params,
944
+ :query_params => query_params,
945
+ :form_params => form_params,
946
+ :body => post_body,
947
+ :return_type => 'File')
948
+ if @api_client.config.debug
949
+ @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
950
+ end
951
+ return data, status_code, headers
952
+ end
953
+
954
+ # Converts the HTML, EPUB, SVG document (located on storage) to XPS and uploads resulting file to storage.
955
+ #
956
+ # @param name Document name.
957
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.xps)
958
+ # @param [Hash] opts the optional parameters
959
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
960
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
961
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
962
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
963
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
964
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
965
+ # @option opts [String] :folder The source document folder.
966
+ # @option opts [String] :storage The source and resulting document storage.
967
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
968
+ def put_convert_document_to_xps(name, out_path, opts = {})
969
+ data, _status_code, _headers = put_convert_document_to_xps_with_http_info(name, out_path, opts)
970
+ return {file: data, status: _status_code, headers: _headers}
971
+ end
972
+
973
+ # Converts the HTML, EPUB, SVG document (located on storage) to XPS and uploads resulting file to storage.
974
+ #
975
+ # @param name Document name.
976
+ # @param out_path Full resulting filename (ex. /folder1/folder2/result.xps)
977
+ # @param [Hash] opts the optional parameters
978
+ # @option opts [Integer] :width Resulting document page width in points (1/96 inch).
979
+ # @option opts [Integer] :height Resulting document page height in points (1/96 inch).
980
+ # @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch).
981
+ # @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch).
982
+ # @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch).
983
+ # @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch).
984
+ # @option opts [String] :folder The source document folder.
985
+ # @option opts [String] :storage The source and resulting document storage.
986
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
987
+ def put_convert_document_to_xps_with_http_info(name, out_path, opts = {})
988
+ if @api_client.config.debug
989
+ @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_to_xps ..."
990
+ end
991
+ # verify the required parameter 'name' is set
992
+ if @api_client.config.client_side_validation && name.nil?
993
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConversionApi.put_convert_document_to_xps"
994
+ end
995
+ # verify the required parameter 'out_path' is set
996
+ if @api_client.config.client_side_validation && out_path.nil?
997
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_to_xps"
998
+ end
999
+ # resource path
1000
+ local_var_path = "/html/{name}/convert/xps".sub('{' + 'name' + '}', name.to_s)
1001
+
1002
+ # query parameters
1003
+ query_params = {}
1004
+ query_params[:'outPath'] = out_path
1005
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
1006
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
1007
+ query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
1008
+ query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
1009
+ query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
1010
+ query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
1011
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1012
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1013
+
1014
+ # header parameters
1015
+ header_params = {}
1016
+ # HTTP header 'Accept' (if needed)
1017
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1018
+ # HTTP header 'Content-Type'
1019
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1020
+
1021
+ # form parameters
1022
+ form_params = {}
1023
+
1024
+ # http body (model)
1025
+ post_body = nil
1026
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1027
+ :header_params => header_params,
1028
+ :query_params => query_params,
1029
+ :form_params => form_params,
1030
+ :body => post_body,
1031
+ :return_type => 'File')
1032
+ if @api_client.config.debug
1033
+ @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1034
+ end
1035
+ return data, status_code, headers
1036
+ end
1037
+
1038
+ # Converts the HTML page from Web by its URL to MHTML returns resulting file in response content.
1039
+ # @param source_url Source page URL.
1040
+ # @param [Hash] opts the optional parameters
1041
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1042
+ def get_convert_document_to_mhtml_by_url(source_url, opts = {})
1043
+ data, _status_code, _headers = get_convert_document_to_mhtml_by_url_with_http_info(source_url, opts)
1044
+ return {file: data, status: _status_code, headers: _headers}
1045
+ end
1046
+
1047
+ # Converts the HTML page from Web by its URL to MHTML returns resulting file in response content.
1048
+ # @param source_url Source page URL.
1049
+ # @param [Hash] opts the optional parameters
1050
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1051
+ def get_convert_document_to_mhtml_by_url_with_http_info(source_url, opts = {})
1052
+ if @api_client.config.debug
1053
+ @api_client.config.logger.debug 'Calling API: HtmlApi.get_convert_document_to_mhtml_by_url ...'
1054
+ end
1055
+ # verify the required parameter 'source_url' is set
1056
+ if @api_client.config.client_side_validation && source_url.nil?
1057
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_convert_document_to_mhtml_by_url"
1058
+ end
1059
+ # resource path
1060
+ local_var_path = '/html/convert/mhtml'
1061
+
1062
+ # query parameters
1063
+ query_params = {}
1064
+ query_params[:'sourceUrl'] = source_url
1065
+
1066
+ # header parameters
1067
+ header_params = {}
1068
+ # HTTP header 'Accept' (if needed)
1069
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
1070
+ # HTTP header 'Content-Type'
1071
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1072
+
1073
+ # form parameters
1074
+ form_params = {}
1075
+
1076
+ # http body (model)
1077
+ post_body = nil
1078
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1079
+ :header_params => header_params,
1080
+ :query_params => query_params,
1081
+ :form_params => form_params,
1082
+ :body => post_body,
1083
+ :return_type => 'File')
1084
+ if @api_client.config.debug
1085
+ @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_mhtml_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1086
+ end
1087
+ return data, status_code, headers
1088
+ end
1089
+
1090
+ # Converts the HTML document (located on storage) to Markdown and returns resulting file in response content.
1091
+ # @param name Document name.
1092
+ # @param [Hash] opts the optional parameters
1093
+ # @option opts [String] :use_git Use Git Markdown flavor to save ("true" or "false"). (default to "false")
1094
+ # @option opts [String] :folder Source document folder.
1095
+ # @option opts [String] :storage Source document storage.
1096
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1097
+ def get_convert_document_to_markdown(name, opts = {})
1098
+ data, _status_code, _headers = get_convert_document_to_markdown_with_http_info(name, opts)
1099
+ return {file: data, status: _status_code, headers: _headers}
1100
+ end
1101
+
1102
+ # Converts the HTML document (located on storage) to Markdown and returns resulting file in response content.
1103
+ # @param name Document name.
1104
+ # @param [Hash] opts the optional parameters
1105
+ # @option opts [String] :use_git Use Git Markdown flavor to save ("true" or "false"). (default to "false")
1106
+ # @option opts [String] :folder Source document folder.
1107
+ # @option opts [String] :storage Source document storage.
1108
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1109
+ def get_convert_document_to_markdown_with_http_info(name, opts = {})
1110
+ if @api_client.config.debug
1111
+ @api_client.config.logger.debug 'Calling API: ConversionApi.get_convert_document_to_markdown ...'
1112
+ end
1113
+ # verify the required parameter 'name' is set
1114
+ if @api_client.config.client_side_validation && name.nil?
1115
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConversionApi.get_convert_document_to_markdown"
1116
+ end
1117
+ # resource path
1118
+ local_var_path = '/html/{name}/convert/md'.sub('{' + 'name' + '}', name.to_s)
1119
+
1120
+ # query parameters
1121
+ query_params = {}
1122
+ query_params[:'useGit'] = opts[:'use_git'] if !opts[:'use_git'].nil?
1123
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1124
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1125
+
1126
+ # header parameters
1127
+ header_params = {}
1128
+ # HTTP header 'Accept' (if needed)
1129
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
1130
+ # HTTP header 'Content-Type'
1131
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1132
+
1133
+ # form parameters
1134
+ form_params = {}
1135
+
1136
+ # http body (model)
1137
+ post_body = nil
1138
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1139
+ :header_params => header_params,
1140
+ :query_params => query_params,
1141
+ :form_params => form_params,
1142
+ :body => post_body,
1143
+ :return_type => 'File')
1144
+ if @api_client.config.debug
1145
+ @api_client.config.logger.debug "API called: ConversionApi#get_convert_document_to_markdown\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1146
+ end
1147
+ return data, status_code, headers
1148
+ end
1149
+
1150
+ # Converts the HTML document (in request content) to Markdown and uploads resulting file to storage by specified path.
1151
+ # @param out_path Full resulting file path in the storage (ex. /folder1/folder2/result.md)
1152
+ # @param file A file to be converted.
1153
+ # @param [Hash] opts the optional parameters
1154
+ # @option opts [String] :use_git Use Git Markdown flavor to save ("true" or "false"). (default to "false")
1155
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1156
+ def post_convert_document_in_request_to_markdown(out_path, file, opts = {})
1157
+ data, _status_code, _headers = post_convert_document_in_request_to_markdown_with_http_info(out_path, file, opts)
1158
+ return {file: data, status: _status_code, headers: _headers}
1159
+ end
1160
+
1161
+ # Converts the HTML document (in request content) to Markdown and uploads resulting file to storage by specified path.
1162
+ # @param out_path Full resulting file path in the storage (ex. /folder1/folder2/result.md)
1163
+ # @param file A file to be converted.
1164
+ # @param [Hash] opts the optional parameters
1165
+ # @option opts [String] :use_git Use Git Markdown flavor to save ("true" or "false"). (default to "false")
1166
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1167
+ def post_convert_document_in_request_to_markdown_with_http_info(out_path, file, opts = {})
1168
+ if @api_client.config.debug
1169
+ @api_client.config.logger.debug 'Calling API: ConversionApi.post_convert_document_in_request_to_markdown ...'
1170
+ end
1171
+ # verify the required parameter 'out_path' is set
1172
+ if @api_client.config.client_side_validation && out_path.nil?
1173
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.post_convert_document_in_request_to_markdown"
1174
+ end
1175
+ # verify the required parameter 'file' is set
1176
+ if @api_client.config.client_side_validation && file.nil?
1177
+ fail ArgumentError, "Missing the required parameter 'file' when calling ConversionApi.post_convert_document_in_request_to_markdown"
1178
+ end
1179
+ # resource path
1180
+ local_var_path = '/html/convert/md'
1181
+
1182
+ # query parameters
1183
+ query_params = {}
1184
+ query_params[:'outPath'] = out_path
1185
+ query_params[:'useGit'] = opts[:'use_git'] if !opts[:'use_git'].nil?
1186
+
1187
+ # header parameters
1188
+ header_params = {}
1189
+ # HTTP header 'Accept' (if needed)
1190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1191
+ # HTTP header 'Content-Type'
1192
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1193
+
1194
+ # form parameters
1195
+ form_params = {
1196
+ file: File::open(file,'rb')
1197
+ }
1198
+
1199
+ # http body (model)
1200
+ post_body = nil
1201
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1202
+ :header_params => header_params,
1203
+ :query_params => query_params,
1204
+ :form_params => form_params,
1205
+ :body => post_body,
1206
+ :return_type => 'File')
1207
+ if @api_client.config.debug
1208
+ @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_in_request_to_markdown\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1209
+ end
1210
+ return data, status_code, headers
1211
+ end
1212
+
1213
+ # Converts the HTML document (located on storage) to Markdown and uploads resulting file to storage by specified path.
1214
+ # @param name Document name.
1215
+ # @param out_path Full resulting file path in the storage (ex. /folder1/folder2/result.md)
1216
+ # @param [Hash] opts the optional parameters
1217
+ # @option opts [String] :use_git Use Git Markdown flavor to save ("true" or "false"). (default to "false")
1218
+ # @option opts [String] :folder The source document folder.
1219
+ # @option opts [String] :storage The source and resulting document storage.
1220
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1221
+ def put_convert_document_to_markdown(name, out_path, opts = {})
1222
+ data, _status_code, _headers = put_convert_document_to_markdown_with_http_info(name, out_path, opts)
1223
+ return {file: data, status: _status_code, headers: _headers}
1224
+ end
1225
+
1226
+ # Converts the HTML document (located on storage) to Markdown and uploads resulting file to storage by specified path.
1227
+ # @param name Document name.
1228
+ # @param out_path Full resulting file path in the storage (ex. /folder1/folder2/result.md)
1229
+ # @param [Hash] opts the optional parameters
1230
+ # @option opts [String] :use_git Use Git Markdown flavor to save ("true" or "false"). (default to "false")
1231
+ # @option opts [String] :folder The source document folder.
1232
+ # @option opts [String] :storage The source and resulting document storage.
1233
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1234
+ def put_convert_document_to_markdown_with_http_info(name, out_path, opts = {})
1235
+ if @api_client.config.debug
1236
+ @api_client.config.logger.debug 'Calling API: ConversionApi.put_convert_document_to_markdown ...'
1237
+ end
1238
+ # verify the required parameter 'name' is set
1239
+ if @api_client.config.client_side_validation && name.nil?
1240
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConversionApi.put_convert_document_to_markdown"
1241
+ end
1242
+ # verify the required parameter 'out_path' is set
1243
+ if @api_client.config.client_side_validation && out_path.nil?
1244
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_to_markdown"
1245
+ end
1246
+ # resource path
1247
+ local_var_path = '/html/{name}/convert/md'.sub('{' + 'name' + '}', name.to_s)
1248
+
1249
+ # query parameters
1250
+ query_params = {}
1251
+ query_params[:'outPath'] = out_path
1252
+ query_params[:'useGit'] = opts[:'use_git'] if !opts[:'use_git'].nil?
1253
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1254
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1255
+
1256
+ # header parameters
1257
+ header_params = {}
1258
+ # HTTP header 'Accept' (if needed)
1259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1260
+ # HTTP header 'Content-Type'
1261
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1262
+
1263
+ # form parameters
1264
+ form_params = {}
1265
+
1266
+ # http body (model)
1267
+ post_body = nil
1268
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1269
+ :header_params => header_params,
1270
+ :query_params => query_params,
1271
+ :form_params => form_params,
1272
+ :body => post_body,
1273
+ :return_type => 'File')
1274
+ if @api_client.config.debug
1275
+ @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_to_markdown\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1276
+ end
1277
+ return data, status_code, headers
1278
+ end
1279
+
1280
+ ################################################################################
1281
+ # Import Api
1282
+ ################################################################################
1283
+
1284
+ # Converts the Markdown document (located on storage) to HTML and returns resulting file in response content.
1285
+ # @param name Document name.
1286
+ # @param [Hash] opts the optional parameters
1287
+ # @option opts [String] :folder Source document folder.
1288
+ # @option opts [String] :storage Source document storage.
1289
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1290
+ def get_convert_markdown_to_html(name, opts = {})
1291
+ data, _status_code, _headers = get_convert_markdown_to_html_with_http_info(name, opts)
1292
+ return {file: data, status: _status_code, headers: _headers}
1293
+ end
1294
+
1295
+ # Converts the Markdown document (located on storage) to HTML and returns resulting file in response content.
1296
+ # @param name Document name.
1297
+ # @param [Hash] opts the optional parameters
1298
+ # @option opts [String] :folder Source document folder.
1299
+ # @option opts [String] :storage Source document storage.
1300
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1301
+ def get_convert_markdown_to_html_with_http_info(name, opts = {})
1302
+ if @api_client.config.debug
1303
+ @api_client.config.logger.debug 'Calling API: ConversionApi.get_convert_markdown_to_html ...'
1304
+ end
1305
+ # verify the required parameter 'name' is set
1306
+ if @api_client.config.client_side_validation && name.nil?
1307
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConversionApi.get_convert_markdown_to_html"
1308
+ end
1309
+ # resource path
1310
+ local_var_path = '/html/{name}/import/md'.sub('{' + 'name' + '}', name.to_s)
1311
+
1312
+ # query parameters
1313
+ query_params = {}
1314
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1315
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1316
+
1317
+ # header parameters
1318
+ header_params = {}
1319
+ # HTTP header 'Accept' (if needed)
1320
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
1321
+ # HTTP header 'Content-Type'
1322
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1323
+
1324
+ # form parameters
1325
+ form_params = {}
1326
+
1327
+ # http body (model)
1328
+ post_body = nil
1329
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1330
+ :header_params => header_params,
1331
+ :query_params => query_params,
1332
+ :form_params => form_params,
1333
+ :body => post_body,
1334
+ :return_type => 'File')
1335
+ if @api_client.config.debug
1336
+ @api_client.config.logger.debug "API called: ConversionApi#get_convert_markdown_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1337
+ end
1338
+ return data, status_code, headers
1339
+ end
1340
+
1341
+ # Converts the Markdown document (in request content) to HTML and uploads resulting file to storage by specified path.
1342
+ # @param out_path Full resulting file path in the storage (ex. /folder1/folder2/result.html)
1343
+ # @param file A file to be converted.
1344
+ # @param [Hash] opts the optional parameters
1345
+ # @option opts [String] :storage Source document storage.
1346
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1347
+ def post_convert_markdown_in_request_to_html(out_path, file, opts = {})
1348
+ data, _status_code, _headers = post_convert_markdown_in_request_to_html_with_http_info(out_path, file, opts)
1349
+ return {file: data, status: _status_code, headers: _headers}
1350
+ end
1351
+
1352
+ # Converts the Markdown document (in request content) to HTML and uploads resulting file to storage by specified path.
1353
+ # @param out_path Full resulting file path in the storage (ex. /folder1/folder2/result.html)
1354
+ # @param file A file to be converted.
1355
+ # @param [Hash] opts the optional parameters
1356
+ # @option opts [String] :storage Source document storage.
1357
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1358
+ def post_convert_markdown_in_request_to_html_with_http_info(out_path, file, opts = {})
1359
+ if @api_client.config.debug
1360
+ @api_client.config.logger.debug 'Calling API: ConversionApi.post_convert_markdown_in_request_to_html ...'
1361
+ end
1362
+ # verify the required parameter 'out_path' is set
1363
+ if @api_client.config.client_side_validation && out_path.nil?
1364
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.post_convert_markdown_in_request_to_html"
1365
+ end
1366
+ # verify the required parameter 'file' is set
1367
+ if @api_client.config.client_side_validation && file.nil?
1368
+ fail ArgumentError, "Missing the required parameter 'file' when calling ConversionApi.post_convert_markdown_in_request_to_html"
1369
+ end
1370
+ # resource path
1371
+ local_var_path = '/html/import/md'
1372
+
1373
+ # query parameters
1374
+ query_params = {}
1375
+ query_params[:'outPath'] = out_path
1376
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1377
+
1378
+ # header parameters
1379
+ header_params = {}
1380
+ # HTTP header 'Accept' (if needed)
1381
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1382
+ # HTTP header 'Content-Type'
1383
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
1384
+
1385
+ # form parameters
1386
+ form_params = {
1387
+ file: File::open(file,'rb')
1388
+ }
1389
+
1390
+ # http body (model)
1391
+ post_body = nil
1392
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1393
+ :header_params => header_params,
1394
+ :query_params => query_params,
1395
+ :form_params => form_params,
1396
+ :body => post_body,
1397
+ :return_type => 'File')
1398
+ if @api_client.config.debug
1399
+ @api_client.config.logger.debug "API called: ConversionApi#put_convert_markdown_in_request_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1400
+ end
1401
+ return data, status_code, headers
1402
+ end
1403
+
1404
+ # Converts the Markdown document (located on storage) to HTML and uploads resulting file to storage by specified path.
1405
+ # @param name Document name.
1406
+ # @param out_path Full resulting file path in the storage (ex. /folder1/folder2/result.html)
1407
+ # @param [Hash] opts the optional parameters
1408
+ # @option opts [String] :folder The source document folder.
1409
+ # @option opts [String] :storage The source and resulting document storage.
1410
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1411
+ def put_convert_markdown_to_html(name, out_path, opts = {})
1412
+ data, _status_code, _headers = put_convert_markdown_to_html_with_http_info(name, out_path, opts)
1413
+ return {file: data, status: _status_code, headers: _headers}
1414
+ end
1415
+
1416
+ # Converts the Markdown document (located on storage) to HTML and uploads resulting file to storage by specified path.
1417
+ # @param name Document name.
1418
+ # @param out_path Full resulting file path in the storage (ex. /folder1/folder2/result.html)
1419
+ # @param [Hash] opts the optional parameters
1420
+ # @option opts [String] :folder The source document folder.
1421
+ # @option opts [String] :storage The source and resulting document storage.
1422
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1423
+ def put_convert_markdown_to_html_with_http_info(name, out_path, opts = {})
1424
+ if @api_client.config.debug
1425
+ @api_client.config.logger.debug 'Calling API: ConversionApi.put_convert_markdown_to_html ...'
1426
+ end
1427
+ # verify the required parameter 'name' is set
1428
+ if @api_client.config.client_side_validation && name.nil?
1429
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConversionApi.put_convert_markdown_to_html"
1430
+ end
1431
+ # verify the required parameter 'out_path' is set
1432
+ if @api_client.config.client_side_validation && out_path.nil?
1433
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_markdown_to_html"
1434
+ end
1435
+ # resource path
1436
+ local_var_path = '/html/{name}/import/md'.sub('{' + 'name' + '}', name.to_s)
1437
+
1438
+ # query parameters
1439
+ query_params = {}
1440
+ query_params[:'outPath'] = out_path
1441
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1442
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1443
+
1444
+ # header parameters
1445
+ header_params = {}
1446
+ # HTTP header 'Accept' (if needed)
1447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1448
+ # HTTP header 'Content-Type'
1449
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1450
+
1451
+ # form parameters
1452
+ form_params = {}
1453
+
1454
+ # http body (model)
1455
+ post_body = nil
1456
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1457
+ :header_params => header_params,
1458
+ :query_params => query_params,
1459
+ :form_params => form_params,
1460
+ :body => post_body,
1461
+ :return_type => 'File')
1462
+ if @api_client.config.debug
1463
+ @api_client.config.logger.debug "API called: ConversionApi#put_convert_markdown_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1464
+ end
1465
+ return data, status_code, headers
1466
+ end
1467
+
1468
+ ################################################################################
1469
+ # Document Api
1470
+ ################################################################################
1471
+
1472
+ # Return all HTML page with linked resources packaged as a ZIP archive by the source page URL.
1473
+ #
1474
+ # @param source_url Source page URL.
1475
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1476
+ def get_document_by_url(source_url)
1477
+ data, _status_code, _headers = get_document_by_url_with_http_info(source_url)
1478
+ return {file: data, status: _status_code, headers: _headers}
1479
+ end
1480
+
1481
+ # Return all HTML page with linked resources packaged as a ZIP archive by the source page URL.
1482
+ #
1483
+ # @param source_url Source page URL.
1484
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1485
+ def get_document_by_url_with_http_info(source_url)
1486
+ if @api_client.config.debug
1487
+ @api_client.config.logger.debug 'Calling API: DocumentApi.get_document_by_url ...'
1488
+ end
1489
+ # verify the required parameter 'source_url' is set
1490
+ if @api_client.config.client_side_validation && source_url.nil?
1491
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling DocumentApi.get_document_by_url"
1492
+ end
1493
+ # resource path
1494
+ local_var_path = '/html/download'
1495
+
1496
+ # query parameters
1497
+ query_params = {}
1498
+ query_params[:'sourceUrl'] = source_url
1499
+
1500
+ # header parameters
1501
+ header_params = {}
1502
+ # HTTP header 'Accept' (if needed)
1503
+ header_params['Accept'] = @api_client.select_header_accept(['application/zip'])
1504
+ # HTTP header 'Content-Type'
1505
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1506
+
1507
+ # form parameters
1508
+ form_params = {}
1509
+
1510
+ # http body (model)
1511
+ post_body = nil
1512
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1513
+ :header_params => header_params,
1514
+ :query_params => query_params,
1515
+ :form_params => form_params,
1516
+ :body => post_body,
1517
+ :return_type => 'File')
1518
+ if @api_client.config.debug
1519
+ @api_client.config.logger.debug "API called: DocumentApi#get_document_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1520
+ end
1521
+ return data, status_code, headers
1522
+ end
1523
+
1524
+ # Return list of HTML fragments matching the specified XPath query.
1525
+ # @param name The document name.
1526
+ # @param x_path XPath query string.
1527
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1528
+ # @param [Hash] opts the optional parameters
1529
+ # @option opts [String] :storage The document storage.
1530
+ # @option opts [String] :folder The document folder.
1531
+ # @return [File]
1532
+ def document_get_document_fragment_by_x_path(name, x_path, out_format, opts = {})
1533
+ data, _status_code, _headers = document_get_document_fragment_by_x_path_with_http_info(name, x_path, out_format, opts)
1534
+ data
1535
+ end
1536
+
1537
+
1538
+ # Return list of HTML fragments matching the specified XPath query.
1539
+ #
1540
+ # @param name The document name.
1541
+ # @param x_path XPath query string.
1542
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1543
+ # @param [Hash] opts the optional parameters
1544
+ # @option opts [String] :storage The document storage.
1545
+ # @option opts [String] :folder The document folder.
1546
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1547
+ def get_document_fragment_by_x_path(name, x_path, out_format, opts = {})
1548
+ data, _status_code, _headers = get_document_fragment_by_x_path_with_http_info(name, x_path, out_format, opts)
1549
+ return {file: data, status: _status_code, headers: _headers}
1550
+ end
1551
+
1552
+ # Return list of HTML fragments matching the specified XPath query.
1553
+ #
1554
+ # @param name The document name.
1555
+ # @param x_path XPath query string.
1556
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1557
+ # @param [Hash] opts the optional parameters
1558
+ # @option opts [String] :storage The document storage.
1559
+ # @option opts [String] :folder The document folder.
1560
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1561
+ def get_document_fragment_by_x_path_with_http_info(name, x_path, out_format, opts = {})
1562
+ if @api_client.config.debug
1563
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_document_fragment_by_x_path ..."
1564
+ end
1565
+ # verify the required parameter 'name' is set
1566
+ if @api_client.config.client_side_validation && name.nil?
1567
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_document_fragment_by_x_path"
1568
+ end
1569
+ # verify the required parameter 'x_path' is set
1570
+ if @api_client.config.client_side_validation && x_path.nil?
1571
+ fail ArgumentError, "Missing the required parameter 'x_path' when calling HtmlApi.get_document_fragment_by_x_path"
1572
+ end
1573
+ # verify the required parameter 'out_format' is set
1574
+ if @api_client.config.client_side_validation && out_format.nil?
1575
+ fail ArgumentError, "Missing the required parameter 'out_format' when calling HtmlApi.get_document_fragment_by_x_path"
1576
+ end
1577
+ # resource path
1578
+ local_var_path = "/html/{name}/fragments/{outFormat}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'outFormat' + '}', out_format.to_s)
1579
+
1580
+ # query parameters
1581
+ query_params = {}
1582
+ query_params[:'xPath'] = x_path
1583
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1584
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1585
+
1586
+ # header parameters
1587
+ header_params = {}
1588
+ # HTTP header 'Accept' (if needed)
1589
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
1590
+ # HTTP header 'Content-Type'
1591
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1592
+
1593
+ # form parameters
1594
+ form_params = {}
1595
+
1596
+ # http body (model)
1597
+ post_body = nil
1598
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1599
+ :header_params => header_params,
1600
+ :query_params => query_params,
1601
+ :form_params => form_params,
1602
+ :body => post_body,
1603
+ :return_type => 'File')
1604
+ if @api_client.config.debug
1605
+ @api_client.config.logger.debug "API called: HtmlApi#get_document_fragment_by_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1606
+ end
1607
+ return data, status_code, headers
1608
+ end
1609
+
1610
+ # Return list of HTML fragments matching the specified XPath query by the source page URL.
1611
+ #
1612
+ # @param source_url Source page URL.
1613
+ # @param x_path XPath query string.
1614
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1615
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1616
+ def get_document_fragment_by_x_path_by_url(source_url, x_path, out_format)
1617
+ data, _status_code, _headers = get_document_fragment_by_x_path_by_url_with_http_info(source_url, x_path, out_format)
1618
+ return {file: data, status: _status_code, headers: _headers}
1619
+ end
1620
+
1621
+ # Return list of HTML fragments matching the specified XPath query by the source page URL.
1622
+ #
1623
+ # @param source_url Source page URL.
1624
+ # @param x_path XPath query string.
1625
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1626
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1627
+ def get_document_fragment_by_x_path_by_url_with_http_info(source_url, x_path, out_format)
1628
+ if @api_client.config.debug
1629
+ @api_client.config.logger.debug "Calling API: DocumentApi.get_document_fragment_by_x_path_by_url ..."
1630
+ end
1631
+ # verify the required parameter 'source_url' is set
1632
+ if @api_client.config.client_side_validation && source_url.nil?
1633
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling DocumentApi.get_document_fragment_by_x_path_by_url"
1634
+ end
1635
+ # verify the required parameter 'x_path' is set
1636
+ if @api_client.config.client_side_validation && x_path.nil?
1637
+ fail ArgumentError, "Missing the required parameter 'x_path' when calling DocumentApi.get_document_fragment_by_x_path_by_url"
1638
+ end
1639
+ # verify the required parameter 'out_format' is set
1640
+ if @api_client.config.client_side_validation && out_format.nil?
1641
+ fail ArgumentError, "Missing the required parameter 'out_format' when calling DocumentApi.get_document_fragment_by_x_path_by_url"
1642
+ end
1643
+ # resource path
1644
+ local_var_path = "/html/fragments/{outFormat}".sub('{' + 'outFormat' + '}', out_format.to_s)
1645
+
1646
+ # query parameters
1647
+ query_params = {}
1648
+ query_params[:'sourceUrl'] = source_url
1649
+ query_params[:'xPath'] = x_path
1650
+
1651
+ # header parameters
1652
+ header_params = {}
1653
+ # HTTP header 'Accept' (if needed)
1654
+ header_params['Accept'] = @api_client.select_header_accept(['application/zip'])
1655
+ # HTTP header 'Content-Type'
1656
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1657
+
1658
+ # form parameters
1659
+ form_params = {}
1660
+
1661
+ # http body (model)
1662
+ post_body = nil
1663
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1664
+ :header_params => header_params,
1665
+ :query_params => query_params,
1666
+ :form_params => form_params,
1667
+ :body => post_body,
1668
+ :return_type => 'File')
1669
+ if @api_client.config.debug
1670
+ @api_client.config.logger.debug "API called: DocumentApi#get_document_fragment_by_x_path_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1671
+ end
1672
+ return data, status_code, headers
1673
+ end
1674
+
1675
+ # Return list of HTML fragments matching the specified CSS selector.
1676
+ #
1677
+ # @param name The document name.
1678
+ # @param selector CSS selector string.
1679
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1680
+ # @param [Hash] opts the optional parameters
1681
+ # @option opts [String] :folder The document folder.
1682
+ # @option opts [String] :storage The document storage.
1683
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1684
+ def get_document_fragments_by_css_selector(name, selector, out_format, opts = {})
1685
+ data, _status_code, _headers = get_document_fragments_by_css_selector_with_http_info(name, selector, out_format, opts)
1686
+ return {file: data, status: _status_code, headers: _headers}
1687
+ end
1688
+
1689
+ # Return list of HTML fragments matching the specified CSS selector.
1690
+ #
1691
+ # @param name The document name.
1692
+ # @param selector CSS selector string.
1693
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1694
+ # @param [Hash] opts the optional parameters
1695
+ # @option opts [String] :folder The document folder.
1696
+ # @option opts [String] :storage The document storage.
1697
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1698
+ def get_document_fragments_by_css_selector_with_http_info(name, selector, out_format, opts = {})
1699
+ if @api_client.config.debug
1700
+ @api_client.config.logger.debug "Calling API: DocumentApi.get_document_fragments_by_css_selector ..."
1701
+ end
1702
+ # verify the required parameter 'name' is set
1703
+ if @api_client.config.client_side_validation && name.nil?
1704
+ fail ArgumentError, "Missing the required parameter 'name' when calling DocumentApi.get_document_fragments_by_css_selector"
1705
+ end
1706
+ # verify the required parameter 'selector' is set
1707
+ if @api_client.config.client_side_validation && selector.nil?
1708
+ fail ArgumentError, "Missing the required parameter 'selector' when calling DocumentApi.get_document_fragments_by_css_selector"
1709
+ end
1710
+ # verify the required parameter 'out_format' is set
1711
+ if @api_client.config.client_side_validation && out_format.nil?
1712
+ fail ArgumentError, "Missing the required parameter 'out_format' when calling DocumentApi.get_document_fragments_by_css_selector"
1713
+ end
1714
+ # resource path
1715
+ local_var_path = "/html/{name}/fragments/css/{outFormat}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'outFormat' + '}', out_format.to_s)
1716
+
1717
+ # query parameters
1718
+ query_params = {}
1719
+ query_params[:'selector'] = selector
1720
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1721
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1722
+
1723
+ # header parameters
1724
+ header_params = {}
1725
+ # HTTP header 'Accept' (if needed)
1726
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
1727
+ # HTTP header 'Content-Type'
1728
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1729
+
1730
+ # form parameters
1731
+ form_params = {}
1732
+
1733
+ # http body (model)
1734
+ post_body = nil
1735
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1736
+ :header_params => header_params,
1737
+ :query_params => query_params,
1738
+ :form_params => form_params,
1739
+ :body => post_body,
1740
+ :return_type => 'File')
1741
+ if @api_client.config.debug
1742
+ @api_client.config.logger.debug "API called: DocumentApi#get_document_fragments_by_css_selector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1743
+ end
1744
+ return data, status_code, headers
1745
+ end
1746
+
1747
+ # Return list of HTML fragments matching the specified CSS selector by the source page URL.
1748
+ #
1749
+ # @param source_url Source page URL.
1750
+ # @param selector CSS selector string.
1751
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1752
+ # @param [Hash] opts the optional parameters
1753
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1754
+ def get_document_fragments_by_css_selector_by_url(source_url, selector, out_format, opts = {})
1755
+ data, _status_code, _headers = get_document_fragments_by_css_selector_by_url_with_http_info(source_url, selector, out_format, opts)
1756
+ return {file: data, status: _status_code, headers: _headers}
1757
+ end
1758
+
1759
+ # Return list of HTML fragments matching the specified CSS selector by the source page URL.
1760
+ #
1761
+ # @param source_url Source page URL.
1762
+ # @param selector CSS selector string.
1763
+ # @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;.
1764
+ # @param [Hash] opts the optional parameters
1765
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1766
+ def get_document_fragments_by_css_selector_by_url_with_http_info(source_url, selector, out_format, opts = {})
1767
+ if @api_client.config.debug
1768
+ @api_client.config.logger.debug "Calling API: DocumentApi.get_document_fragments_by_css_selector_by_url ..."
1769
+ end
1770
+ # verify the required parameter 'source_url' is set
1771
+ if @api_client.config.client_side_validation && source_url.nil?
1772
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling DocumentApi.get_document_fragments_by_css_selector_by_url"
1773
+ end
1774
+ # verify the required parameter 'selector' is set
1775
+ if @api_client.config.client_side_validation && selector.nil?
1776
+ fail ArgumentError, "Missing the required parameter 'selector' when calling DocumentApi.get_document_fragments_by_css_selector_by_url"
1777
+ end
1778
+ # verify the required parameter 'out_format' is set
1779
+ if @api_client.config.client_side_validation && out_format.nil?
1780
+ fail ArgumentError, "Missing the required parameter 'out_format' when calling DocumentApi.get_document_fragments_by_css_selector_by_url"
1781
+ end
1782
+ # resource path
1783
+ local_var_path = "/html/fragments/css/{outFormat}".sub('{' + 'outFormat' + '}', out_format.to_s)
1784
+
1785
+ # query parameters
1786
+ query_params = {}
1787
+ query_params[:'sourceUrl'] = source_url
1788
+ query_params[:'selector'] = selector
1789
+
1790
+ # header parameters
1791
+ header_params = {}
1792
+ # HTTP header 'Accept' (if needed)
1793
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
1794
+ # HTTP header 'Content-Type'
1795
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1796
+
1797
+ # form parameters
1798
+ form_params = {}
1799
+
1800
+ # http body (model)
1801
+ post_body = nil
1802
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1803
+ :header_params => header_params,
1804
+ :query_params => query_params,
1805
+ :form_params => form_params,
1806
+ :body => post_body,
1807
+ :return_type => 'File')
1808
+ if @api_client.config.debug
1809
+ @api_client.config.logger.debug "API called: DocumentApi#get_document_fragments_by_css_selector_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1810
+ end
1811
+ return data, status_code, headers
1812
+ end
1813
+
1814
+ # Return all HTML document images packaged as a ZIP archive.
1815
+ #
1816
+ # @param name The document name.
1817
+ # @param [Hash] opts the optional parameters
1818
+ # @option opts [String] :folder The document folder.
1819
+ # @option opts [String] :storage The document storage.
1820
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1821
+ def get_document_images(name, opts = {})
1822
+ data, _status_code, _headers = get_document_images_with_http_info(name, opts)
1823
+ return {file: data, status: _status_code, headers: _headers}
1824
+ end
1825
+
1826
+ # Return all HTML document images packaged as a ZIP archive.
1827
+ #
1828
+ # @param name The document name.
1829
+ # @param [Hash] opts the optional parameters
1830
+ # @option opts [String] :folder The document folder.
1831
+ # @option opts [String] :storage The document storage.
1832
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1833
+ def get_document_images_with_http_info(name, opts = {})
1834
+ if @api_client.config.debug
1835
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_document_images ..."
1836
+ end
1837
+ # verify the required parameter 'name' is set
1838
+ if @api_client.config.client_side_validation && name.nil?
1839
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_document_images"
1840
+ end
1841
+ # resource path
1842
+ local_var_path = "/html/{name}/images/all".sub('{' + 'name' + '}', name.to_s)
1843
+
1844
+ # query parameters
1845
+ query_params = {}
1846
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1847
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1848
+
1849
+ # header parameters
1850
+ header_params = {}
1851
+ # HTTP header 'Accept' (if needed)
1852
+ header_params['Accept'] = @api_client.select_header_accept(['application/zip'])
1853
+ # HTTP header 'Content-Type'
1854
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1855
+
1856
+ # form parameters
1857
+ form_params = {}
1858
+
1859
+ # http body (model)
1860
+ post_body = nil
1861
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1862
+ :header_params => header_params,
1863
+ :query_params => query_params,
1864
+ :form_params => form_params,
1865
+ :body => post_body,
1866
+ :return_type => 'File')
1867
+ if @api_client.config.debug
1868
+ @api_client.config.logger.debug "API called: HtmlApi#get_document_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1869
+ end
1870
+ return data, status_code, headers
1871
+ end
1872
+
1873
+
1874
+ # Return all HTML page images packaged as a ZIP archive by the source page URL.
1875
+ #
1876
+ # @param source_url Source page URL.
1877
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1878
+ def get_document_images_by_url(source_url)
1879
+ data, _status_code, _headers = get_document_images_by_url_with_http_info(source_url)
1880
+ return {file: data, status: _status_code, headers: _headers}
1881
+ end
1882
+
1883
+ # Return all HTML page images packaged as a ZIP archive by the source page URL.
1884
+ #
1885
+ # @param source_url Source page URL.
1886
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1887
+ def get_document_images_by_url_with_http_info(source_url)
1888
+ if @api_client.config.debug
1889
+ @api_client.config.logger.debug "Calling API: DocumentApi.get_document_images_by_url ..."
1890
+ end
1891
+ # verify the required parameter 'source_url' is set
1892
+ if @api_client.config.client_side_validation && source_url.nil?
1893
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling DocumentApi.get_document_images_by_url"
1894
+ end
1895
+ # resource path
1896
+ local_var_path = "/html/images/all"
1897
+
1898
+ # query parameters
1899
+ query_params = {}
1900
+ query_params[:'sourceUrl'] = source_url
1901
+
1902
+ # header parameters
1903
+ header_params = {}
1904
+ # HTTP header 'Accept' (if needed)
1905
+ header_params['Accept'] = @api_client.select_header_accept(['application/zip'])
1906
+ # HTTP header 'Content-Type'
1907
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1908
+
1909
+ # form parameters
1910
+ form_params = {}
1911
+
1912
+ # http body (model)
1913
+ post_body = nil
1914
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1915
+ :header_params => header_params,
1916
+ :query_params => query_params,
1917
+ :form_params => form_params,
1918
+ :body => post_body,
1919
+ :return_type => 'File')
1920
+ if @api_client.config.debug
1921
+ @api_client.config.logger.debug "API called: DocumentApi#get_document_images_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1922
+ end
1923
+ return data, status_code, headers
1924
+ end
1925
+
1926
+ ################################################################################
1927
+ # OCR Api
1928
+ ################################################################################
1929
+
1930
+
1931
+ # Recognize text from the image file in the storage and import it to HTML format.
1932
+ #
1933
+ # @param name The image file name.
1934
+ # @param [Hash] opts the optional parameters
1935
+ # @option opts [String] :ocr_engine_lang OCR engine language - language (default to en)
1936
+ # @option opts [String] :folder The source image folder.
1937
+ # @option opts [String] :storage The source image storage.
1938
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
1939
+ def get_recognize_and_import_to_html(name, opts = {})
1940
+ data, _status_code, _headers = get_recognize_and_import_to_html_with_http_info(name, opts)
1941
+ return {file: data, status: _status_code, headers: _headers}
1942
+ end
1943
+
1944
+ # Recognize text from the image file in the storage and import it to HTML format.
1945
+ #
1946
+ # @param name The image file name.
1947
+ # @param [Hash] opts the optional parameters
1948
+ # @option opts [String] :ocr_engine_lang OCR engine language - language default "en"
1949
+ # @option opts [String] :folder The source image folder.
1950
+ # @option opts [String] :storage The source image storage.
1951
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
1952
+ def get_recognize_and_import_to_html_with_http_info(name, opts = {})
1953
+ if @api_client.config.debug
1954
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_recognize_and_import_to_html ..."
1955
+ end
1956
+ # verify the required parameter 'name' is set
1957
+ if @api_client.config.client_side_validation && name.nil?
1958
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_recognize_and_import_to_html"
1959
+ end
1960
+ # resource path
1961
+ local_var_path = "/html/{name}/ocr/import".sub('{' + 'name' + '}', name.to_s)
1962
+
1963
+ # query parameters
1964
+ query_params = {}
1965
+ if opts[:'ocr_engine_lang'].nil?
1966
+ query_params[:'ocrEngineLang'] = "en"
1967
+ else
1968
+ query_params[:'ocrEngineLang'] = opts[:'ocr_engine_lang']
1969
+ end
1970
+
1971
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1972
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
1973
+
1974
+ # header parameters
1975
+ header_params = {}
1976
+ # HTTP header 'Accept' (if needed)
1977
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
1978
+ # HTTP header 'Content-Type'
1979
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1980
+
1981
+ # form parameters
1982
+ form_params = {}
1983
+
1984
+ # http body (model)
1985
+ post_body = nil
1986
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1987
+ :header_params => header_params,
1988
+ :query_params => query_params,
1989
+ :form_params => form_params,
1990
+ :body => post_body,
1991
+ :return_type => 'File')
1992
+ if @api_client.config.debug
1993
+ @api_client.config.logger.debug "API called: HtmlApi#get_recognize_and_import_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1994
+ end
1995
+ return data, status_code, headers
1996
+ end
1997
+
1998
+ # Recognize text from the image file in the storage, import it to HTML format and translate to specified language.
1999
+ #
2000
+ # @param name The image file name.
2001
+ # @param src_lang Source language - also supposed as the OCR engine language.
2002
+ # @param res_lang Result language.
2003
+ # @param [Hash] opts the optional parameters
2004
+ # @option opts [String] :folder The source image folder.
2005
+ # @option opts [String] :storage The source image storage.
2006
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
2007
+ def get_recognize_and_translate_to_html(name, src_lang, res_lang, opts = {})
2008
+ data, _status_code, _headers = get_recognize_and_translate_to_html_with_http_info(name, src_lang, res_lang, opts)
2009
+ return {file: data, status: _status_code, headers: _headers}
2010
+ end
2011
+
2012
+ # Recognize text from the image file in the storage, import it to HTML format and translate to specified language.
2013
+ #
2014
+ # @param name The image file name.
2015
+ # @param src_lang Source language - also supposed as the OCR engine language.
2016
+ # @param res_lang Result language.
2017
+ # @param [Hash] opts the optional parameters
2018
+ # @option opts [String] :folder The source image folder.
2019
+ # @option opts [String] :storage The source image storage.
2020
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
2021
+ def get_recognize_and_translate_to_html_with_http_info(name, src_lang, res_lang, opts = {})
2022
+ if @api_client.config.debug
2023
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_recognize_and_translate_to_html ..."
2024
+ end
2025
+ # verify the required parameter 'name' is set
2026
+ if @api_client.config.client_side_validation && name.nil?
2027
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_recognize_and_translate_to_html"
2028
+ end
2029
+ # verify the required parameter 'src_lang' is set
2030
+ if @api_client.config.client_side_validation && src_lang.nil?
2031
+ fail ArgumentError, "Missing the required parameter 'src_lang' when calling HtmlApi.get_recognize_and_translate_to_html"
2032
+ end
2033
+ # verify the required parameter 'res_lang' is set
2034
+ if @api_client.config.client_side_validation && res_lang.nil?
2035
+ fail ArgumentError, "Missing the required parameter 'res_lang' when calling HtmlApi.get_recognize_and_translate_to_html"
2036
+ end
2037
+ # resource path
2038
+ local_var_path = "/html/{name}/ocr/translate/{srcLang}/{resLang}"
2039
+ .sub('{' + 'name' + '}', name.to_s)
2040
+ .sub('{' + 'srcLang' + '}', src_lang.to_s)
2041
+ .sub('{' + 'resLang' + '}', res_lang.to_s)
2042
+
2043
+ # query parameters
2044
+ query_params = {}
2045
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
2046
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
2047
+
2048
+ # header parameters
2049
+ header_params = {}
2050
+ # HTTP header 'Accept' (if needed)
2051
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
2052
+ # HTTP header 'Content-Type'
2053
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2054
+
2055
+ # form parameters
2056
+ form_params = {}
2057
+
2058
+ # http body (model)
2059
+ post_body = nil
2060
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2061
+ :header_params => header_params,
2062
+ :query_params => query_params,
2063
+ :form_params => form_params,
2064
+ :body => post_body,
2065
+ :return_type => 'File')
2066
+ if @api_client.config.debug
2067
+ @api_client.config.logger.debug "API called: HtmlApi#get_recognize_and_translate_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2068
+ end
2069
+ return data, status_code, headers
2070
+ end
2071
+
2072
+
2073
+ ################################################################################
2074
+ # Translation Api
2075
+ ################################################################################
2076
+
2077
+
2078
+ # Translate the HTML document specified by the name from default or specified storage.
2079
+ #
2080
+ # @param name Document name.
2081
+ # @param src_lang Source language.
2082
+ # @param res_lang Result language.
2083
+ # @param [Hash] opts the optional parameters
2084
+ # @option opts [String] :storage The source document storage.
2085
+ # @option opts [String] :folder The source document folder.
2086
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
2087
+ def get_translate_document(name, src_lang, res_lang, opts = {})
2088
+ data, _status_code, _headers = get_translate_document_with_http_info(name, src_lang, res_lang, opts)
2089
+ return {file: data, status: _status_code, headers: _headers}
2090
+ end
2091
+
2092
+ # Translate the HTML document specified by the name from default or specified storage.
2093
+ #
2094
+ # @param name Document name.
2095
+ # @param src_lang Source language.
2096
+ # @param res_lang Result language.
2097
+ # @param [Hash] opts the optional parameters
2098
+ # @option opts [String] :storage The source document storage.
2099
+ # @option opts [String] :folder The source document folder.
2100
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
2101
+ def get_translate_document_with_http_info(name, src_lang, res_lang, opts = {})
2102
+ if @api_client.config.debug
2103
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_translate_document ..."
2104
+ end
2105
+ # verify the required parameter 'name' is set
2106
+ if @api_client.config.client_side_validation && name.nil?
2107
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_translate_document"
2108
+ end
2109
+ # verify the required parameter 'src_lang' is set
2110
+ if @api_client.config.client_side_validation && src_lang.nil?
2111
+ fail ArgumentError, "Missing the required parameter 'src_lang' when calling HtmlApi.get_translate_document"
2112
+ end
2113
+ # verify the required parameter 'res_lang' is set
2114
+ if @api_client.config.client_side_validation && res_lang.nil?
2115
+ fail ArgumentError, "Missing the required parameter 'res_lang' when calling HtmlApi.get_translate_document"
2116
+ end
2117
+ # resource path
2118
+ local_var_path = "/html/{name}/translate/{srcLang}/{resLang}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'srcLang' + '}', src_lang.to_s).sub('{' + 'resLang' + '}', res_lang.to_s)
2119
+
2120
+ # query parameters
2121
+ query_params = {}
2122
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
2123
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
2124
+
2125
+ # header parameters
2126
+ header_params = {}
2127
+ # HTTP header 'Accept' (if needed)
2128
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
2129
+ # HTTP header 'Content-Type'
2130
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2131
+
2132
+ # form parameters
2133
+ form_params = {}
2134
+
2135
+ # http body (model)
2136
+ post_body = nil
2137
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2138
+ :header_params => header_params,
2139
+ :query_params => query_params,
2140
+ :form_params => form_params,
2141
+ :body => post_body,
2142
+ :return_type => 'File')
2143
+ if @api_client.config.debug
2144
+ @api_client.config.logger.debug "API called: HtmlApi#get_translate_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2145
+ end
2146
+ return data, status_code, headers
2147
+ end
2148
+
2149
+ # Translate the HTML document from Web specified by its URL.
2150
+ #
2151
+ # @param source_url Source document URL.
2152
+ # @param src_lang Source language.
2153
+ # @param res_lang Result language.
2154
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
2155
+ def get_translate_document_by_url(source_url, src_lang, res_lang)
2156
+ data, _status_code, _headers = get_translate_document_by_url_with_http_info(source_url, src_lang, res_lang)
2157
+ return {file: data, status: _status_code, headers: _headers}
2158
+ end
2159
+
2160
+ # Translate the HTML document from Web specified by its URL.
2161
+ #
2162
+ # @param source_url Source document URL.
2163
+ # @param src_lang Source language.
2164
+ # @param res_lang Result language.
2165
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
2166
+ def get_translate_document_by_url_with_http_info(source_url, src_lang, res_lang)
2167
+ if @api_client.config.debug
2168
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_translate_document_by_url ..."
2169
+ end
2170
+ # verify the required parameter 'source_url' is set
2171
+ if @api_client.config.client_side_validation && source_url.nil?
2172
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_translate_document_by_url"
2173
+ end
2174
+ # verify the required parameter 'src_lang' is set
2175
+ if @api_client.config.client_side_validation && src_lang.nil?
2176
+ fail ArgumentError, "Missing the required parameter 'src_lang' when calling HtmlApi.get_translate_document_by_url"
2177
+ end
2178
+ # verify the required parameter 'res_lang' is set
2179
+ if @api_client.config.client_side_validation && res_lang.nil?
2180
+ fail ArgumentError, "Missing the required parameter 'res_lang' when calling HtmlApi.get_translate_document_by_url"
2181
+ end
2182
+ # resource path
2183
+ local_var_path = "/html/translate/{srcLang}/{resLang}".sub('{' + 'srcLang' + '}', src_lang.to_s).sub('{' + 'resLang' + '}', res_lang.to_s)
2184
+
2185
+ # query parameters
2186
+ query_params = {}
2187
+ query_params[:'sourceUrl'] = source_url
2188
+
2189
+ # header parameters
2190
+ header_params = {}
2191
+ # HTTP header 'Accept' (if needed)
2192
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
2193
+ # HTTP header 'Content-Type'
2194
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2195
+
2196
+ # form parameters
2197
+ form_params = {}
2198
+
2199
+ # http body (model)
2200
+ post_body = nil
2201
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2202
+ :header_params => header_params,
2203
+ :query_params => query_params,
2204
+ :form_params => form_params,
2205
+ :body => post_body,
2206
+ :return_type => 'File')
2207
+ if @api_client.config.debug
2208
+ @api_client.config.logger.debug "API called: HtmlApi#get_translate_document_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2209
+ end
2210
+ return data, status_code, headers
2211
+ end
2212
+
2213
+
2214
+ ################################################################################
2215
+ # Summarization Api
2216
+ ################################################################################
2217
+
2218
+
2219
+ # Get the HTML document keywords using the keyword detection service.
2220
+ #
2221
+ # @param name Document name.
2222
+ # @param [Hash] opts the optional parameters
2223
+ # @option opts [String] :folder Document folder.
2224
+ # @option opts [String] :storage Document storage.
2225
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
2226
+ def get_detect_html_keywords(name, opts = {})
2227
+ data, _status_code, _headers = get_detect_html_keywords_with_http_info(name, opts)
2228
+ return {file: data, status: _status_code, headers: _headers}
2229
+ end
2230
+
2231
+ # Get the HTML document keywords using the keyword detection service.
2232
+ #
2233
+ # @param name Document name.
2234
+ # @param [Hash] opts the optional parameters
2235
+ # @option opts [String] :folder Document folder.
2236
+ # @option opts [String] :storage Document storage.
2237
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
2238
+ def get_detect_html_keywords_with_http_info(name, opts = {})
2239
+ if @api_client.config.debug
2240
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_detect_html_keywords ..."
2241
+ end
2242
+ # verify the required parameter 'name' is set
2243
+ if @api_client.config.client_side_validation && name.nil?
2244
+ fail ArgumentError, "Missing the required parameter 'name' when calling HtmlApi.get_detect_html_keywords"
2245
+ end
2246
+ # resource path
2247
+ local_var_path = "/html/{name}/summ/keywords".sub('{' + 'name' + '}', name.to_s)
2248
+
2249
+ # query parameters
2250
+ query_params = {}
2251
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
2252
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
2253
+
2254
+ # header parameters
2255
+ header_params = {}
2256
+ # HTTP header 'Accept' (if needed)
2257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2258
+ # HTTP header 'Content-Type'
2259
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2260
+
2261
+ # form parameters
2262
+ form_params = {}
2263
+
2264
+ # http body (model)
2265
+ post_body = nil
2266
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2267
+ :header_params => header_params,
2268
+ :query_params => query_params,
2269
+ :form_params => form_params,
2270
+ :body => post_body,
2271
+ :return_type => 'File')
2272
+ if @api_client.config.debug
2273
+ @api_client.config.logger.debug "API called: HtmlApi#get_detect_html_keywords\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2274
+ end
2275
+ return data, status_code, headers
2276
+ end
2277
+
2278
+ # Get the keywords from HTML document from Web specified by its URL using the keyword detection service
2279
+ #
2280
+ # @param source_url Source document URL.
2281
+ # @param [Hash] opts the optional parameters
2282
+ # @return [Hash] {file: data, status: _status_code, headers: _headers}
2283
+ def get_detect_html_keywords_by_url(source_url, opts = {})
2284
+ data, _status_code, _headers = get_detect_html_keywords_by_url_with_http_info(source_url, opts)
2285
+ return {file: data, status: _status_code, headers: _headers}
2286
+ end
2287
+
2288
+ # Get the keywords from HTML document from Web specified by its URL using the keyword detection service
2289
+ #
2290
+ # @param source_url Source document URL.
2291
+ # @param [Hash] opts the optional parameters
2292
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
2293
+ def get_detect_html_keywords_by_url_with_http_info(source_url, opts = {})
2294
+ if @api_client.config.debug
2295
+ @api_client.config.logger.debug "Calling API: HtmlApi.get_detect_html_keywords_by_url ..."
2296
+ end
2297
+ # verify the required parameter 'source_url' is set
2298
+ if @api_client.config.client_side_validation && source_url.nil?
2299
+ fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_detect_html_keywords_by_url"
2300
+ end
2301
+ # resource path
2302
+ local_var_path = "/html/summ/keywords"
2303
+
2304
+ # query parameters
2305
+ query_params = {}
2306
+ query_params[:'sourceUrl'] = source_url
2307
+
2308
+ # header parameters
2309
+ header_params = {}
2310
+ # HTTP header 'Accept' (if needed)
2311
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2312
+ # HTTP header 'Content-Type'
2313
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2314
+
2315
+ # form parameters
2316
+ form_params = {}
2317
+
2318
+ # http body (model)
2319
+ post_body = nil
2320
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2321
+ :header_params => header_params,
2322
+ :query_params => query_params,
2323
+ :form_params => form_params,
2324
+ :body => post_body,
2325
+ :return_type => 'File')
2326
+ if @api_client.config.debug
2327
+ @api_client.config.logger.debug "API called: HtmlApi#get_detect_html_keywords_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2328
+ end
2329
+ return data, status_code, headers
2330
+ end
2331
+
2332
+ # Populate HTML document template with data located as a file in the storage.
2333
+ #
2334
+ # @param template_name Template document name. Template document is HTML or zipped HTML.
2335
+ # @param data_path Data source file path in the storage. Supported data format: XML
2336
+ # @param [Hash] opts the optional parameters
2337
+ # @option opts [String] :options Template merge options: reserved for further implementation.
2338
+ # @option opts [String] :folder The template document folder.
2339
+ # @option opts [String] :storage The template document and data source storage.
2340
+ # @return [File]
2341
+ def get_merge_html_template(template_name, data_path, opts = {})
2342
+ data, _status_code, _headers = get_merge_html_template_with_http_info(template_name, data_path, opts)
2343
+ return {file: data, status: _status_code, headers: _headers}
2344
+ end
2345
+
2346
+ # Populate HTML document template with data located as a file in the storage.
2347
+ #
2348
+ # @param template_name Template document name. Template document is HTML or zipped HTML.
2349
+ # @param data_path Data source file path in the storage. Supported data format: XML
2350
+ # @param [Hash] opts the optional parameters
2351
+ # @option opts [String] :options Template merge options: reserved for further implementation.
2352
+ # @option opts [String] :folder The template document folder.
2353
+ # @option opts [String] :storage The template document and data source storage.
2354
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
2355
+ def get_merge_html_template_with_http_info(template_name, data_path, opts = {})
2356
+ if @api_client.config.debug
2357
+ @api_client.config.logger.debug "Calling API: TemplateMergeApi.get_merge_html_template ..."
2358
+ end
2359
+ # verify the required parameter 'template_name' is set
2360
+ if @api_client.config.client_side_validation && template_name.nil?
2361
+ fail ArgumentError, "Missing the required parameter 'template_name' when calling TemplateMergeApi.get_merge_html_template"
2362
+ end
2363
+ # verify the required parameter 'data_path' is set
2364
+ if @api_client.config.client_side_validation && data_path.nil?
2365
+ fail ArgumentError, "Missing the required parameter 'data_path' when calling TemplateMergeApi.get_merge_html_template"
2366
+ end
2367
+ # resource path
2368
+ local_var_path = "/html/{templateName}/merge".sub('{' + 'templateName' + '}', template_name.to_s)
2369
+
2370
+ # query parameters
2371
+ query_params = {}
2372
+ query_params[:'dataPath'] = data_path
2373
+ query_params[:'options'] = opts[:'options'] if !opts[:'options'].nil?
2374
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
2375
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
2376
+
2377
+ # header parameters
2378
+ header_params = {}
2379
+ # HTTP header 'Accept' (if needed)
2380
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
2381
+ # HTTP header 'Content-Type'
2382
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2383
+
2384
+ # form parameters
2385
+ form_params = {}
2386
+
2387
+ # http body (model)
2388
+ post_body = nil
2389
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2390
+ :header_params => header_params,
2391
+ :query_params => query_params,
2392
+ :form_params => form_params,
2393
+ :body => post_body,
2394
+ :return_type => 'File')
2395
+ if @api_client.config.debug
2396
+ @api_client.config.logger.debug "API called: TemplateMergeApi#get_merge_html_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2397
+ end
2398
+ return data, status_code, headers
2399
+ end
2400
+
2401
+ # Populate HTML document template with data from the request body. Result document will be saved to storage.
2402
+ #
2403
+ # @param template_name Template document name. Template document is HTML or zipped HTML.
2404
+ # @param out_path Result document path.
2405
+ # @param file A data file to populate template.
2406
+ # @param [Hash] opts the optional parameters
2407
+ # @option opts [String] :options Template merge options: reserved for further implementation.
2408
+ # @option opts [String] :folder The template document folder.
2409
+ # @option opts [String] :storage The template document and data source storage.
2410
+ # @return [File]
2411
+ def post_merge_html_template(template_name, out_path, file, opts = {})
2412
+ data, _status_code, _headers = post_merge_html_template_with_http_info(template_name, out_path, file, opts)
2413
+ return {file: data, status: _status_code, headers: _headers}
2414
+ end
2415
+
2416
+ # Populate HTML document template with data from the request body. Result document will be saved to storage.
2417
+ #
2418
+ # @param template_name Template document name. Template document is HTML or zipped HTML.
2419
+ # @param out_path Result document path.
2420
+ # @param file A data file to populate template.
2421
+ # @param [Hash] opts the optional parameters
2422
+ # @option opts [String] :options Template merge options: reserved for further implementation.
2423
+ # @option opts [String] :folder The template document folder.
2424
+ # @option opts [String] :storage The template document and data source storage.
2425
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
2426
+ def post_merge_html_template_with_http_info(template_name, out_path, file, opts = {})
2427
+ if @api_client.config.debug
2428
+ @api_client.config.logger.debug "Calling API: TemplateMergeApi.post_merge_html_template ..."
2429
+ end
2430
+ # verify the required parameter 'template_name' is set
2431
+ if @api_client.config.client_side_validation && template_name.nil?
2432
+ fail ArgumentError, "Missing the required parameter 'template_name' when calling TemplateMergeApi.post_merge_html_template"
2433
+ end
2434
+ # verify the required parameter 'out_path' is set
2435
+ if @api_client.config.client_side_validation && out_path.nil?
2436
+ fail ArgumentError, "Missing the required parameter 'out_path' when calling TemplateMergeApi.post_merge_html_template"
2437
+ end
2438
+ # verify the required parameter 'file' is set
2439
+ if @api_client.config.client_side_validation && file.nil?
2440
+ fail ArgumentError, "Missing the required parameter 'file' when calling TemplateMergeApi.post_merge_html_template"
2441
+ end
2442
+ # resource path
2443
+ local_var_path = "/html/{templateName}/merge".sub('{' + 'templateName' + '}', template_name.to_s)
2444
+
2445
+ # query parameters
2446
+ query_params = {}
2447
+ query_params[:'outPath'] = out_path
2448
+ query_params[:'options'] = opts[:'options'] if !opts[:'options'].nil?
2449
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
2450
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
2451
+
2452
+ # header parameters
2453
+ header_params = {}
2454
+ # HTTP header 'Accept' (if needed)
2455
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2456
+ # HTTP header 'Content-Type'
2457
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
2458
+
2459
+ # form parameters
2460
+ form_params = {
2461
+ file: File::open(file,'rb')
2462
+ }
2463
+
2464
+ # http body (model)
2465
+ post_body = nil
2466
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2467
+ :header_params => header_params,
2468
+ :query_params => query_params,
2469
+ :form_params => form_params,
2470
+ :body => post_body,
2471
+ :return_type => 'File')
2472
+ if @api_client.config.debug
2473
+ @api_client.config.logger.debug "API called: TemplateMergeApi#post_merge_html_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2474
+ end
2475
+ return data, status_code, headers
2476
+ end
2477
+ end
2478
+ end