mirror of
https://github.com/appwrite/sdk-for-android.git
synced 2026-04-07 19:17:49 +00:00
Release candidate 4 for 1.5.x
This commit is contained in:
@@ -10,7 +10,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.addAuthenticator(
|
||||
AuthenticatorType.TOTP,
|
||||
AuthenticatorType.TOTP, // type
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.addAuthenticator(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createEmailPasswordSession(
|
||||
"email@example.com",
|
||||
"password",
|
||||
"email@example.com", // email
|
||||
"password", // password
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.createEmailPasswordSession(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,9 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createEmailToken(
|
||||
"[USER_ID]",
|
||||
"email@example.com",
|
||||
"[USER_ID]", // userId
|
||||
"email@example.com", // email
|
||||
false, // phrase (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +20,5 @@ account.createEmailToken(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createMagicURLToken(
|
||||
"[USER_ID]",
|
||||
"email@example.com",
|
||||
"[USER_ID]", // userId
|
||||
"email@example.com", // email
|
||||
"https://example.com", // url (optional)
|
||||
false, // phrase (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +21,5 @@ account.createMagicURLToken(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -10,7 +10,11 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createOAuth2Session(
|
||||
OAuthProvider.AMAZON,
|
||||
OAuthProvider.AMAZON, // provider
|
||||
"https://example.com", // success (optional)
|
||||
"https://example.com", // failure (optional)
|
||||
false, // token (optional)
|
||||
listOf(), // scopes (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +23,5 @@ account.createOAuth2Session(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createPhoneToken(
|
||||
"[USER_ID]",
|
||||
"+12065550100",
|
||||
"[USER_ID]", // userId
|
||||
"+12065550100", // phone
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.createPhoneToken(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,9 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createPushTarget(
|
||||
"[TARGET_ID]",
|
||||
"[IDENTIFIER]",
|
||||
"[TARGET_ID]", // targetId
|
||||
"[IDENTIFIER]", // identifier
|
||||
"[PROVIDER_ID]", // providerId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +20,5 @@ account.createPushTarget(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createRecovery(
|
||||
"email@example.com",
|
||||
"https://example.com",
|
||||
"email@example.com", // email
|
||||
"https://example.com", // url
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.createRecovery(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.createSession(
|
||||
"[USER_ID]",
|
||||
"[SECRET]",
|
||||
"[USER_ID]", // userId
|
||||
"[SECRET]", // secret
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.createSession(
|
||||
|
||||
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", // url
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.createVerification(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.create(
|
||||
"[USER_ID]",
|
||||
"email@example.com",
|
||||
"",
|
||||
"[USER_ID]", // userId
|
||||
"email@example.com", // email
|
||||
"", // password
|
||||
"[NAME]", // name (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +21,5 @@ account.create(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.create2FAChallenge(
|
||||
AuthenticationFactor.TOTP,
|
||||
AuthenticationFactor.TOTP, // factor
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.create2FAChallenge(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.deleteAuthenticator(
|
||||
AuthenticatorType.TOTP,
|
||||
"[OTP]",
|
||||
AuthenticatorType.TOTP, // type
|
||||
"[OTP]", // otp
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +20,5 @@ account.deleteAuthenticator(
|
||||
|
||||
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]", // identityId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.deleteIdentity(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.deletePushTarget(
|
||||
"[TARGET_ID]",
|
||||
"[TARGET_ID]", // targetId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.deletePushTarget(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.deleteSession(
|
||||
"[SESSION_ID]",
|
||||
"[SESSION_ID]", // sessionId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.deleteSession(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.getSession(
|
||||
"[SESSION_ID]",
|
||||
"[SESSION_ID]", // sessionId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.getSession(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.listIdentities(
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -17,4 +18,5 @@ account.listIdentities(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.listLogs(
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -17,4 +18,5 @@ account.listLogs(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateChallenge(
|
||||
"[CHALLENGE_ID]",
|
||||
"[OTP]",
|
||||
"[CHALLENGE_ID]", // challengeId
|
||||
"[OTP]", // otp
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.updateChallenge(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateEmail(
|
||||
"email@example.com",
|
||||
"password",
|
||||
"email@example.com", // email
|
||||
"password", // password
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.updateEmail(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateMFA(
|
||||
false,
|
||||
false, // mfa
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.updateMFA(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateMagicURLSession(
|
||||
"[USER_ID]",
|
||||
"[SECRET]",
|
||||
"[USER_ID]", // userId
|
||||
"[SECRET]", // secret
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.updateMagicURLSession(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateName(
|
||||
"[NAME]",
|
||||
"[NAME]", // name
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.updateName(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updatePassword(
|
||||
"",
|
||||
"", // password
|
||||
"password", // oldPassword (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +19,5 @@ account.updatePassword(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updatePhoneVerification(
|
||||
"[USER_ID]",
|
||||
"[SECRET]",
|
||||
"[USER_ID]", // userId
|
||||
"[SECRET]", // secret
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.updatePhoneVerification(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updatePhone(
|
||||
"+12065550100",
|
||||
"password",
|
||||
"+12065550100", // phone
|
||||
"password", // password
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.updatePhone(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updatePrefs(
|
||||
mapOf( "a" to "b" ),
|
||||
mapOf( "a" to "b" ), // prefs
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.updatePrefs(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updatePushTarget(
|
||||
"[TARGET_ID]",
|
||||
"[IDENTIFIER]",
|
||||
"[TARGET_ID]", // targetId
|
||||
"[IDENTIFIER]", // identifier
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.updatePushTarget(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateRecovery(
|
||||
"[USER_ID]",
|
||||
"[SECRET]",
|
||||
"",
|
||||
"[USER_ID]", // userId
|
||||
"[SECRET]", // secret
|
||||
"", // password
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +20,5 @@ account.updateRecovery(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateSession(
|
||||
"[SESSION_ID]",
|
||||
"[SESSION_ID]", // sessionId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ account.updateSession(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.updateVerification(
|
||||
"[USER_ID]",
|
||||
"[SECRET]",
|
||||
"[USER_ID]", // userId
|
||||
"[SECRET]", // secret
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ account.updateVerification(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ Client client = new Client(context)
|
||||
Account account = new Account(client);
|
||||
|
||||
account.verifyAuthenticator(
|
||||
AuthenticatorType.TOTP,
|
||||
"[OTP]",
|
||||
AuthenticatorType.TOTP, // type
|
||||
"[OTP]", // otp
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +20,5 @@ account.verifyAuthenticator(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@ Client client = new Client(context)
|
||||
Avatars avatars = new Avatars(client);
|
||||
|
||||
avatars.getBrowser(
|
||||
Browser.AVANT_BROWSER,
|
||||
Browser.AVANT_BROWSER, // code
|
||||
0, // width (optional)
|
||||
0, // height (optional)
|
||||
0, // quality (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +22,5 @@ avatars.getBrowser(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@ Client client = new Client(context)
|
||||
Avatars avatars = new Avatars(client);
|
||||
|
||||
avatars.getCreditCard(
|
||||
CreditCard.AMERICAN_EXPRESS,
|
||||
CreditCard.AMERICAN_EXPRESS, // code
|
||||
0, // width (optional)
|
||||
0, // height (optional)
|
||||
0, // quality (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +22,5 @@ avatars.getCreditCard(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Avatars avatars = new Avatars(client);
|
||||
|
||||
avatars.getFavicon(
|
||||
"https://example.com",
|
||||
"https://example.com", // url
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ avatars.getFavicon(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@ Client client = new Client(context)
|
||||
Avatars avatars = new Avatars(client);
|
||||
|
||||
avatars.getFlag(
|
||||
Flag.AFGHANISTAN,
|
||||
Flag.AFGHANISTAN, // code
|
||||
0, // width (optional)
|
||||
0, // height (optional)
|
||||
0, // quality (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +22,5 @@ avatars.getFlag(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@ Client client = new Client(context)
|
||||
Avatars avatars = new Avatars(client);
|
||||
|
||||
avatars.getImage(
|
||||
"https://example.com",
|
||||
"https://example.com", // url
|
||||
0, // width (optional)
|
||||
0, // height (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +20,5 @@ avatars.getImage(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@ Client client = new Client(context)
|
||||
Avatars avatars = new Avatars(client);
|
||||
|
||||
avatars.getInitials(
|
||||
"[NAME]", // name (optional)
|
||||
0, // width (optional)
|
||||
0, // height (optional)
|
||||
"", // background (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -17,4 +21,5 @@ avatars.getInitials(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@ Client client = new Client(context)
|
||||
Avatars avatars = new Avatars(client);
|
||||
|
||||
avatars.getQR(
|
||||
"[TEXT]",
|
||||
"[TEXT]", // text
|
||||
1, // size (optional)
|
||||
0, // margin (optional)
|
||||
false, // download (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +21,5 @@ avatars.getQR(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,10 +9,11 @@ Client client = new Client(context)
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.createDocument(
|
||||
"[DATABASE_ID]",
|
||||
"[COLLECTION_ID]",
|
||||
"[DOCUMENT_ID]",
|
||||
mapOf( "a" to "b" ),
|
||||
"[DATABASE_ID]", // databaseId
|
||||
"[COLLECTION_ID]", // collectionId
|
||||
"[DOCUMENT_ID]", // documentId
|
||||
mapOf( "a" to "b" ), // data
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -21,4 +22,5 @@ databases.createDocument(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ Client client = new Client(context)
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.deleteDocument(
|
||||
"[DATABASE_ID]",
|
||||
"[COLLECTION_ID]",
|
||||
"[DOCUMENT_ID]",
|
||||
"[DATABASE_ID]", // databaseId
|
||||
"[COLLECTION_ID]", // collectionId
|
||||
"[DOCUMENT_ID]", // documentId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +20,5 @@ databases.deleteDocument(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ Client client = new Client(context)
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.getDocument(
|
||||
"[DATABASE_ID]",
|
||||
"[COLLECTION_ID]",
|
||||
"[DOCUMENT_ID]",
|
||||
"[DATABASE_ID]", // databaseId
|
||||
"[COLLECTION_ID]", // collectionId
|
||||
"[DOCUMENT_ID]", // documentId
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +21,5 @@ databases.getDocument(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,9 @@ Client client = new Client(context)
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.listDocuments(
|
||||
"[DATABASE_ID]",
|
||||
"[COLLECTION_ID]",
|
||||
"[DATABASE_ID]", // databaseId
|
||||
"[COLLECTION_ID]", // collectionId
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +20,5 @@ databases.listDocuments(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,9 +9,11 @@ Client client = new Client(context)
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
databases.updateDocument(
|
||||
"[DATABASE_ID]",
|
||||
"[COLLECTION_ID]",
|
||||
"[DOCUMENT_ID]",
|
||||
"[DATABASE_ID]", // databaseId
|
||||
"[COLLECTION_ID]", // collectionId
|
||||
"[DOCUMENT_ID]", // documentId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +22,5 @@ databases.updateDocument(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,12 @@ Client client = new Client(context)
|
||||
Functions functions = new Functions(client);
|
||||
|
||||
functions.createExecution(
|
||||
"[FUNCTION_ID]",
|
||||
"[FUNCTION_ID]", // functionId
|
||||
"[BODY]", // body (optional)
|
||||
false, // async (optional)
|
||||
"[PATH]", // path (optional)
|
||||
ExecutionMethod.GET, // method (optional)
|
||||
mapOf( "a" to "b" ), // headers (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +23,5 @@ functions.createExecution(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Functions functions = new Functions(client);
|
||||
|
||||
functions.getExecution(
|
||||
"[FUNCTION_ID]",
|
||||
"[EXECUTION_ID]",
|
||||
"[FUNCTION_ID]", // functionId
|
||||
"[EXECUTION_ID]", // executionId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ functions.getExecution(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@ Client client = new Client(context)
|
||||
Functions functions = new Functions(client);
|
||||
|
||||
functions.listExecutions(
|
||||
"[FUNCTION_ID]",
|
||||
"[FUNCTION_ID]", // functionId
|
||||
listOf(), // queries (optional)
|
||||
"[SEARCH]", // search (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +20,5 @@ functions.listExecutions(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Graphql graphql = new Graphql(client);
|
||||
|
||||
graphql.mutation(
|
||||
mapOf( "a" to "b" ),
|
||||
mapOf( "a" to "b" ), // query
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ graphql.mutation(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Graphql graphql = new Graphql(client);
|
||||
|
||||
graphql.query(
|
||||
mapOf( "a" to "b" ),
|
||||
mapOf( "a" to "b" ), // query
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ graphql.query(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ Client client = new Client(context)
|
||||
Messaging messaging = new Messaging(client);
|
||||
|
||||
messaging.createSubscriber(
|
||||
"[TOPIC_ID]",
|
||||
"[SUBSCRIBER_ID]",
|
||||
"[TARGET_ID]",
|
||||
"[TOPIC_ID]", // topicId
|
||||
"[SUBSCRIBER_ID]", // subscriberId
|
||||
"[TARGET_ID]", // targetId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +20,5 @@ messaging.createSubscriber(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Messaging messaging = new Messaging(client);
|
||||
|
||||
messaging.deleteSubscriber(
|
||||
"[TOPIC_ID]",
|
||||
"[SUBSCRIBER_ID]",
|
||||
"[TOPIC_ID]", // topicId
|
||||
"[SUBSCRIBER_ID]", // subscriberId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ messaging.deleteSubscriber(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -10,9 +10,10 @@ Client client = new Client(context)
|
||||
Storage storage = new Storage(client);
|
||||
|
||||
storage.createFile(
|
||||
"[BUCKET_ID]",
|
||||
"[FILE_ID]",
|
||||
InputFile.fromPath("file.png"),
|
||||
"[BUCKET_ID]", // bucketId
|
||||
"[FILE_ID]", // fileId
|
||||
InputFile.fromPath("file.png"), // file
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -21,4 +22,5 @@ storage.createFile(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Storage storage = new Storage(client);
|
||||
|
||||
storage.deleteFile(
|
||||
"[BUCKET_ID]",
|
||||
"[FILE_ID]",
|
||||
"[BUCKET_ID]", // bucketId
|
||||
"[FILE_ID]", // fileId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ storage.deleteFile(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Storage storage = new Storage(client);
|
||||
|
||||
storage.getFileDownload(
|
||||
"[BUCKET_ID]",
|
||||
"[FILE_ID]",
|
||||
"[BUCKET_ID]", // bucketId
|
||||
"[FILE_ID]", // fileId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ storage.getFileDownload(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,19 @@ Client client = new Client(context)
|
||||
Storage storage = new Storage(client);
|
||||
|
||||
storage.getFilePreview(
|
||||
"[BUCKET_ID]",
|
||||
"[FILE_ID]",
|
||||
"[BUCKET_ID]", // bucketId
|
||||
"[FILE_ID]", // fileId
|
||||
0, // width (optional)
|
||||
0, // height (optional)
|
||||
ImageGravity.CENTER, // gravity (optional)
|
||||
0, // quality (optional)
|
||||
0, // borderWidth (optional)
|
||||
"", // borderColor (optional)
|
||||
0, // borderRadius (optional)
|
||||
0, // opacity (optional)
|
||||
-360, // rotation (optional)
|
||||
"", // background (optional)
|
||||
ImageFormat.JPG, // output (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +30,5 @@ storage.getFilePreview(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Storage storage = new Storage(client);
|
||||
|
||||
storage.getFileView(
|
||||
"[BUCKET_ID]",
|
||||
"[FILE_ID]",
|
||||
"[BUCKET_ID]", // bucketId
|
||||
"[FILE_ID]", // fileId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ storage.getFileView(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Storage storage = new Storage(client);
|
||||
|
||||
storage.getFile(
|
||||
"[BUCKET_ID]",
|
||||
"[FILE_ID]",
|
||||
"[BUCKET_ID]", // bucketId
|
||||
"[FILE_ID]", // fileId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ storage.getFile(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@ Client client = new Client(context)
|
||||
Storage storage = new Storage(client);
|
||||
|
||||
storage.listFiles(
|
||||
"[BUCKET_ID]",
|
||||
"[BUCKET_ID]", // bucketId
|
||||
listOf(), // queries (optional)
|
||||
"[SEARCH]", // search (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +20,5 @@ storage.listFiles(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ Client client = new Client(context)
|
||||
Storage storage = new Storage(client);
|
||||
|
||||
storage.updateFile(
|
||||
"[BUCKET_ID]",
|
||||
"[FILE_ID]",
|
||||
"[BUCKET_ID]", // bucketId
|
||||
"[FILE_ID]", // fileId
|
||||
"[NAME]", // name (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +21,5 @@ storage.updateFile(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,13 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.createMembership(
|
||||
"[TEAM_ID]",
|
||||
listOf(),
|
||||
"[TEAM_ID]", // teamId
|
||||
listOf(), // roles
|
||||
"email@example.com", // email (optional)
|
||||
"[USER_ID]", // userId (optional)
|
||||
"+12065550100", // phone (optional)
|
||||
"https://example.com", // url (optional)
|
||||
"[NAME]", // name (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +24,5 @@ teams.createMembership(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,9 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.create(
|
||||
"[TEAM_ID]",
|
||||
"[NAME]",
|
||||
"[TEAM_ID]", // teamId
|
||||
"[NAME]", // name
|
||||
listOf(), // roles (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +20,5 @@ teams.create(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.deleteMembership(
|
||||
"[TEAM_ID]",
|
||||
"[MEMBERSHIP_ID]",
|
||||
"[TEAM_ID]", // teamId
|
||||
"[MEMBERSHIP_ID]", // membershipId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ teams.deleteMembership(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.delete(
|
||||
"[TEAM_ID]",
|
||||
"[TEAM_ID]", // teamId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ teams.delete(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.getMembership(
|
||||
"[TEAM_ID]",
|
||||
"[MEMBERSHIP_ID]",
|
||||
"[TEAM_ID]", // teamId
|
||||
"[MEMBERSHIP_ID]", // membershipId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ teams.getMembership(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.getPrefs(
|
||||
"[TEAM_ID]",
|
||||
"[TEAM_ID]", // teamId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ teams.getPrefs(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.get(
|
||||
"[TEAM_ID]",
|
||||
"[TEAM_ID]", // teamId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +18,5 @@ teams.get(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.listMemberships(
|
||||
"[TEAM_ID]",
|
||||
"[TEAM_ID]", // teamId
|
||||
listOf(), // queries (optional)
|
||||
"[SEARCH]", // search (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -18,4 +20,5 @@ teams.listMemberships(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.list(
|
||||
listOf(), // queries (optional)
|
||||
"[SEARCH]", // search (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -17,4 +19,5 @@ teams.list(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.updateMembershipStatus(
|
||||
"[TEAM_ID]",
|
||||
"[MEMBERSHIP_ID]",
|
||||
"[USER_ID]",
|
||||
"[SECRET]",
|
||||
"[TEAM_ID]", // teamId
|
||||
"[MEMBERSHIP_ID]", // membershipId
|
||||
"[USER_ID]", // userId
|
||||
"[SECRET]", // secret
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -21,4 +21,5 @@ teams.updateMembershipStatus(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.updateMembership(
|
||||
"[TEAM_ID]",
|
||||
"[MEMBERSHIP_ID]",
|
||||
listOf(),
|
||||
"[TEAM_ID]", // teamId
|
||||
"[MEMBERSHIP_ID]", // membershipId
|
||||
listOf(), // roles
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -20,4 +20,5 @@ teams.updateMembership(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.updateName(
|
||||
"[TEAM_ID]",
|
||||
"[NAME]",
|
||||
"[TEAM_ID]", // teamId
|
||||
"[NAME]", // name
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ teams.updateName(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ Client client = new Client(context)
|
||||
Teams teams = new Teams(client);
|
||||
|
||||
teams.updatePrefs(
|
||||
"[TEAM_ID]",
|
||||
mapOf( "a" to "b" ),
|
||||
"[TEAM_ID]", // teamId
|
||||
mapOf( "a" to "b" ), // prefs
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -19,4 +19,5 @@ teams.updatePrefs(
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user