new: Add last field to get_csv

pull/160/head
Raphaël Vinot 2017-12-21 17:25:12 +01:00
parent ae644bdbf5
commit 9e9bad731d
1 changed files with 3 additions and 1 deletions

View File

@ -1606,7 +1606,7 @@ class PyMISP(object):
def get_stix(self, **kwargs):
return self.get_stix_event(**kwargs)
def get_csv(self, eventid=None, attributes=[], object_attributes=[], misp_types=[], context=False, ignore=False):
def get_csv(self, eventid=None, attributes=[], object_attributes=[], misp_types=[], context=False, ignore=False, last=None):
"""Get MISP values in CSV format
:param eventid: The event ID to query
:param attributes: The column names to export from normal attributes (i.e. uuid, value, type, ...)
@ -1632,6 +1632,8 @@ class PyMISP(object):
to_post['includeContext'] = True
if ignore:
to_post['ignore'] = True
if last:
to_post['last'] = last
if to_post:
response = self.__prepare_request('POST', url, json.dumps(to_post), output_type='json')
else: