chore: bug fixes and improvements

This commit is contained in:
Christy Jacob
2024-02-14 07:23:05 +00:00
parent d42be7aa66
commit 946cbe722e
243 changed files with 883 additions and 3041 deletions
+3 -3
View File
@@ -7,7 +7,7 @@
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
**This SDK is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-android/releases).**
**This SDK is compatible with Appwrite server version 1.4.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-android/releases).**
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Android SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
@@ -38,7 +38,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:
```groovy
implementation("io.appwrite:sdk-for-android:5.0.0-rc.1")
implementation("io.appwrite:sdk-for-android:4.0.1")
```
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
<dependency>
<groupId>io.appwrite</groupId>
<artifactId>sdk-for-android</artifactId>
<version>5.0.0-rc.1</version>
<version>4.0.1</version>
</dependency>
</dependencies>
```
+6 -5
View File
@@ -2,19 +2,20 @@ apply plugin: 'io.github.gradle-nexus.publish-plugin'
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.9.10"
ext.kotlin_version = "1.8.0"
version System.getenv("SDK_VERSION")
repositories {
maven { url "https://plugins.gradle.org/m2/" }
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:8.2.2"
classpath "com.android.tools.build:gradle:4.2.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.github.gradle-nexus:publish-plugin:1.3.0"
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
@@ -1,22 +0,0 @@
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;
}
@@ -1,22 +0,0 @@
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());
})
);
@@ -1,22 +0,0 @@
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,9 +8,9 @@ Client client = new Client(context)
Account account = new Account(client);
account.createEmailToken(
"[USER_ID]",
account.createEmailSession(
"email@example.com",
"password"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createEmailToken(
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,7 +8,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.createMagicURLToken(
account.createMagicURLSession(
"[USER_ID]",
"email@example.com",
new CoroutineCallback<>((result, error) -> {
@@ -19,4 +19,4 @@ account.createMagicURLToken(
Log.d("Appwrite", result.toString());
})
);
);
@@ -1,7 +1,6 @@
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
@@ -10,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.createOAuth2Session(
OAuthProvider.AMAZON,
"amazon",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +18,4 @@ account.createOAuth2Session(
Log.d("Appwrite", result.toString());
})
);
);
@@ -8,9 +8,9 @@ Client client = new Client(context)
Account account = new Account(client);
account.createPhoneToken(
account.createPhoneSession(
"[USER_ID]",
"+12065550100",
"+12065550100"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createPhoneToken(
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;
}
@@ -1,22 +0,0 @@
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());
})
);
);
@@ -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());
})
);
);
@@ -1,23 +0,0 @@
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());
})
);
);
@@ -1,21 +0,0 @@
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;
}
@@ -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://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;
}
@@ -1,22 +0,0 @@
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());
})
);
);
@@ -1,21 +0,0 @@
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());
})
);
);
@@ -8,9 +8,9 @@ Client client = new Client(context)
Account account = new Account(client);
account.createSession(
account.updatePhoneSession(
"[USER_ID]",
"[SECRET]",
"[SECRET]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createSession(
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());
})
);
);
@@ -1,22 +0,0 @@
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,7 +11,8 @@ Account account = new Account(client);
account.updateRecovery(
"[USER_ID]",
"[SECRET]",
"",
"password",
"password"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -20,4 +21,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());
})
);
);
@@ -1,23 +0,0 @@
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());
})
);
+2 -3
View File
@@ -1,7 +1,6 @@
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
@@ -10,7 +9,7 @@ Client client = new Client(context)
Avatars avatars = new Avatars(client);
avatars.getBrowser(
Browser.AVANT_BROWSER,
"aa",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +18,4 @@ avatars.getBrowser(
Log.d("Appwrite", result.toString());
})
);
);
@@ -1,7 +1,6 @@
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
@@ -10,7 +9,7 @@ Client client = new Client(context)
Avatars avatars = new Avatars(client);
avatars.getCreditCard(
CreditCard.AMERICAN_EXPRESS,
"amex",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +18,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());
})
);
);
+2 -3
View File
@@ -1,7 +1,6 @@
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
@@ -10,7 +9,7 @@ Client client = new Client(context)
Avatars avatars = new Avatars(client);
avatars.getFlag(
Flag.AFGHANISTAN,
"af",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -19,4 +18,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;
}
@@ -1,23 +0,0 @@
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());
})
);
@@ -1,22 +0,0 @@
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());
})
);
);
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.AuthenticatorFactor
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val response = account.addAuthenticator(
factor = AuthenticatorFactor.TOTP,
)
@@ -1,5 +1,4 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.AuthenticatorProvider
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val response = account.createChallenge(
provider = AuthenticatorProvider.TOTP,
)
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val response = account.createEmailPasswordSession(
email = "email@example.com",
password = "password",
)
@@ -1,5 +1,4 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
@@ -8,7 +7,7 @@ val client = Client(context)
val account = Account(client)
val response = account.createMagicURLToken(
userId = "[USER_ID]",
val response = account.createEmailSession(
email = "email@example.com",
)
password = "password"
)
@@ -1,5 +1,4 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
@@ -1,5 +1,4 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
@@ -8,7 +7,7 @@ val client = Client(context)
val account = Account(client)
val response = account.createEmailToken(
val response = account.createMagicURLSession(
userId = "[USER_ID]",
email = "email@example.com",
)
)
@@ -1,7 +1,5 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.OAuthProvider
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -10,5 +8,5 @@ val client = Client(context)
val account = Account(client)
account.createOAuth2Session(
provider = OAuthProvider.AMAZON,
)
provider = "amazon",
)

Some files were not shown because too many files have changed in this diff Show More