=begin #Web API Swagger specification #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.3.0-SNAPSHOT =end require "uri" module GroupDocsPlatformCloud class FolderApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Remove a specific folder. Parameters: path - folder path e.g. /Folder1, storage - user's storage name, recursive - is subfolders and files must be deleted for specified path. # # @param path # @param [Hash] opts the optional parameters # @option opts [String] :storage # @option opts [BOOLEAN] :recursive (default to false) # @return [RemoveFolderResponse] def folder_delete_folder(path, opts = {}) data, _status_code, _headers = folder_delete_folder_with_http_info(path, opts) return data end # Remove a specific folder. Parameters: path - folder path e.g. /Folder1, storage - user's storage name, recursive - is subfolders and files must be deleted for specified path. # # @param path # @param [Hash] opts the optional parameters # @option opts [String] :storage # @option opts [BOOLEAN] :recursive # @return [Array<(RemoveFolderResponse, Fixnum, Hash)>] RemoveFolderResponse data, response status code and response headers def folder_delete_folder_with_http_info(path, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FolderApi.folder_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 FolderApi.folder_delete_folder" end # resource path local_var_path = "/storage/folder/{path}".sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].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 auth_names = [] 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, :auth_names => auth_names, :return_type => 'RemoveFolderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: FolderApi#folder_delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the file listing of a specific folder. Parametres: path - start with name of storage e.g. root folder '/'or some folder '/folder1/..', storage - user's storage name. # # @param path # @param [Hash] opts the optional parameters # @option opts [String] :storage # @return [FolderResponse] def folder_get_list_files(path, opts = {}) data, _status_code, _headers = folder_get_list_files_with_http_info(path, opts) return data end # Get the file listing of a specific folder. Parametres: path - start with name of storage e.g. root folder '/'or some folder '/folder1/..', storage - user's storage name. # # @param path # @param [Hash] opts the optional parameters # @option opts [String] :storage # @return [Array<(FolderResponse, Fixnum, Hash)>] FolderResponse data, response status code and response headers def folder_get_list_files_with_http_info(path, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FolderApi.folder_get_list_files ..." 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 FolderApi.folder_get_list_files" end # resource path local_var_path = "/storage/folder/{path}".sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].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 auth_names = [] 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, :auth_names => auth_names, :return_type => 'FolderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: FolderApi#folder_get_list_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Move a specific folder. Parameters: path - source folder path e.g. /Folder1, storage - user's source storage name, dest - destination folder path e.g. /Folder2, destStorage - user's destination storage name. # # @param path # @param dest # @param [Hash] opts the optional parameters # @option opts [String] :storage # @option opts [String] :dest_storage # @return [MoveFolderResponse] def folder_post_move_folder(path, dest, opts = {}) data, _status_code, _headers = folder_post_move_folder_with_http_info(path, dest, opts) return data end # Move a specific folder. Parameters: path - source folder path e.g. /Folder1, storage - user's source storage name, dest - destination folder path e.g. /Folder2, destStorage - user's destination storage name. # # @param path # @param dest # @param [Hash] opts the optional parameters # @option opts [String] :storage # @option opts [String] :dest_storage # @return [Array<(MoveFolderResponse, Fixnum, Hash)>] MoveFolderResponse data, response status code and response headers def folder_post_move_folder_with_http_info(path, dest, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FolderApi.folder_post_move_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 FolderApi.folder_post_move_folder" end # verify the required parameter 'dest' is set if @api_client.config.client_side_validation && dest.nil? fail ArgumentError, "Missing the required parameter 'dest' when calling FolderApi.folder_post_move_folder" end # resource path local_var_path = "/storage/folder/{path}".sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'dest'] = dest query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'destStorage'] = opts[:'dest_storage'] if !opts[:'dest_storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'MoveFolderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: FolderApi#folder_post_move_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create the folder. Parameters: path - source folder path e.g. /Folder1, storage - user's source storage name, newdest - destination folder path e.g. /Folder2, destStorage - user's destination storage name. # # @param path # @param [Hash] opts the optional parameters # @option opts [String] :storage # @option opts [String] :dest_storage # @return [SaaSposeResponse] def folder_put_create_folder(path, opts = {}) data, _status_code, _headers = folder_put_create_folder_with_http_info(path, opts) return data end # Create the folder. Parameters: path - source folder path e.g. /Folder1, storage - user's source storage name, newdest - destination folder path e.g. /Folder2, destStorage - user's destination storage name. # # @param path # @param [Hash] opts the optional parameters # @option opts [String] :storage # @option opts [String] :dest_storage # @return [Array<(SaaSposeResponse, Fixnum, Hash)>] SaaSposeResponse data, response status code and response headers def folder_put_create_folder_with_http_info(path, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FolderApi.folder_put_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 FolderApi.folder_put_create_folder" end # resource path local_var_path = "/storage/folder/{path}".sub('{' + 'path' + '}', path.to_s) # query parameters query_params = {} query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'destStorage'] = opts[:'dest_storage'] if !opts[:'dest_storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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, :auth_names => auth_names, :return_type => 'SaaSposeResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: FolderApi#folder_put_create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end