Class: AsposeHtml::StorageApi
- Inherits:
-
Object
- Object
- AsposeHtml::StorageApi
- Defined in:
- lib/aspose_html_cloud/api/storage_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#copy_file(src_path, dest_path, opts = {}) ⇒ nil
Copy file.
-
#copy_file_with_http_info(src_path, dest_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Copy file.
-
#copy_folder(src_path, dest_path, opts = {}) ⇒ nil
Copy folder.
-
#copy_folder_with_http_info(src_path, dest_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Copy folder.
-
#create_folder(path, opts = {}) ⇒ nil
Create the folder.
-
#create_folder_with_http_info(path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create the folder.
-
#delete_file(path, opts = {}) ⇒ nil
Delete file.
-
#delete_file_with_http_info(path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete file.
-
#delete_folder(path, opts = {}) ⇒ nil
Delete folder.
-
#delete_folder_with_http_info(path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete folder.
-
#download_file(path, opts = {}) ⇒ File
Download file.
-
#download_file_with_http_info(path, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Download file.
-
#get_disc_usage(opts = {}) ⇒ DiscUsage
Get disc usage.
-
#get_disc_usage_with_http_info(opts = {}) ⇒ Array<(DiscUsage, Fixnum, Hash)>
DiscUsage data, response status code and response headers.
- #get_file_versions(path, opts = {}) ⇒ FileVersions
-
#get_file_versions_with_http_info(path, opts = {}) ⇒ Array<(FileVersions, Fixnum, Hash)>
FileVersions data, response status code and response headers.
-
#get_files_list(path, opts = {}) ⇒ FilesList
Get all files and folders within a folder.
-
#get_files_list_with_http_info(path, opts = {}) ⇒ Array<(FilesList, Fixnum, Hash)>
Get all files and folders within a folder.
-
#initialize(args) ⇒ StorageApi
constructor
A new instance of StorageApi.
-
#move_file(src_path, dest_path, opts = {}) ⇒ nil
Move file.
-
#move_file_with_http_info(src_path, dest_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Move file.
-
#move_folder(src_path, dest_path, opts = {}) ⇒ nil
Move folder.
-
#move_folder_with_http_info(src_path, dest_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Move folder.
- #object_exists(path, opts = {}) ⇒ ObjectExist
-
#object_exists_with_http_info(path, opts = {}) ⇒ Array<(ObjectExist, Fixnum, Hash)>
ObjectExist data, response status code and response headers.
- #storage_exists(storage_name, opts = {}) ⇒ StorageExist
-
#storage_exists_with_http_info(storage_name, opts = {}) ⇒ Array<(StorageExist, Fixnum, Hash)>
StorageExist data, response status code and response headers.
-
#upload_file(path, file, opts = {}) ⇒ FilesUploadResult
Upload file.
-
#upload_file_with_http_info(path, file, opts = {}) ⇒ Array<(FilesUploadResult, Fixnum, Hash)>
Upload file.
Constructor Details
#initialize(args) ⇒ StorageApi
35 36 37 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 35 def initialize(args) @api_client = AsposeHtml::ApiClient.default(args) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
33 34 35 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 33 def api_client @api_client end |
Instance Method Details
#copy_file(src_path, dest_path, opts = {}) ⇒ nil
Copy file
265 266 267 268 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 265 def copy_file(src_path, dest_path, opts = {}) copy_file_with_http_info(src_path, dest_path, opts) nil end |
#copy_file_with_http_info(src_path, dest_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Copy file
278 279 280 281 282 283 284 285 286 287 288 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 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 278 def copy_file_with_http_info(src_path, dest_path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.copy_file ...' end # verify the required parameter 'src_path' is set if @api_client.config.client_side_validation && src_path.nil? fail ArgumentError, "Missing the required parameter 'src_path' when calling StorageApi.copy_file" end # verify the required parameter 'dest_path' is set if @api_client.config.client_side_validation && dest_path.nil? fail ArgumentError, "Missing the required parameter 'dest_path' when calling StorageApi.copy_file" end # resource path local_var_path = '/html/storage/file/copy/{srcPath}'.sub('{' + 'srcPath' + '}', src_path.to_s) # query parameters query_params = {} query_params[:'destPath'] = dest_path query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil? query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil? query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body) if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#copy_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#copy_folder(src_path, dest_path, opts = {}) ⇒ nil
Copy folder
577 578 579 580 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 577 def copy_folder(src_path, dest_path, opts = {}) copy_folder_with_http_info(src_path, dest_path, opts) nil end |
#copy_folder_with_http_info(src_path, dest_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Copy folder
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 589 def copy_folder_with_http_info(src_path, dest_path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.copy_folder ...' end # verify the required parameter 'src_path' is set if @api_client.config.client_side_validation && src_path.nil? fail ArgumentError, "Missing the required parameter 'src_path' when calling StorageApi.copy_folder" end # verify the required parameter 'dest_path' is set if @api_client.config.client_side_validation && dest_path.nil? fail ArgumentError, "Missing the required parameter 'dest_path' when calling StorageApi.copy_folder" end # resource path local_var_path = '/html/storage/folder/copy/{srcPath}'.sub('{' + 'srcPath' + '}', src_path.to_s) # query parameters query_params = {} query_params[:'destPath'] = dest_path query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil? query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body) if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#copy_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_folder(path, opts = {}) ⇒ nil
Create the folder
638 639 640 641 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 638 def create_folder(path, opts = {}) create_folder_with_http_info(path, opts) nil end |
#create_folder_with_http_info(path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create the folder
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 648 def create_folder_with_http_info(path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.create_folder ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.create_folder" end # resource path local_var_path = '/html/storage/folder/{path}'.sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body) if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_file(path, opts = {}) ⇒ nil
Delete file
330 331 332 333 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 330 def delete_file(path, opts = {}) delete_file_with_http_info(path, opts) nil end |
#delete_file_with_http_info(path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete file
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 341 def delete_file_with_http_info(path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.delete_file ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.delete_file" end # resource path local_var_path = '/html/storage/file/{path}'.sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body) if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#delete_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_folder(path, opts = {}) ⇒ nil
Delete folder
692 693 694 695 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 692 def delete_folder(path, opts = {}) delete_folder_with_http_info(path, opts) nil end |
#delete_folder_with_http_info(path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete folder
703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 703 def delete_folder_with_http_info(path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.delete_folder ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.delete_folder" end # resource path local_var_path = '/html/storage/folder/{path}'.sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? query_params[:'recursive'] = opts[:'recursive'] if !opts[:'recursive'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body) if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_file(path, opts = {}) ⇒ File
Download file
386 387 388 389 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 386 def download_file(path, opts = {}) data, _status_code, _headers = download_file_with_http_info(path, opts) data end |
#download_file_with_http_info(path, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Download file
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 397 def download_file_with_http_info(path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.download_file ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.download_file" end # resource path local_var_path = '/html/storage/file/{path}'.sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type( ['application/octet-stream']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => 'File') if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#download_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_disc_usage(opts = {}) ⇒ DiscUsage
Get disc usage
47 48 49 50 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 47 def get_disc_usage(opts = {}) data, _status_code, _headers = get_disc_usage_with_http_info(opts) data end |
#get_disc_usage_with_http_info(opts = {}) ⇒ Array<(DiscUsage, Fixnum, Hash)>
Returns DiscUsage data, response status code and response headers.
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 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 56 def get_disc_usage_with_http_info(opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.get_disc_usage ...' end # resource path local_var_path = '/html/storage/disc' # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => 'DiscUsage') if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#get_disc_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_file_versions(path, opts = {}) ⇒ FileVersions
96 97 98 99 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 96 def get_file_versions(path, opts = {}) data, _status_code, _headers = get_file_versions_with_http_info(path, opts) data end |
#get_file_versions_with_http_info(path, opts = {}) ⇒ Array<(FileVersions, Fixnum, Hash)>
Returns FileVersions data, response status code and response headers.
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 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 106 def get_file_versions_with_http_info(path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.get_file_versions ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.get_file_versions" end # resource path local_var_path = '/html/storage/version/{path}'.sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => 'FileVersions') if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#get_file_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_files_list(path, opts = {}) ⇒ FilesList
Get all files and folders within a folder
747 748 749 750 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 747 def get_files_list(path, opts = {}) data, _status_code, _headers = get_files_list_with_http_info(path, opts) data end |
#get_files_list_with_http_info(path, opts = {}) ⇒ Array<(FilesList, Fixnum, Hash)>
Get all files and folders within a folder
757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 757 def get_files_list_with_http_info(path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.get_files_list ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.get_files_list" end # resource path local_var_path = '/html/storage/folder/{path}'.sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => 'FilesList') if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#get_files_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#move_file(src_path, dest_path, opts = {}) ⇒ nil
Move file
446 447 448 449 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 446 def move_file(src_path, dest_path, opts = {}) move_file_with_http_info(src_path, dest_path, opts) nil end |
#move_file_with_http_info(src_path, dest_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Move file
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 459 def move_file_with_http_info(src_path, dest_path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.move_file ...' end # verify the required parameter 'src_path' is set if @api_client.config.client_side_validation && src_path.nil? fail ArgumentError, "Missing the required parameter 'src_path' when calling StorageApi.move_file" end # verify the required parameter 'dest_path' is set if @api_client.config.client_side_validation && dest_path.nil? fail ArgumentError, "Missing the required parameter 'dest_path' when calling StorageApi.move_file" end # resource path local_var_path = '/html/storage/file/move/{srcPath}'.sub('{' + 'srcPath' + '}', src_path.to_s) # query parameters query_params = {} query_params[:'destPath'] = dest_path query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil? query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil? query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body) if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#move_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#move_folder(src_path, dest_path, opts = {}) ⇒ nil
Move folder
803 804 805 806 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 803 def move_folder(src_path, dest_path, opts = {}) move_folder_with_http_info(src_path, dest_path, opts) nil end |
#move_folder_with_http_info(src_path, dest_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Move folder
815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 815 def move_folder_with_http_info(src_path, dest_path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.move_folder ...' end # verify the required parameter 'src_path' is set if @api_client.config.client_side_validation && src_path.nil? fail ArgumentError, "Missing the required parameter 'src_path' when calling StorageApi.move_folder" end # verify the required parameter 'dest_path' is set if @api_client.config.client_side_validation && dest_path.nil? fail ArgumentError, "Missing the required parameter 'dest_path' when calling StorageApi.move_folder" end # resource path local_var_path = '/html/storage/folder/move/{srcPath}'.sub('{' + 'srcPath' + '}', src_path.to_s) # query parameters query_params = {} query_params[:'destPath'] = dest_path query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil? query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body) if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#move_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#object_exists(path, opts = {}) ⇒ ObjectExist
151 152 153 154 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 151 def object_exists(path, opts = {}) data, _status_code, _headers = object_exists_with_http_info(path, opts) data end |
#object_exists_with_http_info(path, opts = {}) ⇒ Array<(ObjectExist, Fixnum, Hash)>
Returns ObjectExist data, response status code and response headers.
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 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 162 def object_exists_with_http_info(path, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.object_exists ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.object_exists" end # resource path local_var_path = '/html/storage/exist/{path}'.sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => 'ObjectExist') if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#object_exists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#storage_exists(storage_name, opts = {}) ⇒ StorageExist
206 207 208 209 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 206 def storage_exists(storage_name, opts = {}) data, _status_code, _headers = storage_exists_with_http_info(storage_name, opts) data end |
#storage_exists_with_http_info(storage_name, opts = {}) ⇒ Array<(StorageExist, Fixnum, Hash)>
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 246 247 248 249 250 251 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 215 def storage_exists_with_http_info(storage_name, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.storage_exists ...' end # verify the required parameter 'storage_name' is set if @api_client.config.client_side_validation && storage_name.nil? fail ArgumentError, "Missing the required parameter 'storage_name' when calling StorageApi.storage_exists" end # resource path local_var_path = '/html/storage/{storageName}/exist'.sub('{' + 'storageName' + '}', storage_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => 'StorageExist') if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#storage_exists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_file(path, file, opts = {}) ⇒ FilesUploadResult
Upload file
510 511 512 513 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 510 def upload_file(path, file, opts = {}) data, _status_code, _headers = upload_file_with_http_info(path, file, opts) data end |
#upload_file_with_http_info(path, file, opts = {}) ⇒ Array<(FilesUploadResult, Fixnum, Hash)>
Upload file
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'lib/aspose_html_cloud/api/storage_api.rb', line 521 def upload_file_with_http_info(path, file, opts = {}) if @api_client.config.debug @api_client.config.logger.debug 'Calling API: StorageApi.upload_file ...' end # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? fail ArgumentError, "Missing the required parameter 'path' when calling StorageApi.upload_file" end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling StorageApi.upload_file" end # resource path local_var_path = '/html/storage/file/{path}'.sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type( ['application/octet-stream']) # form parameters form_params = {} # http body (model) post_body = ::File.open(file,"rb").read data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => 'FilesUploadResult') if @api_client.config.debug @api_client.config.logger.debug "API called: StorageApi#upload_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |