mirror of https://github.com/MISP/PyMISP
chg: add kw_params to tags
parent
9e2b748b02
commit
6c9234846f
|
@ -946,12 +946,12 @@ class PyMISP:
|
||||||
|
|
||||||
# ## BEGIN Tags ###
|
# ## BEGIN Tags ###
|
||||||
|
|
||||||
def tags(self, pythonify: bool = False) -> Union[Dict, List[MISPTag]]:
|
def tags(self, pythonify: bool = False, **kw_params) -> Union[Dict, List[MISPTag]]:
|
||||||
"""Get the list of existing tags.
|
"""Get the list of existing tags.
|
||||||
|
|
||||||
:param pythonify: Returns a list of PyMISP Objects instead of the plain json output. Warning: it might use a lot of RAM
|
:param pythonify: Returns a list of PyMISP Objects instead of the plain json output. Warning: it might use a lot of RAM
|
||||||
"""
|
"""
|
||||||
r = self._prepare_request('GET', 'tags/index')
|
r = self._prepare_request('GET', 'tags/index', kw_params=kw_params)
|
||||||
tags = self._check_json_response(r)
|
tags = self._check_json_response(r)
|
||||||
if not (self.global_pythonify or pythonify) or 'errors' in tags:
|
if not (self.global_pythonify or pythonify) or 'errors' in tags:
|
||||||
return tags['Tag']
|
return tags['Tag']
|
||||||
|
|
Loading…
Reference in New Issue