Commit f73c50a5 authored by Jo Sama's avatar Jo Sama 😱
Browse files

Add list_operator_filters()

parent 31efc0f5
......@@ -43,6 +43,9 @@ class Endpoints:
def get_operators(self):
return self._prepend_base_url('operators/')
def get_operator_filters(self):
return self._prepend_base_url('operators/filters/operator')
def get_operator_filter(self, identity):
return urljoin(self.get_operator(identity) + '/', 'filters/operator')
......@@ -274,6 +277,10 @@ class TopDeskClient:
return [x.get('message') for x in r.json()]
def list_operator_filters(self):
return self.get(self.urls.get_operator_filters(),
def list_operators(self):
for x in self.get(self.urls.get_operators()):
yield Operator.from_dict(x)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment