Change in new_tag function. Added attributie 'hide_tag'

pull/177/head
Armīns Palms 2018-01-19 16:57:40 +02:00
parent aaf18fa3c8
commit 9158985f3f
1 changed files with 2 additions and 2 deletions

View File

@ -1218,9 +1218,9 @@ class PyMISP(object):
to_return.append(tag['name'])
return to_return
def new_tag(self, name=None, colour="#00ace6", exportable=False):
def new_tag(self, name=None, colour="#00ace6", exportable=False, hide_tag=False):
"""Create a new tag"""
to_post = {'Tag': {'name': name, 'colour': colour, 'exportable': exportable}}
to_post = {'Tag': {'name': name, 'colour': colour, 'exportable': exportable, 'hide_tag': hide_tag}}
url = urljoin(self.root_url, 'tags/add')
response = self.__prepare_request('POST', url, json.dumps(to_post))
return self._check_response(response)