Skip to content

Commit

Permalink
chg: update order parameters & doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Sep 30, 2018
1 parent 1dc2f66 commit e52cd11
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pymisp/aping.py
Expand Up @@ -153,9 +153,9 @@ def search(self, controller: str='events', return_format: str='json',
deleted: Optional[str]=None,
include_event_uuid: Optional[str]=None, includeEventUuid: Optional[str]=None,
event_timestamp: Optional[DateTypes]=None,
sg_reference_only: Optional[bool]=None,
eventinfo: Optional[str]=None,
searchall: Optional[bool]=None,
sg_reference_only: Optional[bool]=None,
pythonify: Optional[bool]=False,
**kwargs):
'''
Expand All @@ -182,9 +182,9 @@ def search(self, controller: str='events', return_format: str='json',
:param deleted: If this parameter is set to 1, it will return soft-deleted attributes along with active ones. By using "only" as a parameter it will limit the returned data set to soft-deleted data only.
:param include_event_uuid: Instead of just including the event ID, also include the event UUID in each of the attributes.
:param event_timestamp: Only return attributes from events that have received a modification after the given timestamp.
:param eventinfo: Search in the eventinfo field
:param searchall: Set to run a full text search on the whole database (slow)
:param sg_reference_only: Only return a reference to the sharing groups the responses are sharing in (avoid leaking org names)
:param sg_reference_only: If this flag is set, sharing group objects will not be included, instead only the sharing group ID is set.
:param eventinfo: Filter on the event's info field.
:param searchall: Search for a full or a substring (delimited by % for substrings) in the event info, event tags, attribute tags, attribute values or attribute comment fields.
:param pythonify: Returns a list of PyMISP Objects the the plain json output. Warning: it might use a lot of RAM
Deprecated:
Expand Down Expand Up @@ -267,12 +267,12 @@ def search(self, controller: str='events', return_format: str='json',
query['event_timestamp'] = (self.make_timestamp(event_timestamp[0]), self.make_timestamp(event_timestamp[1]))
else:
query['event_timestamp'] = self.make_timestamp(event_timestamp)
if sg_reference_only is not None:
query['sgReferenceOnly'] = sg_reference_only
if eventinfo is not None:
query['eventinfo'] = eventinfo
if searchall is not None:
query['searchall'] = searchall
if sg_reference_only is not None:
query['sgReferenceOnly'] = sg_reference_only

url = urljoin(self.root_url, f'{controller}/restSearch')
response = self._prepare_request('POST', url, data=json.dumps(query))
Expand Down

0 comments on commit e52cd11

Please sign in to comment.