Skip to content

Commit d8096dc

Browse files
committed
Appwite 1.5 support
1 parent 42f7c02 commit d8096dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+847
-248
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
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 Kotlin 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)
1414

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

1717
## Installation
1818

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

4141
```groovy
42-
implementation("io.appwrite:sdk-for-kotlin:5.0.0-rc.6")
42+
implementation("io.appwrite:sdk-for-kotlin:5.0.0")
4343
```
4444

4545
### Maven
@@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file:
5050
<dependency>
5151
<groupId>io.appwrite</groupId>
5252
<artifactId>sdk-for-kotlin</artifactId>
53-
<version>5.0.0-rc.6</version>
53+
<version>5.0.0</version>
5454
</dependency>
5555
</dependencies>
5656
```

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
@@ -10,7 +10,7 @@ Client client = new Client()
1010

1111
Account account = new Account(client);
1212

13-
account.addAuthenticator(
13+
account.createMfaAuthenticator(
1414
AuthenticatorType.TOTP, // type
1515
new CoroutineCallback<>((result, error) -> {
1616
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()
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
5+
Client client = new Client()
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2") // Your project ID
8+
.setSession(""); // The user session to authenticate with
9+
10+
Account account = new Account(client);
11+
12+
account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
13+
if (error != null) {
14+
error.printStackTrace();
15+
return;
16+
}
17+
18+
System.out.println(result);
19+
}));

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
@@ -10,7 +10,7 @@ Client client = new Client()
1010

1111
Account account = new Account(client);
1212

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

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
@@ -9,7 +9,7 @@ Client client = new Client()
99

1010
Account account = new Account(client);
1111

12-
account.listFactors(new CoroutineCallback<>((result, error) -> {
12+
account.listMfaFactors(new CoroutineCallback<>((result, error) -> {
1313
if (error != null) {
1414
error.printStackTrace();
1515
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
@@ -10,7 +10,7 @@ Client client = new Client()
1010

1111
Account account = new Account(client);
1212

13-
account.deleteAuthenticator(
13+
account.updateMfaAuthenticator(
1414
AuthenticatorType.TOTP, // type
1515
"<OTP>", // otp
1616
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
@@ -9,7 +9,7 @@ Client client = new Client()
99

1010
Account account = new Account(client);
1111

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

0 commit comments

Comments
 (0)