From d9cc3cccce4818b548eb4c3e999494a539876a3a Mon Sep 17 00:00:00 2001 From: Sebastian Bergt <74961167+sebastian-bergt@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:49:20 +0200 Subject: [PATCH] Update client.py --- py_jama_rest_client/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/py_jama_rest_client/client.py b/py_jama_rest_client/client.py index 4c0a953..617bd79 100644 --- a/py_jama_rest_client/client.py +++ b/py_jama_rest_client/client.py @@ -162,18 +162,19 @@ def get_filter_results(self, filter_id, project_id=None, allowed_results_per_pag filter_results = self.__get_all(resource_path, params=params, allowed_results_per_page=allowed_results_per_page) return filter_results - def get_items(self, project_id, allowed_results_per_page=__allowed_results_per_page): + def get_items(self, project_id, root_only=False, allowed_results_per_page=__allowed_results_per_page): """ This method will return all items in the specified project. Args: project_id: the project ID + root_only: boolean to give only the root nodes allowed_results_per_page: number of results per page Returns: a Json array of item objects """ resource_path = 'items' - params = {'project': project_id} + params = {'project': project_id, 'rootOnly': True} item_data = self.__get_all(resource_path, params=params, allowed_results_per_page=allowed_results_per_page) return item_data