Skip to content

Commit c5a53bd

Browse files
committed
Adding ID search to tools
1 parent 6942698 commit c5a53bd

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

defectdojo_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.8'
1+
__version__ = '1.0.9'

defectdojo_api/defectdojo.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ def get_container(self, container_id, limit=20):
812812

813813
###### Tool API #######
814814

815-
def list_tool_types(self, id=None, name=None, limit=20):
815+
def list_tool_types(self, resource_id=None, name=None, limit=20):
816816
"""Retrieves all the tool types.
817817
818818
:param name_contains: Search by tool type name.
@@ -824,15 +824,15 @@ def list_tool_types(self, id=None, name=None, limit=20):
824824
if limit:
825825
params['limit'] = limit
826826

827-
if id:
828-
params['id'] = id
827+
if resource_id:
828+
params['id'] = resource_id
829829

830830
if name:
831831
params['name__contains'] = name
832832

833833
return self._request('GET', 'tool_types/', params)
834834

835-
def list_tools(self, id=None, name=None, tool_type_id=None, url=None, limit=20):
835+
def list_tools(self, resource_id=None, name=None, tool_type_id=None, url=None, limit=20):
836836
"""Retrieves all the tool configurations.
837837
838838
:param name_contains: Search by tool name.
@@ -846,8 +846,8 @@ def list_tools(self, id=None, name=None, tool_type_id=None, url=None, limit=20):
846846
if limit:
847847
params['limit'] = limit
848848

849-
if id:
850-
params['id'] = id
849+
if resource_id:
850+
params['id'] = resource_id
851851

852852
if name:
853853
params['name'] = name
@@ -860,7 +860,7 @@ def list_tools(self, id=None, name=None, tool_type_id=None, url=None, limit=20):
860860

861861
return self._request('GET', 'tool_configurations/', params)
862862

863-
def list_tool_products(self, url=None, name=None, tool_configuration_id=None,
863+
def list_tool_products(self, resource_id=None, url=None, name=None, tool_configuration_id=None,
864864
tool_project_id=None, product_id=None, limit=20):
865865
"""Retrieves all the tools.
866866
@@ -877,8 +877,8 @@ def list_tool_products(self, url=None, name=None, tool_configuration_id=None,
877877
if limit:
878878
params['limit'] = limit
879879

880-
if id:
881-
params['id'] = id
880+
if resource_id:
881+
params['id'] = resource_id
882882

883883
if name:
884884
params['name'] = name

0 commit comments

Comments
 (0)