cloudmersive-convert-api-client 1.6.7 → 1.6.8
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 +4 -4
- data/README.md +27 -6
- data/docs/ConvertDataApi.md +2 -2
- data/docs/ConvertWebApi.md +50 -50
- data/docs/CreateZipArchiveRequest.md +9 -0
- data/docs/EditTextApi.md +232 -12
- data/docs/FindRegexMatch.md +12 -0
- data/docs/FindStringMatch.md +10 -0
- data/docs/FindStringRegexRequest.md +10 -0
- data/docs/FindStringRegexResponse.md +10 -0
- data/docs/FindStringSimpleRequest.md +9 -0
- data/docs/FindStringSimpleResponse.md +10 -0
- data/docs/ReplaceStringRegexRequest.md +10 -0
- data/docs/ReplaceStringRegexResponse.md +9 -0
- data/docs/ReplaceStringSimpleRequest.md +10 -0
- data/docs/ReplaceStringSimpleResponse.md +9 -0
- data/docs/ZipArchiveApi.md +167 -0
- data/docs/ZipDirectory.md +10 -0
- data/docs/ZipExtractResponse.md +10 -0
- data/docs/ZipFile.md +9 -0
- data/lib/cloudmersive-convert-api-client.rb +15 -0
- data/lib/cloudmersive-convert-api-client/api/convert_data_api.rb +2 -2
- data/lib/cloudmersive-convert-api-client/api/convert_web_api.rb +61 -61
- data/lib/cloudmersive-convert-api-client/api/edit_text_api.rb +232 -12
- data/lib/cloudmersive-convert-api-client/api/zip_archive_api.rb +181 -0
- data/lib/cloudmersive-convert-api-client/models/create_zip_archive_request.rb +203 -0
- data/lib/cloudmersive-convert-api-client/models/find_regex_match.rb +231 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_match.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_regex_request.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_regex_response.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_simple_request.rb +199 -0
- data/lib/cloudmersive-convert-api-client/models/find_string_simple_response.rb +211 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_regex_request.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_regex_response.rb +199 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_simple_request.rb +209 -0
- data/lib/cloudmersive-convert-api-client/models/replace_string_simple_response.rb +199 -0
- data/lib/cloudmersive-convert-api-client/models/zip_directory.rb +213 -0
- data/lib/cloudmersive-convert-api-client/models/zip_extract_response.rb +213 -0
- data/lib/cloudmersive-convert-api-client/models/zip_file.rb +215 -0
- data/lib/cloudmersive-convert-api-client/version.rb +1 -1
- data/spec/api/convert_data_api_spec.rb +1 -1
- data/spec/api/convert_web_api_spec.rb +13 -13
- data/spec/api/edit_text_api_spec.rb +54 -6
- data/spec/api/zip_archive_api_spec.rb +70 -0
- data/spec/models/create_zip_archive_request_spec.rb +48 -0
- data/spec/models/find_regex_match_spec.rb +66 -0
- data/spec/models/find_string_match_spec.rb +54 -0
- data/spec/models/find_string_regex_request_spec.rb +54 -0
- data/spec/models/find_string_regex_response_spec.rb +54 -0
- data/spec/models/find_string_simple_request_spec.rb +48 -0
- data/spec/models/find_string_simple_response_spec.rb +54 -0
- data/spec/models/replace_string_regex_request_spec.rb +54 -0
- data/spec/models/replace_string_regex_response_spec.rb +48 -0
- data/spec/models/replace_string_simple_request_spec.rb +54 -0
- data/spec/models/replace_string_simple_response_spec.rb +48 -0
- data/spec/models/zip_directory_spec.rb +54 -0
- data/spec/models/zip_extract_response_spec.rb +54 -0
- data/spec/models/zip_file_spec.rb +48 -0
- metadata +47 -2
@@ -22,7 +22,7 @@ module CloudmersiveConvertApiClient
|
|
22
22
|
|
23
23
|
# Base 64 decode, convert base 64 string to binary content
|
24
24
|
# Decodes / converts base 64 UTF-8 text string to binary content
|
25
|
-
# @param request
|
25
|
+
# @param request Input request
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [Base64DecodeResponse]
|
28
28
|
def edit_text_base64_decode(request, opts = {})
|
@@ -32,7 +32,7 @@ module CloudmersiveConvertApiClient
|
|
32
32
|
|
33
33
|
# Base 64 decode, convert base 64 string to binary content
|
34
34
|
# Decodes / converts base 64 UTF-8 text string to binary content
|
35
|
-
# @param request
|
35
|
+
# @param request Input request
|
36
36
|
# @param [Hash] opts the optional parameters
|
37
37
|
# @return [Array<(Base64DecodeResponse, Fixnum, Hash)>] Base64DecodeResponse data, response status code and response headers
|
38
38
|
def edit_text_base64_decode_with_http_info(request, opts = {})
|
@@ -77,7 +77,7 @@ module CloudmersiveConvertApiClient
|
|
77
77
|
|
78
78
|
# Detect, check if text string is base 64 encoded
|
79
79
|
# Checks, detects if input string is base 64 encoded
|
80
|
-
# @param request
|
80
|
+
# @param request Input request
|
81
81
|
# @param [Hash] opts the optional parameters
|
82
82
|
# @return [Base64DetectResponse]
|
83
83
|
def edit_text_base64_detect(request, opts = {})
|
@@ -87,7 +87,7 @@ module CloudmersiveConvertApiClient
|
|
87
87
|
|
88
88
|
# Detect, check if text string is base 64 encoded
|
89
89
|
# Checks, detects if input string is base 64 encoded
|
90
|
-
# @param request
|
90
|
+
# @param request Input request
|
91
91
|
# @param [Hash] opts the optional parameters
|
92
92
|
# @return [Array<(Base64DetectResponse, Fixnum, Hash)>] Base64DetectResponse data, response status code and response headers
|
93
93
|
def edit_text_base64_detect_with_http_info(request, opts = {})
|
@@ -132,7 +132,7 @@ module CloudmersiveConvertApiClient
|
|
132
132
|
|
133
133
|
# Base 64 encode, convert binary or file data to a text string
|
134
134
|
# Encodes / converts binary or file data to a text string
|
135
|
-
# @param request
|
135
|
+
# @param request Input request
|
136
136
|
# @param [Hash] opts the optional parameters
|
137
137
|
# @return [Base64EncodeResponse]
|
138
138
|
def edit_text_base64_encode(request, opts = {})
|
@@ -142,7 +142,7 @@ module CloudmersiveConvertApiClient
|
|
142
142
|
|
143
143
|
# Base 64 encode, convert binary or file data to a text string
|
144
144
|
# Encodes / converts binary or file data to a text string
|
145
|
-
# @param request
|
145
|
+
# @param request Input request
|
146
146
|
# @param [Hash] opts the optional parameters
|
147
147
|
# @return [Array<(Base64EncodeResponse, Fixnum, Hash)>] Base64EncodeResponse data, response status code and response headers
|
148
148
|
def edit_text_base64_encode_with_http_info(request, opts = {})
|
@@ -304,9 +304,119 @@ module CloudmersiveConvertApiClient
|
|
304
304
|
return data, status_code, headers
|
305
305
|
end
|
306
306
|
|
307
|
+
# Find a regular expression regex in text input
|
308
|
+
# Find all occurrences of the input regular expression in the input content, and returns the matches
|
309
|
+
# @param request Input request
|
310
|
+
# @param [Hash] opts the optional parameters
|
311
|
+
# @return [FindStringRegexResponse]
|
312
|
+
def edit_text_find_regex(request, opts = {})
|
313
|
+
data, _status_code, _headers = edit_text_find_regex_with_http_info(request, opts)
|
314
|
+
return data
|
315
|
+
end
|
316
|
+
|
317
|
+
# Find a regular expression regex in text input
|
318
|
+
# Find all occurrences of the input regular expression in the input content, and returns the matches
|
319
|
+
# @param request Input request
|
320
|
+
# @param [Hash] opts the optional parameters
|
321
|
+
# @return [Array<(FindStringRegexResponse, Fixnum, Hash)>] FindStringRegexResponse data, response status code and response headers
|
322
|
+
def edit_text_find_regex_with_http_info(request, opts = {})
|
323
|
+
if @api_client.config.debugging
|
324
|
+
@api_client.config.logger.debug "Calling API: EditTextApi.edit_text_find_regex ..."
|
325
|
+
end
|
326
|
+
# verify the required parameter 'request' is set
|
327
|
+
if @api_client.config.client_side_validation && request.nil?
|
328
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_find_regex"
|
329
|
+
end
|
330
|
+
# resource path
|
331
|
+
local_var_path = "/convert/edit/text/find/regex"
|
332
|
+
|
333
|
+
# query parameters
|
334
|
+
query_params = {}
|
335
|
+
|
336
|
+
# header parameters
|
337
|
+
header_params = {}
|
338
|
+
# HTTP header 'Accept' (if needed)
|
339
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
340
|
+
# HTTP header 'Content-Type'
|
341
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
342
|
+
|
343
|
+
# form parameters
|
344
|
+
form_params = {}
|
345
|
+
|
346
|
+
# http body (model)
|
347
|
+
post_body = @api_client.object_to_http_body(request)
|
348
|
+
auth_names = ['Apikey']
|
349
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
350
|
+
:header_params => header_params,
|
351
|
+
:query_params => query_params,
|
352
|
+
:form_params => form_params,
|
353
|
+
:body => post_body,
|
354
|
+
:auth_names => auth_names,
|
355
|
+
:return_type => 'FindStringRegexResponse')
|
356
|
+
if @api_client.config.debugging
|
357
|
+
@api_client.config.logger.debug "API called: EditTextApi#edit_text_find_regex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
358
|
+
end
|
359
|
+
return data, status_code, headers
|
360
|
+
end
|
361
|
+
|
362
|
+
# Find a string in text input
|
363
|
+
# Finds all occurrences of the input string in the input content, and returns the matches
|
364
|
+
# @param request Input request
|
365
|
+
# @param [Hash] opts the optional parameters
|
366
|
+
# @return [FindStringSimpleResponse]
|
367
|
+
def edit_text_find_simple(request, opts = {})
|
368
|
+
data, _status_code, _headers = edit_text_find_simple_with_http_info(request, opts)
|
369
|
+
return data
|
370
|
+
end
|
371
|
+
|
372
|
+
# Find a string in text input
|
373
|
+
# Finds all occurrences of the input string in the input content, and returns the matches
|
374
|
+
# @param request Input request
|
375
|
+
# @param [Hash] opts the optional parameters
|
376
|
+
# @return [Array<(FindStringSimpleResponse, Fixnum, Hash)>] FindStringSimpleResponse data, response status code and response headers
|
377
|
+
def edit_text_find_simple_with_http_info(request, opts = {})
|
378
|
+
if @api_client.config.debugging
|
379
|
+
@api_client.config.logger.debug "Calling API: EditTextApi.edit_text_find_simple ..."
|
380
|
+
end
|
381
|
+
# verify the required parameter 'request' is set
|
382
|
+
if @api_client.config.client_side_validation && request.nil?
|
383
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_find_simple"
|
384
|
+
end
|
385
|
+
# resource path
|
386
|
+
local_var_path = "/convert/edit/text/find/string"
|
387
|
+
|
388
|
+
# query parameters
|
389
|
+
query_params = {}
|
390
|
+
|
391
|
+
# header parameters
|
392
|
+
header_params = {}
|
393
|
+
# HTTP header 'Accept' (if needed)
|
394
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
395
|
+
# HTTP header 'Content-Type'
|
396
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
397
|
+
|
398
|
+
# form parameters
|
399
|
+
form_params = {}
|
400
|
+
|
401
|
+
# http body (model)
|
402
|
+
post_body = @api_client.object_to_http_body(request)
|
403
|
+
auth_names = ['Apikey']
|
404
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
405
|
+
:header_params => header_params,
|
406
|
+
:query_params => query_params,
|
407
|
+
:form_params => form_params,
|
408
|
+
:body => post_body,
|
409
|
+
:auth_names => auth_names,
|
410
|
+
:return_type => 'FindStringSimpleResponse')
|
411
|
+
if @api_client.config.debugging
|
412
|
+
@api_client.config.logger.debug "API called: EditTextApi#edit_text_find_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
413
|
+
end
|
414
|
+
return data, status_code, headers
|
415
|
+
end
|
416
|
+
|
307
417
|
# Remove whitespace from text string
|
308
418
|
# Removes all whitespace from text, leaving behind only non-whitespace characters. Whitespace includes newlines, spaces and other whitespace characters.
|
309
|
-
# @param request
|
419
|
+
# @param request Input request
|
310
420
|
# @param [Hash] opts the optional parameters
|
311
421
|
# @return [RemoveWhitespaceFromTextResponse]
|
312
422
|
def edit_text_remove_all_whitespace(request, opts = {})
|
@@ -316,7 +426,7 @@ module CloudmersiveConvertApiClient
|
|
316
426
|
|
317
427
|
# Remove whitespace from text string
|
318
428
|
# Removes all whitespace from text, leaving behind only non-whitespace characters. Whitespace includes newlines, spaces and other whitespace characters.
|
319
|
-
# @param request
|
429
|
+
# @param request Input request
|
320
430
|
# @param [Hash] opts the optional parameters
|
321
431
|
# @return [Array<(RemoveWhitespaceFromTextResponse, Fixnum, Hash)>] RemoveWhitespaceFromTextResponse data, response status code and response headers
|
322
432
|
def edit_text_remove_all_whitespace_with_http_info(request, opts = {})
|
@@ -361,7 +471,7 @@ module CloudmersiveConvertApiClient
|
|
361
471
|
|
362
472
|
# Remove HTML from text string
|
363
473
|
# Removes HTML from text, leaving behind only text. Formatted text will become plain text. Important for protecting against HTML and Cross-Site-Scripting attacks.
|
364
|
-
# @param request
|
474
|
+
# @param request Input request
|
365
475
|
# @param [Hash] opts the optional parameters
|
366
476
|
# @return [RemoveHtmlFromTextResponse]
|
367
477
|
def edit_text_remove_html(request, opts = {})
|
@@ -371,7 +481,7 @@ module CloudmersiveConvertApiClient
|
|
371
481
|
|
372
482
|
# Remove HTML from text string
|
373
483
|
# Removes HTML from text, leaving behind only text. Formatted text will become plain text. Important for protecting against HTML and Cross-Site-Scripting attacks.
|
374
|
-
# @param request
|
484
|
+
# @param request Input request
|
375
485
|
# @param [Hash] opts the optional parameters
|
376
486
|
# @return [Array<(RemoveHtmlFromTextResponse, Fixnum, Hash)>] RemoveHtmlFromTextResponse data, response status code and response headers
|
377
487
|
def edit_text_remove_html_with_http_info(request, opts = {})
|
@@ -414,6 +524,116 @@ module CloudmersiveConvertApiClient
|
|
414
524
|
return data, status_code, headers
|
415
525
|
end
|
416
526
|
|
527
|
+
# Replace a string in text with a regex regular expression string
|
528
|
+
# Replaces all occurrences of the input regular expression regex string in the input content, and returns the result
|
529
|
+
# @param request Input request
|
530
|
+
# @param [Hash] opts the optional parameters
|
531
|
+
# @return [ReplaceStringRegexResponse]
|
532
|
+
def edit_text_replace_regex(request, opts = {})
|
533
|
+
data, _status_code, _headers = edit_text_replace_regex_with_http_info(request, opts)
|
534
|
+
return data
|
535
|
+
end
|
536
|
+
|
537
|
+
# Replace a string in text with a regex regular expression string
|
538
|
+
# Replaces all occurrences of the input regular expression regex string in the input content, and returns the result
|
539
|
+
# @param request Input request
|
540
|
+
# @param [Hash] opts the optional parameters
|
541
|
+
# @return [Array<(ReplaceStringRegexResponse, Fixnum, Hash)>] ReplaceStringRegexResponse data, response status code and response headers
|
542
|
+
def edit_text_replace_regex_with_http_info(request, opts = {})
|
543
|
+
if @api_client.config.debugging
|
544
|
+
@api_client.config.logger.debug "Calling API: EditTextApi.edit_text_replace_regex ..."
|
545
|
+
end
|
546
|
+
# verify the required parameter 'request' is set
|
547
|
+
if @api_client.config.client_side_validation && request.nil?
|
548
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_replace_regex"
|
549
|
+
end
|
550
|
+
# resource path
|
551
|
+
local_var_path = "/convert/edit/text/replace/regex"
|
552
|
+
|
553
|
+
# query parameters
|
554
|
+
query_params = {}
|
555
|
+
|
556
|
+
# header parameters
|
557
|
+
header_params = {}
|
558
|
+
# HTTP header 'Accept' (if needed)
|
559
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
560
|
+
# HTTP header 'Content-Type'
|
561
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
562
|
+
|
563
|
+
# form parameters
|
564
|
+
form_params = {}
|
565
|
+
|
566
|
+
# http body (model)
|
567
|
+
post_body = @api_client.object_to_http_body(request)
|
568
|
+
auth_names = ['Apikey']
|
569
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
570
|
+
:header_params => header_params,
|
571
|
+
:query_params => query_params,
|
572
|
+
:form_params => form_params,
|
573
|
+
:body => post_body,
|
574
|
+
:auth_names => auth_names,
|
575
|
+
:return_type => 'ReplaceStringRegexResponse')
|
576
|
+
if @api_client.config.debugging
|
577
|
+
@api_client.config.logger.debug "API called: EditTextApi#edit_text_replace_regex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
578
|
+
end
|
579
|
+
return data, status_code, headers
|
580
|
+
end
|
581
|
+
|
582
|
+
# Replace a string in text with another string value
|
583
|
+
# Replaces all occurrences of the input string in the input content, and returns the result
|
584
|
+
# @param request Input request
|
585
|
+
# @param [Hash] opts the optional parameters
|
586
|
+
# @return [ReplaceStringSimpleResponse]
|
587
|
+
def edit_text_replace_simple(request, opts = {})
|
588
|
+
data, _status_code, _headers = edit_text_replace_simple_with_http_info(request, opts)
|
589
|
+
return data
|
590
|
+
end
|
591
|
+
|
592
|
+
# Replace a string in text with another string value
|
593
|
+
# Replaces all occurrences of the input string in the input content, and returns the result
|
594
|
+
# @param request Input request
|
595
|
+
# @param [Hash] opts the optional parameters
|
596
|
+
# @return [Array<(ReplaceStringSimpleResponse, Fixnum, Hash)>] ReplaceStringSimpleResponse data, response status code and response headers
|
597
|
+
def edit_text_replace_simple_with_http_info(request, opts = {})
|
598
|
+
if @api_client.config.debugging
|
599
|
+
@api_client.config.logger.debug "Calling API: EditTextApi.edit_text_replace_simple ..."
|
600
|
+
end
|
601
|
+
# verify the required parameter 'request' is set
|
602
|
+
if @api_client.config.client_side_validation && request.nil?
|
603
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling EditTextApi.edit_text_replace_simple"
|
604
|
+
end
|
605
|
+
# resource path
|
606
|
+
local_var_path = "/convert/edit/text/replace/string"
|
607
|
+
|
608
|
+
# query parameters
|
609
|
+
query_params = {}
|
610
|
+
|
611
|
+
# header parameters
|
612
|
+
header_params = {}
|
613
|
+
# HTTP header 'Accept' (if needed)
|
614
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
615
|
+
# HTTP header 'Content-Type'
|
616
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
617
|
+
|
618
|
+
# form parameters
|
619
|
+
form_params = {}
|
620
|
+
|
621
|
+
# http body (model)
|
622
|
+
post_body = @api_client.object_to_http_body(request)
|
623
|
+
auth_names = ['Apikey']
|
624
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
625
|
+
:header_params => header_params,
|
626
|
+
:query_params => query_params,
|
627
|
+
:form_params => form_params,
|
628
|
+
:body => post_body,
|
629
|
+
:auth_names => auth_names,
|
630
|
+
:return_type => 'ReplaceStringSimpleResponse')
|
631
|
+
if @api_client.config.debugging
|
632
|
+
@api_client.config.logger.debug "API called: EditTextApi#edit_text_replace_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
633
|
+
end
|
634
|
+
return data, status_code, headers
|
635
|
+
end
|
636
|
+
|
417
637
|
# Detect text encoding of file
|
418
638
|
# Checks text encoding of file
|
419
639
|
# @param input_file Input file to perform the operation on.
|
@@ -472,7 +692,7 @@ module CloudmersiveConvertApiClient
|
|
472
692
|
|
473
693
|
# Trim leading and trailing whitespace from text string
|
474
694
|
# Trim leading and trailing whitespace from text, leaving behind a trimmed string. Whitespace includes newlines, spaces and other whitespace characters.
|
475
|
-
# @param request
|
695
|
+
# @param request Input request
|
476
696
|
# @param [Hash] opts the optional parameters
|
477
697
|
# @return [RemoveWhitespaceFromTextResponse]
|
478
698
|
def edit_text_trim_whitespace(request, opts = {})
|
@@ -482,7 +702,7 @@ module CloudmersiveConvertApiClient
|
|
482
702
|
|
483
703
|
# Trim leading and trailing whitespace from text string
|
484
704
|
# Trim leading and trailing whitespace from text, leaving behind a trimmed string. Whitespace includes newlines, spaces and other whitespace characters.
|
485
|
-
# @param request
|
705
|
+
# @param request Input request
|
486
706
|
# @param [Hash] opts the optional parameters
|
487
707
|
# @return [Array<(RemoveWhitespaceFromTextResponse, Fixnum, Hash)>] RemoveWhitespaceFromTextResponse data, response status code and response headers
|
488
708
|
def edit_text_trim_whitespace_with_http_info(request, opts = {})
|
@@ -0,0 +1,181 @@
|
|
1
|
+
=begin
|
2
|
+
#convertapi
|
3
|
+
|
4
|
+
#Convert API lets you effortlessly convert file formats and types.
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module CloudmersiveConvertApiClient
|
16
|
+
class ZipArchiveApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Compress files to create a new zip archive
|
24
|
+
# Create a new zip archive by compressing input files.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Object]
|
27
|
+
def zip_archive_zip_create(opts = {})
|
28
|
+
data, _status_code, _headers = zip_archive_zip_create_with_http_info(opts)
|
29
|
+
return data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Compress files to create a new zip archive
|
33
|
+
# Create a new zip archive by compressing input files.
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
36
|
+
def zip_archive_zip_create_with_http_info(opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug "Calling API: ZipArchiveApi.zip_archive_zip_create ..."
|
39
|
+
end
|
40
|
+
# resource path
|
41
|
+
local_var_path = "/convert/archive/zip/create"
|
42
|
+
|
43
|
+
# query parameters
|
44
|
+
query_params = {}
|
45
|
+
|
46
|
+
# header parameters
|
47
|
+
header_params = {}
|
48
|
+
# HTTP header 'Accept' (if needed)
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
50
|
+
|
51
|
+
# form parameters
|
52
|
+
form_params = {}
|
53
|
+
|
54
|
+
# http body (model)
|
55
|
+
post_body = nil
|
56
|
+
auth_names = ['Apikey']
|
57
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
58
|
+
:header_params => header_params,
|
59
|
+
:query_params => query_params,
|
60
|
+
:form_params => form_params,
|
61
|
+
:body => post_body,
|
62
|
+
:auth_names => auth_names,
|
63
|
+
:return_type => 'Object')
|
64
|
+
if @api_client.config.debugging
|
65
|
+
@api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
66
|
+
end
|
67
|
+
return data, status_code, headers
|
68
|
+
end
|
69
|
+
|
70
|
+
# Compress files and folders to create a new zip archive with advanced options
|
71
|
+
# Create a new zip archive by compressing input files, folders and leverage advanced options to control the structure of the resulting zip archive.
|
72
|
+
# @param request Input request
|
73
|
+
# @param [Hash] opts the optional parameters
|
74
|
+
# @return [Object]
|
75
|
+
def zip_archive_zip_create_advanced(request, opts = {})
|
76
|
+
data, _status_code, _headers = zip_archive_zip_create_advanced_with_http_info(request, opts)
|
77
|
+
return data
|
78
|
+
end
|
79
|
+
|
80
|
+
# Compress files and folders to create a new zip archive with advanced options
|
81
|
+
# Create a new zip archive by compressing input files, folders and leverage advanced options to control the structure of the resulting zip archive.
|
82
|
+
# @param request Input request
|
83
|
+
# @param [Hash] opts the optional parameters
|
84
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
85
|
+
def zip_archive_zip_create_advanced_with_http_info(request, opts = {})
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "Calling API: ZipArchiveApi.zip_archive_zip_create_advanced ..."
|
88
|
+
end
|
89
|
+
# verify the required parameter 'request' is set
|
90
|
+
if @api_client.config.client_side_validation && request.nil?
|
91
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ZipArchiveApi.zip_archive_zip_create_advanced"
|
92
|
+
end
|
93
|
+
# resource path
|
94
|
+
local_var_path = "/convert/archive/zip/create/advanced"
|
95
|
+
|
96
|
+
# query parameters
|
97
|
+
query_params = {}
|
98
|
+
|
99
|
+
# header parameters
|
100
|
+
header_params = {}
|
101
|
+
# HTTP header 'Accept' (if needed)
|
102
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
103
|
+
# HTTP header 'Content-Type'
|
104
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
105
|
+
|
106
|
+
# form parameters
|
107
|
+
form_params = {}
|
108
|
+
|
109
|
+
# http body (model)
|
110
|
+
post_body = @api_client.object_to_http_body(request)
|
111
|
+
auth_names = ['Apikey']
|
112
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
113
|
+
:header_params => header_params,
|
114
|
+
:query_params => query_params,
|
115
|
+
:form_params => form_params,
|
116
|
+
:body => post_body,
|
117
|
+
:auth_names => auth_names,
|
118
|
+
:return_type => 'Object')
|
119
|
+
if @api_client.config.debugging
|
120
|
+
@api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_create_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
121
|
+
end
|
122
|
+
return data, status_code, headers
|
123
|
+
end
|
124
|
+
|
125
|
+
# Extract, decompress files and folders from a zip archive
|
126
|
+
# Extracts a zip archive by decompressing files, and folders.
|
127
|
+
# @param input_file Input file to perform the operation on.
|
128
|
+
# @param [Hash] opts the optional parameters
|
129
|
+
# @return [ZipExtractResponse]
|
130
|
+
def zip_archive_zip_extract(input_file, opts = {})
|
131
|
+
data, _status_code, _headers = zip_archive_zip_extract_with_http_info(input_file, opts)
|
132
|
+
return data
|
133
|
+
end
|
134
|
+
|
135
|
+
# Extract, decompress files and folders from a zip archive
|
136
|
+
# Extracts a zip archive by decompressing files, and folders.
|
137
|
+
# @param input_file Input file to perform the operation on.
|
138
|
+
# @param [Hash] opts the optional parameters
|
139
|
+
# @return [Array<(ZipExtractResponse, Fixnum, Hash)>] ZipExtractResponse data, response status code and response headers
|
140
|
+
def zip_archive_zip_extract_with_http_info(input_file, opts = {})
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug "Calling API: ZipArchiveApi.zip_archive_zip_extract ..."
|
143
|
+
end
|
144
|
+
# verify the required parameter 'input_file' is set
|
145
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
146
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling ZipArchiveApi.zip_archive_zip_extract"
|
147
|
+
end
|
148
|
+
# resource path
|
149
|
+
local_var_path = "/convert/archive/zip/extract"
|
150
|
+
|
151
|
+
# query parameters
|
152
|
+
query_params = {}
|
153
|
+
|
154
|
+
# header parameters
|
155
|
+
header_params = {}
|
156
|
+
# HTTP header 'Accept' (if needed)
|
157
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
158
|
+
# HTTP header 'Content-Type'
|
159
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
160
|
+
|
161
|
+
# form parameters
|
162
|
+
form_params = {}
|
163
|
+
form_params["inputFile"] = input_file
|
164
|
+
|
165
|
+
# http body (model)
|
166
|
+
post_body = nil
|
167
|
+
auth_names = ['Apikey']
|
168
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
169
|
+
:header_params => header_params,
|
170
|
+
:query_params => query_params,
|
171
|
+
:form_params => form_params,
|
172
|
+
:body => post_body,
|
173
|
+
:auth_names => auth_names,
|
174
|
+
:return_type => 'ZipExtractResponse')
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
177
|
+
end
|
178
|
+
return data, status_code, headers
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|