From bdad9832f492d5d7697670294a0123c2e3efe965 Mon Sep 17 00:00:00 2001
From: Ruslan Chernenko <ractyfree@gmail.com>
Date: Mon, 13 Jan 2025 13:55:09 +0300
Subject: [PATCH] feat: update edge management examples to reflect current
 state of the sdk

---
 README.md | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 78dbad8b..24ddd6e8 100644
--- a/README.md
+++ b/README.md
@@ -278,6 +278,10 @@ should not be necessary. This SDK provides a wrapper around the generated client
 
 #### Example: Creating an Edge Management API Client
 ```golang
+func emptyTotpCallback(ch chan string) {
+	ch <- "" // Send an empty string
+	close(ch)
+}
 
 apiUrl, _ = url.Parse("https://localhost:1280/edge/management/v1") 
 
@@ -294,7 +298,10 @@ credentials.CaPool = caPool
 
 //Note: the CA pool can be provided here or during the Authenticate(<creds>) call. It is allowed here to enable
 //      calls to REST API endpoints that do not require authentication.
-managementClient := edge_apis.NewManagementApiClient(apiUrl, credentials.GetCaPool()),
+var apiUrls []*url.URL
+apiUrls = append(apiUrls, apiUrl)
+
+managementClient := edge_apis.NewManagementApiClient(apiUrls, credentials.GetCaPool(), emptyTotpCallback)),
 
 //"configTypes" are string identifiers of configuration that can be requested by clients. Developers may
 //specify their own in order to provide distributed identity and/or service specific configurations.
@@ -324,7 +331,7 @@ credentials.CaPool = caPool
 
 //Note: the CA pool can be provided here or during the Authenticate(<creds>) call. It is allowed here to enable
 //      calls to REST API endpoints that do not require authentication.
-client := edge_apis.NewClientApiClient(apiUrl, credentials.GetCaPool()),
+client := edge_apis.NewClientApiClient(apiUrl, credentials.GetCaPool(), ),
 
 //"configTypes" are string identifiers of configuration that can be requested by clients. Developers may
 //specify their own in order to provide distributed identity and/or service specific configurations. The