Skip to content

Commit 0468a1b

Browse files
committed
Appwite 1.5 support
1 parent 1001681 commit 0468a1b

30 files changed

+353
-151
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
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)
1313

14-
![Appwrite](https://appwrite.io/images/github.png)
14+
![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)
1515

1616
## Installation
1717

@@ -38,7 +38,7 @@ repositories {
3838
Next, add the dependency to your project's `build.gradle(.kts)` file:
3939

4040
```groovy
41-
implementation("io.appwrite:sdk-for-android:5.0.0-rc.6")
41+
implementation("io.appwrite:sdk-for-android:5.0.0")
4242
```
4343

4444
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
4949
<dependency>
5050
<groupId>io.appwrite</groupId>
5151
<artifactId>sdk-for-android</artifactId>
52-
<version>5.0.0-rc.6</version>
52+
<version>5.0.0</version>
5353
</dependency>
5454
</dependencies>
5555
```

docs/examples/java/account/add-authenticator.md renamed to docs/examples/java/account/create-mfa-authenticator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99

1010
Account account = new Account(client);
1111

12-
account.addAuthenticator(
12+
account.createMfaAuthenticator(
1313
AuthenticatorType.TOTP, // type
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {

docs/examples/java/account/create-challenge.md renamed to docs/examples/java/account/create-mfa-challenge.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Client client = new Client(context)
99

1010
Account account = new Account(client);
1111

12-
account.createChallenge(
13-
AuthenticationFactor.TOTP, // factor
12+
account.createMfaChallenge(
13+
AuthenticationFactor.EMAIL, // factor
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {
1616
error.printStackTrace();
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
5+
Client client = new Client(context)
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2"); // Your project ID
8+
9+
Account account = new Account(client);
10+
11+
account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
12+
if (error != null) {
13+
error.printStackTrace();
14+
return;
15+
}
16+
17+
Log.d("Appwrite", result.toString());
18+
}));

docs/examples/java/account/verify-authenticator.md renamed to docs/examples/java/account/delete-mfa-authenticator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99

1010
Account account = new Account(client);
1111

12-
account.verifyAuthenticator(
12+
account.deleteMfaAuthenticator(
1313
AuthenticatorType.TOTP, // type
1414
"<OTP>", // otp
1515
new CoroutineCallback<>((result, error) -> {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
5+
Client client = new Client(context)
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2"); // Your project ID
8+
9+
Account account = new Account(client);
10+
11+
account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
12+
if (error != null) {
13+
error.printStackTrace();
14+
return;
15+
}
16+
17+
Log.d("Appwrite", result.toString());
18+
}));

docs/examples/java/account/list-factors.md renamed to docs/examples/java/account/list-mfa-factors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Client client = new Client(context)
88

99
Account account = new Account(client);
1010

11-
account.listFactors(new CoroutineCallback<>((result, error) -> {
11+
account.listMfaFactors(new CoroutineCallback<>((result, error) -> {
1212
if (error != null) {
1313
error.printStackTrace();
1414
return;

docs/examples/java/account/delete-authenticator.md renamed to docs/examples/java/account/update-mfa-authenticator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99

1010
Account account = new Account(client);
1111

12-
account.deleteAuthenticator(
12+
account.updateMfaAuthenticator(
1313
AuthenticatorType.TOTP, // type
1414
"<OTP>", // otp
1515
new CoroutineCallback<>((result, error) -> {

docs/examples/java/account/update-challenge.md renamed to docs/examples/java/account/update-mfa-challenge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Client client = new Client(context)
88

99
Account account = new Account(client);
1010

11-
account.updateChallenge(
11+
account.updateMfaChallenge(
1212
"<CHALLENGE_ID>", // challengeId
1313
"<OTP>", // otp
1414
new CoroutineCallback<>((result, error) -> {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
5+
Client client = new Client(context)
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2"); // Your project ID
8+
9+
Account account = new Account(client);
10+
11+
account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
12+
if (error != null) {
13+
error.printStackTrace();
14+
return;
15+
}
16+
17+
Log.d("Appwrite", result.toString());
18+
}));

0 commit comments

Comments
 (0)