Class: CloudmersiveConvertApiClient::ZipArchiveApi
- Inherits:
-
Object
- Object
- CloudmersiveConvertApiClient::ZipArchiveApi
- Defined in:
- lib/cloudmersive-convert-api-client/api/zip_archive_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ ZipArchiveApi
constructor
A new instance of ZipArchiveApi.
-
#zip_archive_zip_create(opts = {}) ⇒ Object
Compress files to create a new zip archive Create a new zip archive by compressing input files.
-
#zip_archive_zip_create_advanced(request, opts = {}) ⇒ Object
Compress files and folders to create a new zip archive with advanced options Create a new zip archive by compressing input files, folders and leverage advanced options to control the structure of the resulting zip archive.
-
#zip_archive_zip_create_advanced_with_http_info(request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Compress files and folders to create a new zip archive with advanced options Create a new zip archive by compressing input files, folders and leverage advanced options to control the structure of the resulting zip archive.
-
#zip_archive_zip_create_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Compress files to create a new zip archive Create a new zip archive by compressing input files.
-
#zip_archive_zip_extract(input_file, opts = {}) ⇒ ZipExtractResponse
Extract, decompress files and folders from a zip archive Extracts a zip archive by decompressing files, and folders.
-
#zip_archive_zip_extract_with_http_info(input_file, opts = {}) ⇒ Array<(ZipExtractResponse, Fixnum, Hash)>
Extract, decompress files and folders from a zip archive Extracts a zip archive by decompressing files, and folders.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ZipArchiveApi
Returns a new instance of ZipArchiveApi.
19 20 21 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#zip_archive_zip_create(opts = {}) ⇒ Object
Compress files to create a new zip archive Create a new zip archive by compressing input files.
27 28 29 30 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 27 def zip_archive_zip_create(opts = {}) data, _status_code, _headers = zip_archive_zip_create_with_http_info(opts) return data end |
#zip_archive_zip_create_advanced(request, opts = {}) ⇒ Object
Compress files and folders to create a new zip archive with advanced options Create a new zip archive by compressing input files, folders and leverage advanced options to control the structure of the resulting zip archive.
75 76 77 78 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 75 def zip_archive_zip_create_advanced(request, opts = {}) data, _status_code, _headers = zip_archive_zip_create_advanced_with_http_info(request, opts) return data end |
#zip_archive_zip_create_advanced_with_http_info(request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Compress files and folders to create a new zip archive with advanced options Create a new zip archive by compressing input files, folders and leverage advanced options to control the structure of the resulting zip archive.
85 86 87 88 89 90 91 92 93 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 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 85 def zip_archive_zip_create_advanced_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ZipArchiveApi.zip_archive_zip_create_advanced ..." end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling ZipArchiveApi.zip_archive_zip_create_advanced" end # resource path local_var_path = "/convert/archive/zip/create/advanced" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) 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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_create_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#zip_archive_zip_create_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Compress files to create a new zip archive Create a new zip archive by compressing input files.
36 37 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 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 36 def zip_archive_zip_create_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ZipArchiveApi.zip_archive_zip_create ..." end # resource path local_var_path = "/convert/archive/zip/create" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # form parameters form_params = {} # 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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#zip_archive_zip_extract(input_file, opts = {}) ⇒ ZipExtractResponse
Extract, decompress files and folders from a zip archive Extracts a zip archive by decompressing files, and folders.
130 131 132 133 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 130 def zip_archive_zip_extract(input_file, opts = {}) data, _status_code, _headers = zip_archive_zip_extract_with_http_info(input_file, opts) return data end |
#zip_archive_zip_extract_with_http_info(input_file, opts = {}) ⇒ Array<(ZipExtractResponse, Fixnum, Hash)>
Extract, decompress files and folders from a zip archive Extracts a zip archive by decompressing files, and folders.
140 141 142 143 144 145 146 147 148 149 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 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 140 def zip_archive_zip_extract_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ZipArchiveApi.zip_archive_zip_extract ..." 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 ZipArchiveApi.zip_archive_zip_extract" end # resource path local_var_path = "/convert/archive/zip/extract" # 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 => 'ZipExtractResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |