Class: CloudmersiveConvertApiClient::ValidateDocumentApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudmersive-convert-api-client/api/validate_document_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ValidateDocumentApi

Returns a new instance of ValidateDocumentApi.



19
20
21
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#validate_document_autodetect_validation(input_file, opts = {}) ⇒ AutodetectDocumentValidationResult

Autodetect content type and validate Automatically detect the type of content, verify and validate that the content is indeed fully valid at depth, and then report the validation result.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 28

def validate_document_autodetect_validation(input_file, opts = {})
  data, _status_code, _headers = validate_document_autodetect_validation_with_http_info(input_file, opts)
  return data
end

#validate_document_autodetect_validation_with_http_info(input_file, opts = {}) ⇒ Array<(AutodetectDocumentValidationResult, Fixnum, Hash)>

Autodetect content type and validate Automatically detect the type of content, verify and validate that the content is indeed fully valid at depth, and then report the validation result.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 38

def validate_document_autodetect_validation_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_autodetect_validation ..."
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_autodetect_validation"
  end
  # resource path
  local_var_path = "/convert/validate/autodetect"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["inputFile"] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutodetectDocumentValidationResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_autodetect_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_document_docx_validation(input_file, opts = {}) ⇒ DocumentValidationResult

Validate a Word document (DOCX) Validate a Word document (DOCX); if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



84
85
86
87
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 84

def validate_document_docx_validation(input_file, opts = {})
  data, _status_code, _headers = validate_document_docx_validation_with_http_info(input_file, opts)
  return data
end

#validate_document_docx_validation_with_http_info(input_file, opts = {}) ⇒ Array<(DocumentValidationResult, Fixnum, Hash)>

Validate a Word document (DOCX) Validate a Word document (DOCX); if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocumentValidationResult, Fixnum, Hash)>)

    DocumentValidationResult data, response status code and response headers



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 94

def validate_document_docx_validation_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_docx_validation ..."
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_docx_validation"
  end
  # resource path
  local_var_path = "/convert/validate/docx"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["inputFile"] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentValidationResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_docx_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_document_executable_validation(input_file, opts = {}) ⇒ DocumentValidationResult

Validate if a file is executable Validate if an input file is a binary executable file; if the document is not valid

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



140
141
142
143
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 140

def validate_document_executable_validation(input_file, opts = {})
  data, _status_code, _headers = validate_document_executable_validation_with_http_info(input_file, opts)
  return data
end

#validate_document_executable_validation_with_http_info(input_file, opts = {}) ⇒ Array<(DocumentValidationResult, Fixnum, Hash)>

Validate if a file is executable Validate if an input file is a binary executable file; if the document is not valid

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocumentValidationResult, Fixnum, Hash)>)

    DocumentValidationResult data, response status code and response headers



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 150

def validate_document_executable_validation_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_executable_validation ..."
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_executable_validation"
  end
  # resource path
  local_var_path = "/convert/validate/executable"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["inputFile"] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentValidationResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_executable_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_document_json_validation(input_file, opts = {}) ⇒ DocumentValidationResult

Validate a JSON file Validate a JSON (JavaScript Object Notation) document file; if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



196
197
198
199
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 196

def validate_document_json_validation(input_file, opts = {})
  data, _status_code, _headers = validate_document_json_validation_with_http_info(input_file, opts)
  return data
end

#validate_document_json_validation_with_http_info(input_file, opts = {}) ⇒ Array<(DocumentValidationResult, Fixnum, Hash)>

Validate a JSON file Validate a JSON (JavaScript Object Notation) document file; if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocumentValidationResult, Fixnum, Hash)>)

    DocumentValidationResult data, response status code and response headers



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 206

def validate_document_json_validation_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_json_validation ..."
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_json_validation"
  end
  # resource path
  local_var_path = "/convert/validate/json"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["inputFile"] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentValidationResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_json_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_document_pdf_validation(input_file, opts = {}) ⇒ DocumentValidationResult

Validate a PDF document file Validate a PDF document; if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



252
253
254
255
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 252

def validate_document_pdf_validation(input_file, opts = {})
  data, _status_code, _headers = validate_document_pdf_validation_with_http_info(input_file, opts)
  return data
end

#validate_document_pdf_validation_with_http_info(input_file, opts = {}) ⇒ Array<(DocumentValidationResult, Fixnum, Hash)>

Validate a PDF document file Validate a PDF document; if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocumentValidationResult, Fixnum, Hash)>)

    DocumentValidationResult data, response status code and response headers



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 262

def validate_document_pdf_validation_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_pdf_validation ..."
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_pdf_validation"
  end
  # resource path
  local_var_path = "/convert/validate/pdf"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["inputFile"] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentValidationResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_pdf_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_document_pptx_validation(input_file, opts = {}) ⇒ DocumentValidationResult

Validate a PowerPoint presentation (PPTX) Validate a PowerPoint presentation (PPTX); if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



308
309
310
311
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 308

def validate_document_pptx_validation(input_file, opts = {})
  data, _status_code, _headers = validate_document_pptx_validation_with_http_info(input_file, opts)
  return data
end

#validate_document_pptx_validation_with_http_info(input_file, opts = {}) ⇒ Array<(DocumentValidationResult, Fixnum, Hash)>

Validate a PowerPoint presentation (PPTX) Validate a PowerPoint presentation (PPTX); if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocumentValidationResult, Fixnum, Hash)>)

    DocumentValidationResult data, response status code and response headers



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 318

def validate_document_pptx_validation_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_pptx_validation ..."
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_pptx_validation"
  end
  # resource path
  local_var_path = "/convert/validate/pptx"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["inputFile"] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentValidationResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_pptx_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_document_xlsx_validation(input_file, opts = {}) ⇒ DocumentValidationResult

Validate a Excel document (XLSX) Validate a Excel document (XLSX); if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



364
365
366
367
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 364

def validate_document_xlsx_validation(input_file, opts = {})
  data, _status_code, _headers = validate_document_xlsx_validation_with_http_info(input_file, opts)
  return data
end

#validate_document_xlsx_validation_with_http_info(input_file, opts = {}) ⇒ Array<(DocumentValidationResult, Fixnum, Hash)>

Validate a Excel document (XLSX) Validate a Excel document (XLSX); if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocumentValidationResult, Fixnum, Hash)>)

    DocumentValidationResult data, response status code and response headers



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 374

def validate_document_xlsx_validation_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_xlsx_validation ..."
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_xlsx_validation"
  end
  # resource path
  local_var_path = "/convert/validate/xlsx"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["inputFile"] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentValidationResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_xlsx_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_document_xml_validation(input_file, opts = {}) ⇒ DocumentValidationResult

Validate an XML file Validate an XML document file; if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



420
421
422
423
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 420

def validate_document_xml_validation(input_file, opts = {})
  data, _status_code, _headers = validate_document_xml_validation_with_http_info(input_file, opts)
  return data
end

#validate_document_xml_validation_with_http_info(input_file, opts = {}) ⇒ Array<(DocumentValidationResult, Fixnum, Hash)>

Validate an XML file Validate an XML document file; if the document is not valid, identifies the errors in the document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocumentValidationResult, Fixnum, Hash)>)

    DocumentValidationResult data, response status code and response headers



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/cloudmersive-convert-api-client/api/validate_document_api.rb', line 430

def validate_document_xml_validation_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ValidateDocumentApi.validate_document_xml_validation ..."
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ValidateDocumentApi.validate_document_xml_validation"
  end
  # resource path
  local_var_path = "/convert/validate/xml"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["inputFile"] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentValidationResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ValidateDocumentApi#validate_document_xml_validation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end