update to appwrite 1.3.0

This commit is contained in:
Christy Jacob
2023-04-11 23:57:49 +00:00
parent 96d23bea78
commit 27e0b16c63
37 changed files with 785 additions and 155 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ Account account = new Account(client);
account.create(
"[USER_ID]",
"email@example.com",
"password",
"",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -9,7 +9,7 @@ Client client = new Client(context)
Account account = new Account(client);
account.updatePassword(
"password",
"",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
+1 -1
View File
@@ -11,7 +11,7 @@ Databases databases = new Databases(client);
databases.getDocument(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"[DOCUMENT_ID]"
"[DOCUMENT_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -10,7 +10,6 @@ Teams teams = new Teams(client);
teams.createMembership(
"[TEAM_ID]",
"email@example.com",
listOf(),
"https://example.com",
new CoroutineCallback<>((result, error) -> {
+21
View File
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Teams teams = new Teams(client);
teams.getPrefs(
"[TEAM_ID]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -8,7 +8,7 @@ Client client = new Client(context)
Teams teams = new Teams(client);
teams.update(
teams.updateName(
"[TEAM_ID]",
"[NAME]"
new CoroutineCallback<>((result, error) -> {
+22
View File
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Teams;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Teams teams = new Teams(client);
teams.updatePrefs(
"[TEAM_ID]",
mapOf( "a" to "b" )
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);