Release candidate for 1.5.x

This commit is contained in:
Jake Barnby
2024-02-05 23:39:43 +13:00
parent 312f026b41
commit 2766e15eab
249 changed files with 3232 additions and 887 deletions
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorFactor;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.addAuthenticator(
AuthenticatorFactor.TOTP,
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.createAnonymousSession(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorProvider;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createChallenge(
AuthenticatorProvider.TOTP,
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createEmailPasswordSession(
"email@example.com",
"password",
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.createMagicURLSession(
account.createEmailToken(
"[USER_ID]",
"email@example.com",
new CoroutineCallback<>((result, error) -> {
@@ -19,4 +19,4 @@ account.createMagicURLSession(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.createJWT(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -8,9 +8,9 @@ Client client = new Client(context)
Account account = new Account(client);
account.createEmailSession(
account.createMagicURLToken(
"[USER_ID]",
"email@example.com",
"password"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createEmailSession(
Log.d("Appwrite", result.toString());
})
);
);
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.OAuthProvider;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -9,7 +10,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.createOAuth2Session(
"amazon",
OAuthProvider.AMAZON,
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +19,4 @@ account.createOAuth2Session(
Log.d("Appwrite", result.toString());
})
);
);
@@ -8,9 +8,9 @@ Client client = new Client(context)
Account account = new Account(client);
account.createPhoneSession(
account.createPhoneToken(
"[USER_ID]",
"+12065550100"
"+12065550100",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createPhoneSession(
Log.d("Appwrite", result.toString());
})
);
);
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.createPhoneVerification(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createPushTarget(
"[TARGET_ID]",
"[IDENTIFIER]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -10,7 +10,7 @@ Account account = new Account(client);
account.createRecovery(
"email@example.com",
"https://example.com"
"https://example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createRecovery(
Log.d("Appwrite", result.toString());
})
);
);
@@ -8,9 +8,9 @@ Client client = new Client(context)
Account account = new Account(client);
account.updatePhoneSession(
account.createSession(
"[USER_ID]",
"[SECRET]"
"[SECRET]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.updatePhoneSession(
Log.d("Appwrite", result.toString());
})
);
);
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.createVerification(
"https://example.com"
"https://example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ account.createVerification(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -20,4 +20,4 @@ account.create(
Log.d("Appwrite", result.toString());
})
);
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorProvider;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.deleteAuthenticator(
AuthenticatorProvider.TOTP,
"[OTP]",
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.deleteIdentity(
"[IDENTITY_ID]"
"[IDENTITY_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ account.deleteIdentity(
Log.d("Appwrite", result.toString());
})
);
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.deletePushTarget(
"[TARGET_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.deleteSession(
"[SESSION_ID]"
"[SESSION_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ account.deleteSession(
Log.d("Appwrite", result.toString());
})
);
);
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.deleteSessions(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.getPrefs(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.getSession(
"[SESSION_ID]"
"[SESSION_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ account.getSession(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.get(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.listFactors(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -17,4 +17,4 @@ account.listIdentities(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -17,4 +17,4 @@ account.listLogs(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.listSessions(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateChallenge(
"[CHALLENGE_ID]",
"[OTP]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
+2 -2
View File
@@ -10,7 +10,7 @@ Account account = new Account(client);
account.updateEmail(
"email@example.com",
"password"
"password",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.updateEmail(
Log.d("Appwrite", result.toString());
})
);
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateMFA(
false,
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -10,7 +10,7 @@ Account account = new Account(client);
account.updateMagicURLSession(
"[USER_ID]",
"[SECRET]"
"[SECRET]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.updateMagicURLSession(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.updateName(
"[NAME]"
"[NAME]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ account.updateName(
Log.d("Appwrite", result.toString());
})
);
);
@@ -18,4 +18,4 @@ account.updatePassword(
Log.d("Appwrite", result.toString());
})
);
);
@@ -10,7 +10,7 @@ Account account = new Account(client);
account.updatePhoneVerification(
"[USER_ID]",
"[SECRET]"
"[SECRET]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.updatePhoneVerification(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -10,7 +10,7 @@ Account account = new Account(client);
account.updatePhone(
"+12065550100",
"password"
"password",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.updatePhone(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.updatePrefs(
mapOf( "a" to "b" )
mapOf( "a" to "b" ),
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ account.updatePrefs(
Log.d("Appwrite", result.toString());
})
);
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updatePushTarget(
"[TARGET_ID]",
"[IDENTIFIER]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -11,8 +11,7 @@ Account account = new Account(client);
account.updateRecovery(
"[USER_ID]",
"[SECRET]",
"password",
"password"
"",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,4 +20,4 @@ account.updateRecovery(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.updateSession(
"[SESSION_ID]"
"[SESSION_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ account.updateSession(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.updateStatus(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -10,7 +10,7 @@ Account account = new Account(client);
account.updateVerification(
"[USER_ID]",
"[SECRET]"
"[SECRET]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.updateVerification(
Log.d("Appwrite", result.toString());
})
);
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.AuthenticatorFactor;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.verifyAuthenticator(
AuthenticatorFactor.TOTP,
"[OTP]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
+3 -2
View File
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
import io.appwrite.enums.Browser;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -9,7 +10,7 @@ Client client = new Client(context)
Avatars avatars = new Avatars(client);
avatars.getBrowser(
"aa",
Browser.AVANT_BROWSER,
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +19,4 @@ avatars.getBrowser(
Log.d("Appwrite", result.toString());
})
);
);
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
import io.appwrite.enums.CreditCard;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -9,7 +10,7 @@ Client client = new Client(context)
Avatars avatars = new Avatars(client);
avatars.getCreditCard(
"amex",
CreditCard.AMERICAN_EXPRESS,
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +19,4 @@ avatars.getCreditCard(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Avatars avatars = new Avatars(client);
avatars.getFavicon(
"https://example.com"
"https://example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ avatars.getFavicon(
Log.d("Appwrite", result.toString());
})
);
);
+3 -2
View File
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
import io.appwrite.enums.Flag;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -9,7 +10,7 @@ Client client = new Client(context)
Avatars avatars = new Avatars(client);
avatars.getFlag(
"af",
Flag.AFGHANISTAN,
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +19,4 @@ avatars.getFlag(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -18,4 +18,4 @@ avatars.getImage(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -17,4 +17,4 @@ avatars.getInitials(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -18,4 +18,4 @@ avatars.getQR(
Log.d("Appwrite", result.toString());
})
);
);
@@ -21,4 +21,4 @@ databases.createDocument(
Log.d("Appwrite", result.toString());
})
);
);
@@ -11,7 +11,7 @@ Databases databases = new Databases(client);
databases.deleteDocument(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"[DOCUMENT_ID]"
"[DOCUMENT_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,4 +20,4 @@ databases.deleteDocument(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -20,4 +20,4 @@ databases.getDocument(
Log.d("Appwrite", result.toString());
})
);
);
@@ -19,4 +19,4 @@ databases.listDocuments(
Log.d("Appwrite", result.toString());
})
);
);
@@ -20,4 +20,4 @@ databases.updateDocument(
Log.d("Appwrite", result.toString());
})
);
);
@@ -18,4 +18,4 @@ functions.createExecution(
Log.d("Appwrite", result.toString());
})
);
);
@@ -10,7 +10,7 @@ Functions functions = new Functions(client);
functions.getExecution(
"[FUNCTION_ID]",
"[EXECUTION_ID]"
"[EXECUTION_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ functions.getExecution(
Log.d("Appwrite", result.toString());
})
);
);
@@ -18,4 +18,4 @@ functions.listExecutions(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Graphql graphql = new Graphql(client);
graphql.mutation(
mapOf( "a" to "b" )
mapOf( "a" to "b" ),
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ graphql.mutation(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Graphql graphql = new Graphql(client);
graphql.query(
mapOf( "a" to "b" )
mapOf( "a" to "b" ),
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ graphql.query(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Locale locale = new Locale(client);
locale.get(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Locale locale = new Locale(client);
locale.listCodes(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Locale locale = new Locale(client);
locale.listContinents(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -9,7 +9,7 @@ Client client = new Client(context)
Locale locale = new Locale(client);
locale.listCountriesEU(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -9,7 +9,7 @@ Client client = new Client(context)
Locale locale = new Locale(client);
locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Locale locale = new Locale(client);
locale.listCountries(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Locale locale = new Locale(client);
locale.listCurrencies(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
+1 -1
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Locale locale = new Locale(client);
locale.listLanguages(new CoroutineCallback<>((result, error) -> {
if (error != null)
if (error != null) {
error.printStackTrace();
return;
}
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Messaging;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Messaging messaging = new Messaging(client);
messaging.createSubscriber(
"[TOPIC_ID]",
"[SUBSCRIBER_ID]",
"[TARGET_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Messaging;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Messaging messaging = new Messaging(client);
messaging.deleteSubscriber(
"[TOPIC_ID]",
"[SUBSCRIBER_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
+1 -1
View File
@@ -21,4 +21,4 @@ storage.createFile(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -10,7 +10,7 @@ Storage storage = new Storage(client);
storage.deleteFile(
"[BUCKET_ID]",
"[FILE_ID]"
"[FILE_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ storage.deleteFile(
Log.d("Appwrite", result.toString());
})
);
);
@@ -10,7 +10,7 @@ Storage storage = new Storage(client);
storage.getFileDownload(
"[BUCKET_ID]",
"[FILE_ID]"
"[FILE_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ storage.getFileDownload(
Log.d("Appwrite", result.toString());
})
);
);
@@ -19,4 +19,4 @@ storage.getFilePreview(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -10,7 +10,7 @@ Storage storage = new Storage(client);
storage.getFileView(
"[BUCKET_ID]",
"[FILE_ID]"
"[FILE_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ storage.getFileView(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -10,7 +10,7 @@ Storage storage = new Storage(client);
storage.getFile(
"[BUCKET_ID]",
"[FILE_ID]"
"[FILE_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ storage.getFile(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -18,4 +18,4 @@ storage.listFiles(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -19,4 +19,4 @@ storage.updateFile(
Log.d("Appwrite", result.toString());
})
);
);
@@ -19,4 +19,4 @@ teams.createMembership(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -19,4 +19,4 @@ teams.create(
Log.d("Appwrite", result.toString());
})
);
);
@@ -10,7 +10,7 @@ Teams teams = new Teams(client);
teams.deleteMembership(
"[TEAM_ID]",
"[MEMBERSHIP_ID]"
"[MEMBERSHIP_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ teams.deleteMembership(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Teams teams = new Teams(client);
teams.delete(
"[TEAM_ID]"
"[TEAM_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ teams.delete(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -10,7 +10,7 @@ Teams teams = new Teams(client);
teams.getMembership(
"[TEAM_ID]",
"[MEMBERSHIP_ID]"
"[MEMBERSHIP_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ teams.getMembership(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Teams teams = new Teams(client);
teams.getPrefs(
"[TEAM_ID]"
"[TEAM_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ teams.getPrefs(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -9,7 +9,7 @@ Client client = new Client(context)
Teams teams = new Teams(client);
teams.get(
"[TEAM_ID]"
"[TEAM_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -18,4 +18,4 @@ teams.get(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -18,4 +18,4 @@ teams.listMemberships(
Log.d("Appwrite", result.toString());
})
);
);
+1 -1
View File
@@ -17,4 +17,4 @@ teams.list(
Log.d("Appwrite", result.toString());
})
);
);
@@ -12,7 +12,7 @@ teams.updateMembershipStatus(
"[TEAM_ID]",
"[MEMBERSHIP_ID]",
"[USER_ID]",
"[SECRET]"
"[SECRET]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -21,4 +21,4 @@ teams.updateMembershipStatus(
Log.d("Appwrite", result.toString());
})
);
);
@@ -11,7 +11,7 @@ Teams teams = new Teams(client);
teams.updateMembership(
"[TEAM_ID]",
"[MEMBERSHIP_ID]",
listOf()
listOf(),
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,4 +20,4 @@ teams.updateMembership(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -10,7 +10,7 @@ Teams teams = new Teams(client);
teams.updateName(
"[TEAM_ID]",
"[NAME]"
"[NAME]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ teams.updateName(
Log.d("Appwrite", result.toString());
})
);
);
+2 -2
View File
@@ -10,7 +10,7 @@ Teams teams = new Teams(client);
teams.updatePrefs(
"[TEAM_ID]",
mapOf( "a" to "b" )
mapOf( "a" to "b" ),
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ teams.updatePrefs(
Log.d("Appwrite", result.toString());
})
);
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Users;
import io.appwrite.enums.AuthenticatorProvider;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Users users = new Users(client);
users.deleteAuthenticator(
"[USER_ID]",
AuthenticatorProvider.TOTP,
"[OTP]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Users;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Users users = new Users(client);
users.listProviders(
"[USER_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);