add: Allow to fetch warninglists

Fix #180
pull/186/head
Raphaël Vinot 2018-01-25 16:02:53 +01:00
parent f1feeb4190
commit 076393d55e
1 changed files with 12 additions and 0 deletions

View File

@ -1569,6 +1569,18 @@ class PyMISP(object):
response = self.__prepare_request('GET', url)
return self._check_response(response)
# ############## WarningLists ##################
def get_warninglists(self):
url = urljoin(self.root_url, '/warninglists')
response = self.__prepare_request('GET', url)
return self._check_response(response)
def get_warninglist(self, warninglist_id):
url = urljoin(self.root_url, '/warninglists/view/{}'.format(warninglist_id))
response = self.__prepare_request('GET', url)
return self._check_response(response)
# ##############################################
# ############### Non-JSON output ##############
# ##############################################