Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
it-bott-integrasjoner
topdesk-client
Commits
f73c50a5
Commit
f73c50a5
authored
Jan 07, 2020
by
Jo Sama
😱
Browse files
Add list_operator_filters()
parent
31efc0f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
topdesk_client/client.py
View file @
f73c50a5
...
...
@@ -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:
else
:
return
[
x
.
get
(
'message'
)
for
x
in
r
.
json
()]
def
list_operator_filters
(
self
):
return
self
.
get
(
self
.
urls
.
get_operator_filters
(),
return_response
=
True
).
json
()
def
list_operators
(
self
):
for
x
in
self
.
get
(
self
.
urls
.
get_operators
()):
yield
Operator
.
from_dict
(
x
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment