lib/purecloud/api/content_management_api.rb in purecloud-0.58.1 vs lib/purecloud/api/content_management_api.rb in purecloud-0.59.1

- old
+ new

@@ -1388,9 +1388,84 @@ @api_client.config.logger.debug "API called: ContentManagementApi#get_workspaces_workspace_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Get a list of documents. + # + # @param workspace_id Workspace ID + # @param [Hash] opts the optional parameters + # @option opts [Array<String>] :expand Which fields, if any, to expand. + # @option opts [Integer] :page_size Page size (default to 25) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [String] :sort_by name or dateCreated + # @option opts [String] :sort_order ascending or descending (default to ascending) + # @return [DocumentEntityListing] + def get_workspaces_workspace_id_documents(workspace_id, opts = {}) + data, status_code, headers = get_workspaces_workspace_id_documents_with_http_info(workspace_id, opts) + return data + end + + # Get a list of documents. + # + # @param workspace_id Workspace ID + # @param [Hash] opts the optional parameters + # @option opts [Array<String>] :expand Which fields, if any, to expand. + # @option opts [Integer] :page_size Page size + # @option opts [Integer] :page_number Page number + # @option opts [String] :sort_by name or dateCreated + # @option opts [String] :sort_order ascending or descending + # @return [Array<(DocumentEntityListing, Fixnum, Hash)>] DocumentEntityListing data, response status code and response headers + def get_workspaces_workspace_id_documents_with_http_info(workspace_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: ContentManagementApi#get_workspaces_workspace_id_documents ..." + end + + # verify the required parameter 'workspace_id' is set + fail "Missing the required parameter 'workspace_id' when calling get_workspaces_workspace_id_documents" if workspace_id.nil? + + # resource path + local_var_path = "/api/v2/contentmanagement/workspaces/{workspaceId}/documents".sub('{format}','json').sub('{' + 'workspaceId' + '}', workspace_id.to_s) + + # query parameters + query_params = {} + query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] + query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] + query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] + query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] + query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] + + # header parameters + header_params = {} + + # HTTP header 'Accept' (if needed) + _header_accept = ['application/json'] + _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result + + # HTTP header 'Content-Type' + _header_content_type = ['application/json'] + header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + + auth_names = ['PureCloud Auth'] + 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 => 'DocumentEntityListing') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentManagementApi#get_workspaces_workspace_id_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a list workspace members # # @param workspace_id Workspace ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25)