mirror of
https://github.com/appwrite/sdk-for-android.git
synced 2026-04-07 19:17:49 +00:00
chore: regenerate
This commit is contained in:
@@ -4,7 +4,6 @@ import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setAdmin("") //
|
||||
.setSession("") // The user session to authenticate with
|
||||
.setKey("") //
|
||||
.setJWT("<YOUR_JWT>"); // Your secret JSON Web Token
|
||||
|
||||
@@ -4,7 +4,9 @@ import io.appwrite.services.Databases;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.setSession("") // The user session to authenticate with
|
||||
.setKey("") //
|
||||
.setJWT("<YOUR_JWT>"); // Your secret JSON Web Token
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
|
||||
@@ -12,8 +14,6 @@ databases.upsertDocument(
|
||||
"<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();
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Tables;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setSession("") // The user session to authenticate with
|
||||
.setKey("") //
|
||||
.setJWT("<YOUR_JWT>"); // Your secret JSON Web Token
|
||||
|
||||
Tables tables = new Tables(client);
|
||||
|
||||
tables.createRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Tables;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setAdmin("") //
|
||||
.setKey(""); //
|
||||
|
||||
Tables tables = new Tables(client);
|
||||
|
||||
tables.createRows(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
listOf(), // rows
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
+5
-8
@@ -1,20 +1,17 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
import io.appwrite.services.Tables;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
Tables tables = new Tables(client);
|
||||
|
||||
databases.decrementDocumentAttribute(
|
||||
tables.deleteRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
"<DOCUMENT_ID>", // documentId
|
||||
"", // attribute
|
||||
0, // value (optional)
|
||||
0, // min (optional)
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
+6
-8
@@ -1,20 +1,18 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Databases;
|
||||
import io.appwrite.services.Tables;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Databases databases = new Databases(client);
|
||||
Tables tables = new Tables(client);
|
||||
|
||||
databases.incrementDocumentAttribute(
|
||||
tables.getRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
"<DOCUMENT_ID>", // documentId
|
||||
"", // attribute
|
||||
0, // value (optional)
|
||||
0, // max (optional)
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
@@ -0,0 +1,24 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Tables;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Tables tables = new Tables(client);
|
||||
|
||||
tables.listRows(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
listOf(), // queries (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Tables;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
|
||||
Tables tables = new Tables(client);
|
||||
|
||||
tables.updateRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
mapOf( "a" to "b" ), // data (optional)
|
||||
listOf("read("any")"), // permissions (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import io.appwrite.Client;
|
||||
import io.appwrite.coroutines.CoroutineCallback;
|
||||
import io.appwrite.services.Tables;
|
||||
|
||||
Client client = new Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setSession("") // The user session to authenticate with
|
||||
.setKey("") //
|
||||
.setJWT("<YOUR_JWT>"); // Your secret JSON Web Token
|
||||
|
||||
Tables tables = new Tables(client);
|
||||
|
||||
tables.upsertRow(
|
||||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("Appwrite", result.toString());
|
||||
})
|
||||
);
|
||||
|
||||
@@ -4,7 +4,6 @@ import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setAdmin("") //
|
||||
.setSession("") // The user session to authenticate with
|
||||
.setKey("") //
|
||||
.setJWT("<YOUR_JWT>") // Your secret JSON Web Token
|
||||
|
||||
@@ -4,7 +4,9 @@ import io.appwrite.services.Databases
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.setSession("") // The user session to authenticate with
|
||||
.setKey("") //
|
||||
.setJWT("<YOUR_JWT>") // Your secret JSON Web Token
|
||||
|
||||
val databases = Databases(client)
|
||||
|
||||
@@ -12,6 +14,4 @@ val result = databases.upsertDocument(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
data = mapOf( "a" to "b" ),
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Tables
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setSession("") // The user session to authenticate with
|
||||
.setKey("") //
|
||||
.setJWT("<YOUR_JWT>") // Your secret JSON Web Token
|
||||
|
||||
val tables = Tables(client)
|
||||
|
||||
val result = tables.createRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ),
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Tables
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setAdmin("") //
|
||||
.setKey("") //
|
||||
|
||||
val tables = Tables(client)
|
||||
|
||||
val result = tables.createRows(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rows = listOf(),
|
||||
)
|
||||
+5
-8
@@ -1,18 +1,15 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
import io.appwrite.services.Tables
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
val tables = Tables(client)
|
||||
|
||||
val result = databases.decrementDocumentAttribute(
|
||||
val result = tables.deleteRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
attribute = "",
|
||||
value = 0, // (optional)
|
||||
min = 0, // (optional)
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
)
|
||||
+6
-8
@@ -1,18 +1,16 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Databases
|
||||
import io.appwrite.services.Tables
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val databases = Databases(client)
|
||||
val tables = Tables(client)
|
||||
|
||||
val result = databases.incrementDocumentAttribute(
|
||||
val result = tables.getRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
attribute = "",
|
||||
value = 0, // (optional)
|
||||
max = 0, // (optional)
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
queries = listOf(), // (optional)
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Tables
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val tables = Tables(client)
|
||||
|
||||
val result = tables.listRows(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
queries = listOf(), // (optional)
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Tables
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
|
||||
val tables = Tables(client)
|
||||
|
||||
val result = tables.updateRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
permissions = listOf("read("any")"), // (optional)
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.coroutines.CoroutineCallback
|
||||
import io.appwrite.services.Tables
|
||||
|
||||
val client = Client(context)
|
||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.setSession("") // The user session to authenticate with
|
||||
.setKey("") //
|
||||
.setJWT("<YOUR_JWT>") // Your secret JSON Web Token
|
||||
|
||||
val tables = Tables(client)
|
||||
|
||||
val result = tables.upsertRow(
|
||||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
)
|
||||
Reference in New Issue
Block a user