class AsposeHtml::StorageApi

Attributes

api_client[RW]

Public Class Methods

new(args) click to toggle source
# File lib/aspose_html_cloud/api/storage_api.rb, line 34
def initialize(args)
  @api_client = AsposeHtml::ApiClient.default(args)
end

Public Instance Methods

copy_file(src_path, dest_path, opts = {}) click to toggle source

Copy file @param src_path Source file path e.g. '/folder/file.ext' @param dest_path Destination file path @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @option opts [String] :version_id File version ID to copy @return [nil]

# File lib/aspose_html_cloud/api/storage_api.rb, line 264
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 = {}) click to toggle source

Copy file @param src_path Source file path e.g. &#39;/folder/file.ext&#39; @param dest_path Destination file path @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @option opts [String] :version_id File version ID to copy @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 277
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 = {}) click to toggle source

Copy folder @param src_path Source folder path e.g. &#39;/src&#39; @param dest_path Destination folder path e.g. &#39;/dst&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @return [nil]

# File lib/aspose_html_cloud/api/storage_api.rb, line 576
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 = {}) click to toggle source

Copy folder @param src_path Source folder path e.g. &#39;/src&#39; @param dest_path Destination folder path e.g. &#39;/dst&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 588
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 = {}) click to toggle source

Create the folder @param path Folder path to create e.g. &#39;folder_1/folder_2/&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [nil]

# File lib/aspose_html_cloud/api/storage_api.rb, line 637
def create_folder(path, opts = {})
  create_folder_with_http_info(path, opts)
  nil
end
create_folder_with_http_info(path, opts = {}) click to toggle source

Create the folder @param path Folder path to create e.g. &#39;folder_1/folder_2/&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 647
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 = {}) click to toggle source

Delete file @param path File path e.g. &#39;/folder/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID to delete @return [nil]

# File lib/aspose_html_cloud/api/storage_api.rb, line 329
def delete_file(path, opts = {})
  delete_file_with_http_info(path, opts)
  nil
end
delete_file_with_http_info(path, opts = {}) click to toggle source

Delete file @param path File path e.g. &#39;/folder/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID to delete @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 340
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 = {}) click to toggle source

Delete folder @param path Folder path e.g. &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [BOOLEAN] :recursive Enable to delete folders, subfolders and files (default to false) @return [nil]

# File lib/aspose_html_cloud/api/storage_api.rb, line 691
def delete_folder(path, opts = {})
  delete_folder_with_http_info(path, opts)
  nil
end
delete_folder_with_http_info(path, opts = {}) click to toggle source

Delete folder @param path Folder path e.g. &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [BOOLEAN] :recursive Enable to delete folders, subfolders and files @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 702
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 = {}) click to toggle source

Download file @param path File path e.g. &#39;/folder/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID to download @return [File]

# File lib/aspose_html_cloud/api/storage_api.rb, line 385
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 = {}) click to toggle source

Download file @param path File path e.g. &#39;/folder/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID to download @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 396
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 = {}) click to toggle source

Get disc usage @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [DiscUsage]

# File lib/aspose_html_cloud/api/storage_api.rb, line 46
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 = {}) click to toggle source

Get disc usage @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(DiscUsage, Fixnum, Hash)>] DiscUsage data, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 55
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 = {}) click to toggle source

Get file versions @param path File path e.g. &#39;/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [FileVersions]

# File lib/aspose_html_cloud/api/storage_api.rb, line 95
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 = {}) click to toggle source

Get file versions @param path File path e.g. &#39;/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(FileVersions, Fixnum, Hash)>] FileVersions data, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 105
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 = {}) click to toggle source

Get all files and folders within a folder @param path Folder path e.g. &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [FilesList]

# File lib/aspose_html_cloud/api/storage_api.rb, line 746
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 = {}) click to toggle source

Get all files and folders within a folder @param path Folder path e.g. &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(FilesList, Fixnum, Hash)>] FilesList data, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 756
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 = {}) click to toggle source

Move file @param src_path Source file path e.g. &#39;/src.ext&#39; @param dest_path Destination file path e.g. &#39;/dest.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @option opts [String] :version_id File version ID to move @return [nil]

# File lib/aspose_html_cloud/api/storage_api.rb, line 445
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 = {}) click to toggle source

Move file @param src_path Source file path e.g. &#39;/src.ext&#39; @param dest_path Destination file path e.g. &#39;/dest.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @option opts [String] :version_id File version ID to move @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 458
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 = {}) click to toggle source

Move folder @param src_path Folder path to move e.g. &#39;/folder&#39; @param dest_path Destination folder path to move to e.g &#39;/dst&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @return [nil]

# File lib/aspose_html_cloud/api/storage_api.rb, line 802
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 = {}) click to toggle source

Move folder @param src_path Folder path to move e.g. &#39;/folder&#39; @param dest_path Destination folder path to move to e.g &#39;/dst&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 814
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 = {}) click to toggle source

Check if file or folder exists @param path File or folder path e.g. &#39;/file.ext&#39; or &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID @return [ObjectExist]

# File lib/aspose_html_cloud/api/storage_api.rb, line 150
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 = {}) click to toggle source

Check if file or folder exists @param path File or folder path e.g. &#39;/file.ext&#39; or &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID @return [Array<(ObjectExist, Fixnum, Hash)>] ObjectExist data, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 161
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 = {}) click to toggle source

Check if storage exists @param storage_name Storage name @param [Hash] opts the optional parameters @return [StorageExist]

# File lib/aspose_html_cloud/api/storage_api.rb, line 205
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 = {}) click to toggle source

Check if storage exists @param storage_name Storage name @param [Hash] opts the optional parameters @return [Array<(StorageExist, Fixnum, Hash)>] StorageExist data, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 214
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 = {}) click to toggle source

Upload file @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header. @param file File to upload @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [FilesUploadResult]

# File lib/aspose_html_cloud/api/storage_api.rb, line 509
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 = {}) click to toggle source

Upload file @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header. @param file File to upload @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(FilesUploadResult, Fixnum, Hash)>] FilesUploadResult data, response status code and response headers

# File lib/aspose_html_cloud/api/storage_api.rb, line 520
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