Skip to content
GitLab
Menu
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
87f9913b
Commit
87f9913b
authored
Sep 16, 2019
by
Jonas Braathen
Browse files
Add method for patching branches
parent
0886b7fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
topdesk_client/client.py
View file @
87f9913b
...
...
@@ -206,6 +206,16 @@ class TopDeskClient:
return_response
=
True
,
data
=
branch
.
json
())
def
patch_branch
(
self
,
branch_id
:
str
,
data
:
dict
)
->
Optional
[
Branch
]:
url
=
self
.
urls
.
get_branch
(
branch_id
)
r
=
self
.
patch
(
url
,
return_response
=
True
,
json
=
data
)
r
.
raise_for_status
()
if
r
.
status_code
==
200
:
return
Branch
.
from_dict
(
r
.
json
())
return
None
def
get_client
(
config
):
return
TopDeskClient
(
**
config
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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