From c6f81fb895f5294dfa9a9674b962d580b4f4d1ee Mon Sep 17 00:00:00 2001
From: NotJoePesci <pesce.j.a@gmail.com>
Date: Wed, 1 May 2024 12:29:12 -0700
Subject: [PATCH] Added get_secret_key method to admin.py

Added a get_secret_key method to call the get_secret_key Admin v1 endpoint. Per Issue 254
---
 duo_client/admin.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/duo_client/admin.py b/duo_client/admin.py
index a045f47..94de697 100644
--- a/duo_client/admin.py
+++ b/duo_client/admin.py
@@ -2650,6 +2650,23 @@ def create_integration(self,
         )
         return response
 
+    def get_secret_key (self, integration_key):
+        """Returns the secret key of the specified integration.
+
+        integration_key - The ikey of the secret key to get.
+
+        Returns the skey
+        
+        Raises RuntimeError on error.
+        """
+        params = {}
+        response = self.json_api_call(
+            'GET',
+            '/admin/v1/integrations/' + integration_key + '/skey',
+            params,
+        )
+        return response
+
     def delete_integration(self, integration_key):
         """Deletes an integration.