mirror of https://github.com/MISP/PyMISP
Add function to fetch all events from a feed
Function takes the feed id as argument (-f).pull/212/head
parent
b43722c73f
commit
01770aa51e
|
@ -1475,6 +1475,16 @@ class PyMISP(object):
|
|||
def get_stix(self, **kwargs):
|
||||
return self.get_stix_event(**kwargs)
|
||||
|
||||
# ###########################
|
||||
# ######## Feed #########
|
||||
# ###########################
|
||||
|
||||
def fetch_feed(self, feed_id):
|
||||
session = self.__prepare_session()
|
||||
url = urljoin(self.root_url, 'feeds/fetchFromFeed/{}'.format(feed_id))
|
||||
response = session.get(url)
|
||||
return self._check_response(response)
|
||||
|
||||
# ###########################
|
||||
# ####### Deprecated ########
|
||||
# ###########################
|
||||
|
|
Loading…
Reference in New Issue