Example updates

This commit is contained in:
Jake Barnby
2024-02-19 17:12:47 +13:00
parent bc12187e62
commit aaccff6eb8
478 changed files with 1673 additions and 800 deletions
@@ -1,5 +1,5 @@
from appwrite.client import Client
from Appwrite.enums import AuthenticatorFactor
from Appwrite.enums import AuthenticatorType
client = Client()
@@ -11,4 +11,4 @@ client = Client()
account = Account(client)
result = account.add_authenticator(AuthenticatorFactor.TOTP)
result = account.add_authenticator(AuthenticatorType.TOTP)
@@ -0,0 +1,13 @@
from appwrite.client import Client
from Appwrite.enums import AuthenticationFactor
client = Client()
(client
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
)
account = Account(client)
result = account.create2_fa_challenge(AuthenticationFactor.TOTP)
@@ -1,5 +1,5 @@
from appwrite.client import Client
from Appwrite.enums import AuthenticatorProvider
from Appwrite.enums import AuthenticatorType
client = Client()
@@ -11,4 +11,4 @@ client = Client()
account = Account(client)
result = account.delete_authenticator(AuthenticatorProvider.TOTP, '[OTP]')
result = account.delete_authenticator(AuthenticatorType.TOTP, '[OTP]')
@@ -1,5 +1,5 @@
from appwrite.client import Client
from Appwrite.enums import AuthenticatorFactor
from Appwrite.enums import AuthenticatorType
client = Client()
@@ -11,4 +11,4 @@ client = Client()
account = Account(client)
result = account.verify_authenticator(AuthenticatorFactor.TOTP, '[OTP]')
result = account.verify_authenticator(AuthenticatorType.TOTP, '[OTP]')
@@ -0,0 +1,13 @@
from appwrite.client import Client
client = Client()
(client
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
)
health = Health(client)
result = health.get_certificate()
@@ -0,0 +1,14 @@
from appwrite.client import Client
from Appwrite.enums import
client = Client()
(client
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
)
health = Health(client)
result = health.get_failed_jobs(.V1-DATABASE)
@@ -1,5 +1,5 @@
from appwrite.client import Client
from Appwrite.enums import AuthenticatorProvider
from Appwrite.enums import AuthenticatorType
client = Client()
@@ -11,4 +11,4 @@ client = Client()
users = Users(client)
result = users.delete_authenticator('[USER_ID]', AuthenticatorProvider.TOTP, '[OTP]')
result = users.delete_authenticator('[USER_ID]', AuthenticatorType.TOTP, '[OTP]')
@@ -0,0 +1,13 @@
from appwrite.client import Client
client = Client()
(client
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
)
users = Users(client)
result = users.list_factors('[USER_ID]')