From 26f2911e868dc4150d6a8bb6dab09efc7b213d8c Mon Sep 17 00:00:00 2001 From: "michael.dsilva" Date: Fri, 21 Jun 2024 13:32:39 +1000 Subject: [PATCH] add gets for custom_branding, draft_custom_branding and custom_messaging that are currently missing --- duo_client/admin.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/duo_client/admin.py b/duo_client/admin.py index 94de697..4444d9f 100644 --- a/duo_client/admin.py +++ b/duo_client/admin.py @@ -3086,6 +3086,39 @@ def update_logo(self, logo): def delete_logo(self): return self.json_api_call('DELETE', '/admin/v1/logo', params={}) + def get_custom_branding(self): + """ + Returns current live custom branding. + + Raises RuntimeError on error. + """ + response, data = self.api_call('GET', + '/admin/v1/branding', + params={}) + return self.parse_json_response(response, data) + + def get_draft_custom_branding(self): + """ + Returns current draft custom branding. + + Raises RuntimeError on error. + """ + response, data = self.api_call('GET', + '/admin/v1/branding/draft', + params={}) + return self.parse_json_response(response, data) + + def get_custom_messaging(self): + """ + Returns current messaging. + + Raises RuntimeError on error. + """ + response, data = self.api_call('GET', + '/admin/v1/branding/custom_messaging', + params={}) + return self.parse_json_response(response, data) + def get_u2ftokens(self, limit=None, offset=0): """ Retrieves a list of u2ftokens