mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Sync docs
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
import io.appwrite.enums.AuthenticatorType;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createMFAAuthenticator(
|
||||
AuthenticatorType.TOTP, // type
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
import io.appwrite.enums.AuthenticationFactor;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createMFAChallenge(
|
||||
AuthenticationFactor.EMAIL, // factor
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
}));
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createMfaAuthenticator(
|
||||
account.createMFAAuthenticator(
|
||||
AuthenticatorType.TOTP, // type
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createMfaChallenge(
|
||||
account.createMFAChallenge(
|
||||
AuthenticationFactor.EMAIL, // factor
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
||||
@@ -8,7 +8,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
account.createMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
import io.appwrite.enums.AuthenticatorType;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.deleteMFAAuthenticator(
|
||||
AuthenticatorType.TOTP, // type
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.deleteMfaAuthenticator(
|
||||
account.deleteMFAAuthenticator(
|
||||
AuthenticatorType.TOTP, // type
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
}));
|
||||
@@ -8,7 +8,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
account.getMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.listMFAFactors(new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
}));
|
||||
@@ -8,7 +8,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.listMfaFactors(new CoroutineCallback<>((result, error) -> {
|
||||
account.listMFAFactors(new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
import io.appwrite.enums.AuthenticatorType;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateMFAAuthenticator(
|
||||
AuthenticatorType.TOTP, // type
|
||||
"<OTP>", // otp
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateMFAChallenge(
|
||||
"<CHALLENGE_ID>", // challengeId
|
||||
"<OTP>", // otp
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Account;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
}));
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateMfaAuthenticator(
|
||||
account.updateMFAAuthenticator(
|
||||
AuthenticatorType.TOTP, // type
|
||||
"<OTP>", // otp
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
|
||||
@@ -8,7 +8,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateMfaChallenge(
|
||||
account.updateMFAChallenge(
|
||||
"<CHALLENGE_ID>", // challengeId
|
||||
"<OTP>", // otp
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
|
||||
@@ -8,7 +8,7 @@ Client client = new Client(context)
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
account.updateMFARecoveryCodes(new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setAdmin("") //
|
||||
.setKey(""); //
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.createDocuments(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
listOf(), // documents
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Grids;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Grids grids = new Grids(client);
|
||||
|
||||
grids.createRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Grids;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Grids grids = new Grids(client);
|
||||
|
||||
grids.deleteRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Grids;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Grids grids = new Grids(client);
|
||||
|
||||
grids.getRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Grids;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Grids grids = new Grids(client);
|
||||
|
||||
grids.listRows(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Grids;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Grids grids = new Grids(client);
|
||||
|
||||
grids.updateRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Grids;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Grids grids = new Grids(client);
|
||||
|
||||
grids.upsertRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
import io.appwrite.enums.AuthenticatorType
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.createMFAAuthenticator(
|
||||
type = AuthenticatorType.TOTP,
|
||||
)
|
||||
@@ -1,14 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
import io.appwrite.enums.AuthenticationFactor
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.createMFAChallenge(
|
||||
factor = AuthenticationFactor.EMAIL,
|
||||
)
|
||||
@@ -1,11 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.createMFARecoveryCodes()
|
||||
@@ -9,6 +9,6 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.createMfaAuthenticator(
|
||||
val result = account.createMFAAuthenticator(
|
||||
type = AuthenticatorType.TOTP,
|
||||
)
|
||||
@@ -9,6 +9,6 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.createMfaChallenge(
|
||||
val result = account.createMFAChallenge(
|
||||
factor = AuthenticationFactor.EMAIL,
|
||||
)
|
||||
@@ -8,4 +8,4 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.createMfaRecoveryCodes()
|
||||
val result = account.createMFARecoveryCodes()
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
import io.appwrite.enums.AuthenticatorType
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.deleteMFAAuthenticator(
|
||||
type = AuthenticatorType.TOTP,
|
||||
)
|
||||
@@ -9,6 +9,6 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.deleteMfaAuthenticator(
|
||||
val result = account.deleteMFAAuthenticator(
|
||||
type = AuthenticatorType.TOTP,
|
||||
)
|
||||
@@ -1,11 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.getMFARecoveryCodes()
|
||||
@@ -8,4 +8,4 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.getMfaRecoveryCodes()
|
||||
val result = account.getMFARecoveryCodes()
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.listMFAFactors()
|
||||
@@ -8,4 +8,4 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.listMfaFactors()
|
||||
val result = account.listMFAFactors()
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
import io.appwrite.enums.AuthenticatorType
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.updateMFAAuthenticator(
|
||||
type = AuthenticatorType.TOTP,
|
||||
otp = "<OTP>",
|
||||
)
|
||||
@@ -1,14 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.updateMFAChallenge(
|
||||
challengeId = "<CHALLENGE_ID>",
|
||||
otp = "<OTP>",
|
||||
)
|
||||
@@ -1,11 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Account
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.updateMFARecoveryCodes()
|
||||
@@ -9,7 +9,7 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.updateMfaAuthenticator(
|
||||
val result = account.updateMFAAuthenticator(
|
||||
type = AuthenticatorType.TOTP,
|
||||
otp = "<OTP>",
|
||||
)
|
||||
@@ -8,7 +8,7 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.updateMfaChallenge(
|
||||
val result = account.updateMFAChallenge(
|
||||
challengeId = "<CHALLENGE_ID>",
|
||||
otp = "<OTP>",
|
||||
)
|
||||
@@ -8,4 +8,4 @@ val client = Client(context)
|
||||
|
||||
val account = Account(client)
|
||||
|
||||
val result = account.updateMfaRecoveryCodes()
|
||||
val result = account.updateMFARecoveryCodes()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setAdmin("") //
|
||||
.setKey("") //
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
val result = databases.createDocuments(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
documents = listOf(),
|
||||
)
|
||||
@@ -1,17 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Grids
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val grids = Grids(client)
|
||||
|
||||
val result = grids.createRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ),
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
)
|
||||
@@ -1,15 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Grids
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val grids = Grids(client)
|
||||
|
||||
val result = grids.deleteRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
)
|
||||
@@ -1,16 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Grids
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val grids = Grids(client)
|
||||
|
||||
val result = grids.getRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
queries = listOf(), // (optional)
|
||||
)
|
||||
@@ -1,15 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Grids
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val grids = Grids(client)
|
||||
|
||||
val result = grids.listRows(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
queries = listOf(), // (optional)
|
||||
)
|
||||
@@ -1,17 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Grids
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val grids = Grids(client)
|
||||
|
||||
val result = grids.updateRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
)
|
||||
@@ -1,17 +0,0 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Grids
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val grids = Grids(client)
|
||||
|
||||
val result = grids.upsertRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
)
|
||||
@@ -1,13 +0,0 @@
|
||||
import Appwrite
|
||||
import AppwriteEnums
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaType = try await account.createMFAAuthenticator(
|
||||
type: .totp
|
||||
)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import Appwrite
|
||||
import AppwriteEnums
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaChallenge = try await account.createMFAChallenge(
|
||||
factor: .email
|
||||
)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaRecoveryCodes = try await account.createMFARecoveryCodes()
|
||||
|
||||
@@ -7,7 +7,7 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaType = try await account.createMfaAuthenticator(
|
||||
let mfaType = try await account.createMFAAuthenticator(
|
||||
type: .totp
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaChallenge = try await account.createMfaChallenge(
|
||||
let mfaChallenge = try await account.createMFAChallenge(
|
||||
factor: .email
|
||||
)
|
||||
|
||||
|
||||
@@ -6,5 +6,5 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaRecoveryCodes = try await account.createMfaRecoveryCodes()
|
||||
let mfaRecoveryCodes = try await account.createMFARecoveryCodes()
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import Appwrite
|
||||
import AppwriteEnums
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let result = try await account.deleteMFAAuthenticator(
|
||||
type: .totp
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let result = try await account.deleteMfaAuthenticator(
|
||||
let result = try await account.deleteMFAAuthenticator(
|
||||
type: .totp
|
||||
)
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaRecoveryCodes = try await account.getMFARecoveryCodes()
|
||||
|
||||
@@ -6,5 +6,5 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaRecoveryCodes = try await account.getMfaRecoveryCodes()
|
||||
let mfaRecoveryCodes = try await account.getMFARecoveryCodes()
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaFactors = try await account.listMFAFactors()
|
||||
|
||||
@@ -6,5 +6,5 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaFactors = try await account.listMfaFactors()
|
||||
let mfaFactors = try await account.listMFAFactors()
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import Appwrite
|
||||
import AppwriteEnums
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let user = try await account.updateMFAAuthenticator(
|
||||
type: .totp,
|
||||
otp: "<OTP>"
|
||||
)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let session = try await account.updateMFAChallenge(
|
||||
challengeId: "<CHALLENGE_ID>",
|
||||
otp: "<OTP>"
|
||||
)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaRecoveryCodes = try await account.updateMFARecoveryCodes()
|
||||
|
||||
@@ -7,7 +7,7 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let user = try await account.updateMfaAuthenticator(
|
||||
let user = try await account.updateMFAAuthenticator(
|
||||
type: .totp,
|
||||
otp: "<OTP>"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let session = try await account.updateMfaChallenge(
|
||||
let session = try await account.updateMFAChallenge(
|
||||
challengeId: "<CHALLENGE_ID>",
|
||||
otp: "<OTP>"
|
||||
)
|
||||
|
||||
@@ -6,5 +6,5 @@ let client = Client()
|
||||
|
||||
let account = Account(client)
|
||||
|
||||
let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes()
|
||||
let mfaRecoveryCodes = try await account.updateMFARecoveryCodes()
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setAdmin("") //
|
||||
.setKey("") //
|
||||
|
||||
let databases = Databases(client)
|
||||
|
||||
let documentList = try await databases.createDocuments(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documents: []
|
||||
)
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let grids = Grids(client)
|
||||
|
||||
let row = try await grids.createRow(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:],
|
||||
permissions: ["read("any")"] // optional
|
||||
)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let grids = Grids(client)
|
||||
|
||||
let result = try await grids.deleteRow(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>"
|
||||
)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let grids = Grids(client)
|
||||
|
||||
let row = try await grids.getRow(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
queries: [] // optional
|
||||
)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let grids = Grids(client)
|
||||
|
||||
let rowList = try await grids.listRows(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
queries: [] // optional
|
||||
)
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let grids = Grids(client)
|
||||
|
||||
let row = try await grids.updateRow(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:], // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
)
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
let grids = Grids(client)
|
||||
|
||||
let row = try await grids.upsertRow(
|
||||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:], // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user