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(input_file1, opts = {}) ⇒ String
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(input_file1, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Compress files to create a new zip archive Create a new zip archive by compressing input files.
-
#zip_archive_zip_decrypt(input_file, zip_password, opts = {}) ⇒ Object
Decrypt and remove password protection on a zip file Decrypts and removes password protection from an encrypted zip file with the specified password.
-
#zip_archive_zip_decrypt_with_http_info(input_file, zip_password, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Decrypt and remove password protection on a zip file Decrypts and removes password protection from an encrypted zip file with the specified password.
-
#zip_archive_zip_encrypt_advanced(encryption_request, opts = {}) ⇒ Object
Encrypt and password protect a zip file Encrypts and password protects an existing zip file with the specified password and encryption algorithm.
-
#zip_archive_zip_encrypt_advanced_with_http_info(encryption_request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Encrypt and password protect a zip file Encrypts and password protects an existing zip file with the specified password and encryption algorithm.
-
#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(input_file1, opts = {}) ⇒ String
Compress files to create a new zip archive Create a new zip archive by compressing input files.
36 37 38 39 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 36 def zip_archive_zip_create(input_file1, opts = {}) data, _status_code, _headers = zip_archive_zip_create_with_http_info(input_file1, opts) 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.
109 110 111 112 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 109 def zip_archive_zip_create_advanced(request, opts = {}) data, _status_code, _headers = zip_archive_zip_create_advanced_with_http_info(request, opts) 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.
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 119 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(input_file1, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Compress files to create a new zip archive Create a new zip archive by compressing input files.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 55 def zip_archive_zip_create_with_http_info(input_file1, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_create ...' end # verify the required parameter 'input_file1' is set if @api_client.config.client_side_validation && input_file1.nil? fail ArgumentError, "Missing the required parameter 'input_file1' when calling 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['inputFile1'] = input_file1 form_params['inputFile2'] = opts[:'input_file2'] if !opts[:'input_file2'].nil? form_params['inputFile3'] = opts[:'input_file3'] if !opts[:'input_file3'].nil? form_params['inputFile4'] = opts[:'input_file4'] if !opts[:'input_file4'].nil? form_params['inputFile5'] = opts[:'input_file5'] if !opts[:'input_file5'].nil? form_params['inputFile6'] = opts[:'input_file6'] if !opts[:'input_file6'].nil? form_params['inputFile7'] = opts[:'input_file7'] if !opts[:'input_file7'].nil? form_params['inputFile8'] = opts[:'input_file8'] if !opts[:'input_file8'].nil? form_params['inputFile9'] = opts[:'input_file9'] if !opts[:'input_file9'].nil? form_params['inputFile10'] = opts[:'input_file10'] if !opts[:'input_file10'].nil? # 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 => 'String') 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_decrypt(input_file, zip_password, opts = {}) ⇒ Object
Decrypt and remove password protection on a zip file Decrypts and removes password protection from an encrypted zip file with the specified password
164 165 166 167 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 164 def zip_archive_zip_decrypt(input_file, zip_password, opts = {}) data, _status_code, _headers = zip_archive_zip_decrypt_with_http_info(input_file, zip_password, opts) data end |
#zip_archive_zip_decrypt_with_http_info(input_file, zip_password, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Decrypt and remove password protection on a zip file Decrypts and removes password protection from an encrypted zip file with the specified password
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 175 def zip_archive_zip_decrypt_with_http_info(input_file, zip_password, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_decrypt ...' 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_decrypt" end # verify the required parameter 'zip_password' is set if @api_client.config.client_side_validation && zip_password.nil? fail ArgumentError, "Missing the required parameter 'zip_password' when calling ZipArchiveApi.zip_archive_zip_decrypt" end # resource path local_var_path = '/convert/archive/zip/decrypt' # 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']) header_params[:'zipPassword'] = zip_password # 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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: ZipArchiveApi#zip_archive_zip_decrypt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#zip_archive_zip_encrypt_advanced(encryption_request, opts = {}) ⇒ Object
Encrypt and password protect a zip file Encrypts and password protects an existing zip file with the specified password and encryption algorithm
225 226 227 228 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 225 def zip_archive_zip_encrypt_advanced(encryption_request, opts = {}) data, _status_code, _headers = zip_archive_zip_encrypt_advanced_with_http_info(encryption_request, opts) data end |
#zip_archive_zip_encrypt_advanced_with_http_info(encryption_request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Encrypt and password protect a zip file Encrypts and password protects an existing zip file with the specified password and encryption algorithm
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 235 def zip_archive_zip_encrypt_advanced_with_http_info(encryption_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ZipArchiveApi.zip_archive_zip_encrypt_advanced ...' end # verify the required parameter 'encryption_request' is set if @api_client.config.client_side_validation && encryption_request.nil? fail ArgumentError, "Missing the required parameter 'encryption_request' when calling ZipArchiveApi.zip_archive_zip_encrypt_advanced" end # resource path local_var_path = '/convert/archive/zip/encrypt/advanced' # 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(['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(encryption_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_encrypt_advanced\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.
279 280 281 282 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 279 def zip_archive_zip_extract(input_file, opts = {}) data, _status_code, _headers = zip_archive_zip_extract_with_http_info(input_file, opts) 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.
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/cloudmersive-convert-api-client/api/zip_archive_api.rb', line 289 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 |