Skip to content

Commit

Permalink
add: Allow to fetch warninglists
Browse files Browse the repository at this point in the history
Fix #180
  • Loading branch information
Rafiot committed Jan 25, 2018
1 parent f1feeb4 commit 076393d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pymisp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,18 @@ def get_taxonomy(self, taxonomy_id):
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 ##############
# ##############################################
Expand Down

0 comments on commit 076393d

Please sign in to comment.