groupdocs_conversion_cloud 20.3 → 20.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c3c7c50f52bebe361a5287be6153e61839710e3
4
- data.tar.gz: 4888443dd7af34e54f64e5b9a28904aa7148ecc5
3
+ metadata.gz: 18da3cb06a0d9903c15f85613514b8d6661cfd36
4
+ data.tar.gz: 4fb6ec826fdba39736a67205a373a9ccbae42b17
5
5
  SHA512:
6
- metadata.gz: 816e949bcb30c9f60aabb91070d7748652578a33a47b0b6bd69f755cc7befc7ae1516aef6c1a8524cb944e96620c725e43761b04dedf2180097c158a86516026
7
- data.tar.gz: 24aa866899d059850ed444c643dc5a17f7052750bb92e02527e369fe1c711bc5f261765a9419779263a85b719bea44962a6219c867ffa193391173fbddf4f494
6
+ metadata.gz: 49f18a2e0dbe85e1931f53b710ffe33111a9e8e1e969134df67a27805144bbb3175153412cc504c76d33e0738ea37cf46e0b2b9ab89d7330878b632ae614719e
7
+ data.tar.gz: 10f8f7cef692322788b431642cc177b150d882de37f24a0e6df3792f4acb857842509783a82a934c431108968f9be1bcc2a1e10bca9442658d2f9cc4ec0ae5c0
@@ -117,6 +117,73 @@ module GroupDocsConversionCloud
117
117
  end
118
118
 
119
119
 
120
+ # Converts input document file to format specified
121
+ #
122
+ # @param request convert_document_direct_request
123
+ # @return [File]
124
+ def convert_document_direct(request)
125
+ data, _status_code, _headers = convert_document_direct_with_http_info(request)
126
+ data
127
+ end
128
+
129
+ # Converts input document file to format specified
130
+ #
131
+ # @param request convert_document_direct_request
132
+ # @return [Array<(File, Fixnum, Hash)>]
133
+ # File data, response status code and response headers
134
+ def convert_document_direct_with_http_info(request)
135
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? ConvertDocumentDirectRequest
136
+
137
+ @api_client.config.logger.debug 'Calling API: ConvertApi.convert_document_direct ...' if @api_client.config.debugging
138
+ # verify the required parameter 'format' is set
139
+ raise ArgumentError, 'Missing the required parameter format when calling ConvertApi.convert_document_direct' if @api_client.config.client_side_validation && request.format.nil?
140
+ # verify the required parameter 'file' is set
141
+ raise ArgumentError, 'Missing the required parameter file when calling ConvertApi.convert_document_direct' if @api_client.config.client_side_validation && request.file.nil?
142
+ # resource path
143
+ local_var_path = '/conversion'
144
+
145
+ # query parameters
146
+ query_params = {}
147
+ query_params[downcase_first_letter('format')] = request.format
148
+
149
+ if local_var_path.include? ('{' + downcase_first_letter('fromPage') + '}')
150
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('fromPage') + '}', request.from_page.to_s)
151
+ else
152
+ query_params[downcase_first_letter('fromPage')] = request.from_page unless request.from_page.nil?
153
+ end
154
+ if local_var_path.include? ('{' + downcase_first_letter('pagesCount') + '}')
155
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('pagesCount') + '}', request.pages_count.to_s)
156
+ else
157
+ query_params[downcase_first_letter('pagesCount')] = request.pages_count unless request.pages_count.nil?
158
+ end
159
+
160
+ # header parameters
161
+ header_params = {}
162
+ # HTTP header 'Accept' (if needed)
163
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
164
+ # HTTP header 'Content-Type'
165
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
166
+
167
+ # form parameters
168
+ form_params = {}
169
+ form_params[downcase_first_letter('File')] = request.file
170
+
171
+ # http body (model)
172
+ post_body = nil
173
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
174
+ header_params: header_params,
175
+ query_params: query_params,
176
+ form_params: form_params,
177
+ body: post_body,
178
+ access_token: get_access_token,
179
+ return_type: 'File')
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug "API called:
182
+ ConvertApi#convert_document_direct\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
+ end
184
+ [data, status_code, headers]
185
+ end
186
+
120
187
  #
121
188
  # Helper method to convert first letter to downcase
122
189
  #
@@ -216,3 +283,60 @@ module GroupDocsConversionCloud
216
283
  end
217
284
  end
218
285
  end
286
+ #
287
+ # --------------------------------------------------------------------------------------------------------------------
288
+ # <copyright company="Aspose Pty Ltd" file="convert_document_direct_request.rb">
289
+ # Copyright (c) 2003-2020 Aspose Pty Ltd
290
+ # </copyright>
291
+ # <summary>
292
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
293
+ # of this software and associated documentation files (the "Software"), to deal
294
+ # in the Software without restriction, including without limitation the rights
295
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
296
+ # copies of the Software, and to permit persons to whom the Software is
297
+ # furnished to do so, subject to the following conditions:
298
+ #
299
+ # The above copyright notice and this permission notice shall be included in all
300
+ # copies or substantial portions of the Software.
301
+ #
302
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
303
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
304
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
305
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
306
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
307
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
308
+ # SOFTWARE.
309
+ # </summary>
310
+ # --------------------------------------------------------------------------------------------------------------------
311
+ #
312
+
313
+ module GroupDocsConversionCloud
314
+
315
+ #
316
+ # Request model for convert_document_direct operation.
317
+ #
318
+ class ConvertDocumentDirectRequest
319
+
320
+ # Requested conversion format
321
+ attr_accessor :format
322
+ # Input file to convert
323
+ attr_accessor :file
324
+ # Page start conversion from
325
+ attr_accessor :from_page
326
+ # Number of pages to convert
327
+ attr_accessor :pages_count
328
+
329
+ #
330
+ # Initializes a new instance.
331
+ # @param format Requested conversion format
332
+ # @param file Input file to convert
333
+ # @param from_page Page start conversion from
334
+ # @param pages_count Number of pages to convert
335
+ def initialize(format, file, from_page = nil, pages_count = nil)
336
+ self.format = format
337
+ self.file = file
338
+ self.from_page = from_page
339
+ self.pages_count = pages_count
340
+ end
341
+ end
342
+ end
@@ -25,5 +25,5 @@
25
25
  # --------------------------------------------------------------------------------------------------------------------
26
26
  #
27
27
  module GroupDocsConversionCloud
28
- VERSION = "20.3".freeze
28
+ VERSION = "20.11".freeze
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupdocs_conversion_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '20.3'
4
+ version: '20.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - GroupDocs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-31 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday