refactor: switch SDK methods to asynchronous
Migrate SDK interactions to asynchronous calls, relax admin setup email constraints, and add event retrieval functionality.
This commit is contained in:
1 parent
81c5e4e2fd
commit
bb938c33c0
36 files changed
+1679
-754
No files matched your search
+23
-9
@@ -38,7 +38,9 @@ export default function SdkGuidePage() {
|
||||
const list = setCached('vcon:clients', data.clients || []);
|
||||
setClients(list);
|
||||
if (list.length > 0) {
|
||||
setSelectedClientId((prev) => prev || list[0].clientId);
|
||||
setSelectedClientId((prev) =>
|
||||
list.some((c: any) => c.clientId === prev) ? prev : list[0].clientId
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
@@ -84,14 +86,26 @@ if client.connect():
|
||||
<PageShell
|
||||
title="Python SDK"
|
||||
actions={
|
||||
<Button
|
||||
size="xs"
|
||||
variant="secondary"
|
||||
icon="Copy"
|
||||
onClick={() => copySnippet(pythonSnippet, 'Snippet')}
|
||||
>
|
||||
Copy Code
|
||||
</Button>
|
||||
<>
|
||||
{activeClient?.token && (
|
||||
<Button
|
||||
size="xs"
|
||||
variant="secondary"
|
||||
icon="Key"
|
||||
onClick={() => copySnippet(activeClient.token, 'Client JWT token')}
|
||||
>
|
||||
Copy Token
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
size="xs"
|
||||
variant="secondary"
|
||||
icon="Copy"
|
||||
onClick={() => copySnippet(pythonSnippet, 'Snippet')}
|
||||
>
|
||||
Copy Code
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<StatStrip
|
||||
|
||||
Reference in new issue
Block a user