fix: Wrong documentation on PyMISP.search_sightings

Fix #336
pull/347/head
Raphaël Vinot 2019-02-07 16:25:45 +01:00
parent b0fe78a9f8
commit 5afdcb5709
1 changed files with 3 additions and 3 deletions

View File

@ -1545,11 +1545,11 @@ class PyMISP(object):
:Example: :Example:
>>> misp.search_sightings({'publish_timestamp': '30d'}) # search sightings for the last 30 days on the instance >>> misp.search_sightings(**{'publish_timestamp': '30d'}) # search sightings for the last 30 days on the instance
[ ... ] [ ... ]
>>> misp.search_sightings('attribute', {'id': 6, 'include_attribute': 1}) # return list of sighting for attribute 6 along with the attribute itself >>> misp.search_sightings('attribute', context_id=6, include_attribute=1) # return list of sighting for attribute 6 along with the attribute itself
[ ... ] [ ... ]
>>> misp.search_sightings('event', {'id': 17, 'include_event': 1, 'org_id': 2}) # return list of sighting for event 17 filtered with org id 2 >>> misp.search_sightings('event', **{'context_id': 17, 'include_event': 1, 'org_id': 2}) # return list of sighting for event 17 filtered with org id 2
""" """
if context not in ['', 'attribute', 'event']: if context not in ['', 'attribute', 'event']:
raise Exception('Context parameter must be empty, "attribute" or "event"') raise Exception('Context parameter must be empty, "attribute" or "event"')