mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 01:18:37 +00:00
Merge pull request #10855 from appwrite/update-sdk-examples-docs
Update SDK generator and regenerate Java/Kotlin documentation examples
This commit is contained in:
commit
aa98fbb2dc
189 changed files with 375 additions and 391 deletions
14
composer.lock
generated
14
composer.lock
generated
|
|
@ -5379,16 +5379,16 @@
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "appwrite/sdk-generator",
|
"name": "appwrite/sdk-generator",
|
||||||
"version": "1.5.8",
|
"version": "1.5.9",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||||
"reference": "05367bc4a4c3e020e9aca114ae875b626ce8fc55"
|
"reference": "ee434aa00a9185380b9a39bb46bf86d7104d3a93"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/05367bc4a4c3e020e9aca114ae875b626ce8fc55",
|
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ee434aa00a9185380b9a39bb46bf86d7104d3a93",
|
||||||
"reference": "05367bc4a4c3e020e9aca114ae875b626ce8fc55",
|
"reference": "ee434aa00a9185380b9a39bb46bf86d7104d3a93",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -5424,9 +5424,9 @@
|
||||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||||
"source": "https://github.com/appwrite/sdk-generator/tree/1.5.8"
|
"source": "https://github.com/appwrite/sdk-generator/tree/1.5.9"
|
||||||
},
|
},
|
||||||
"time": "2025-11-20T11:00:34+00:00"
|
"time": "2025-11-25T05:22:25+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/annotations",
|
"name": "doctrine/annotations",
|
||||||
|
|
@ -8917,5 +8917,5 @@
|
||||||
"platform-overrides": {
|
"platform-overrides": {
|
||||||
"php": "8.3"
|
"php": "8.3"
|
||||||
},
|
},
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.9.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ account.createOAuth2Session(
|
||||||
OAuthProvider.AMAZON, // provider
|
OAuthProvider.AMAZON, // provider
|
||||||
"https://example.com", // success (optional)
|
"https://example.com", // success (optional)
|
||||||
"https://example.com", // failure (optional)
|
"https://example.com", // failure (optional)
|
||||||
listOf(), // scopes (optional)
|
List.of(), // scopes (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ account.createOAuth2Token(
|
||||||
OAuthProvider.AMAZON, // provider
|
OAuthProvider.AMAZON, // provider
|
||||||
"https://example.com", // success (optional)
|
"https://example.com", // success (optional)
|
||||||
"https://example.com", // failure (optional)
|
"https://example.com", // failure (optional)
|
||||||
listOf(), // scopes (optional)
|
List.of(), // scopes (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||||
Account account = new Account(client);
|
Account account = new Account(client);
|
||||||
|
|
||||||
account.listIdentities(
|
account.listIdentities(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||||
Account account = new Account(client);
|
Account account = new Account(client);
|
||||||
|
|
||||||
account.listLogs(
|
account.listLogs(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ Client client = new Client(context)
|
||||||
Account account = new Account(client);
|
Account account = new Account(client);
|
||||||
|
|
||||||
account.updatePrefs(
|
account.updatePrefs(
|
||||||
mapOf(
|
Map.of(
|
||||||
"language" to "en",
|
"language", "en",
|
||||||
"timezone" to "UTC",
|
"timezone", "UTC",
|
||||||
"darkTheme" to true
|
"darkTheme", true
|
||||||
), // prefs
|
), // prefs
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
avatars.getScreenshot(
|
avatars.getScreenshot(
|
||||||
"https://example.com", // url
|
"https://example.com", // url
|
||||||
mapOf( "a" to "b" ), // headers (optional)
|
Map.of("a", "b"), // headers (optional)
|
||||||
1, // viewportWidth (optional)
|
1, // viewportWidth (optional)
|
||||||
1, // viewportHeight (optional)
|
1, // viewportHeight (optional)
|
||||||
0.1, // scale (optional)
|
0.1, // scale (optional)
|
||||||
|
|
@ -26,7 +26,7 @@ avatars.getScreenshot(
|
||||||
-180, // longitude (optional)
|
-180, // longitude (optional)
|
||||||
0, // accuracy (optional)
|
0, // accuracy (optional)
|
||||||
false, // touch (optional)
|
false, // touch (optional)
|
||||||
listOf(), // permissions (optional)
|
List.of(), // permissions (optional)
|
||||||
0, // sleep (optional)
|
0, // sleep (optional)
|
||||||
0, // width (optional)
|
0, // width (optional)
|
||||||
0, // height (optional)
|
0, // height (optional)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Databases;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
Client client = new Client(context)
|
Client client = new Client(context)
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -14,14 +14,14 @@ databases.createDocument(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<DOCUMENT_ID>", // documentId
|
"<DOCUMENT_ID>", // documentId
|
||||||
mapOf(
|
Map.of(
|
||||||
"username" to "walter.obrien",
|
"username", "walter.obrien",
|
||||||
"email" to "walter.obrien@example.com",
|
"email", "walter.obrien@example.com",
|
||||||
"fullName" to "Walter O'Brien",
|
"fullName", "Walter O'Brien",
|
||||||
"age" to 30,
|
"age", 30,
|
||||||
"isAdmin" to false
|
"isAdmin", false
|
||||||
), // data
|
), // data
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,15 @@ Databases databases = new Databases(client);
|
||||||
|
|
||||||
databases.createOperations(
|
databases.createOperations(
|
||||||
"<TRANSACTION_ID>", // transactionId
|
"<TRANSACTION_ID>", // transactionId
|
||||||
listOf(
|
List.of(Map.of(
|
||||||
{
|
"action", "create",
|
||||||
"action": "create",
|
"databaseId", "<DATABASE_ID>",
|
||||||
"databaseId": "<DATABASE_ID>",
|
"collectionId", "<COLLECTION_ID>",
|
||||||
"collectionId": "<COLLECTION_ID>",
|
"documentId", "<DOCUMENT_ID>",
|
||||||
"documentId": "<DOCUMENT_ID>",
|
"data", Map.of(
|
||||||
"data": {
|
"name", "Walter O'Brien"
|
||||||
"name": "Walter O'Brien"
|
)
|
||||||
}
|
)), // operations (optional)
|
||||||
}
|
|
||||||
), // operations (optional)
|
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ databases.getDocument(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<DOCUMENT_ID>", // documentId
|
"<DOCUMENT_ID>", // documentId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Databases databases = new Databases(client);
|
||||||
databases.listDocuments(
|
databases.listDocuments(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||||
Databases databases = new Databases(client);
|
Databases databases = new Databases(client);
|
||||||
|
|
||||||
databases.listTransactions(
|
databases.listTransactions(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Databases;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
Client client = new Client(context)
|
Client client = new Client(context)
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -14,8 +14,8 @@ databases.updateDocument(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<DOCUMENT_ID>", // documentId
|
"<DOCUMENT_ID>", // documentId
|
||||||
mapOf( "a" to "b" ), // data (optional)
|
Map.of("a", "b"), // data (optional)
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Databases;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
Client client = new Client(context)
|
Client client = new Client(context)
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -14,8 +14,8 @@ databases.upsertDocument(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<DOCUMENT_ID>", // documentId
|
"<DOCUMENT_ID>", // documentId
|
||||||
mapOf( "a" to "b" ), // data
|
Map.of("a", "b"), // data
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ functions.createExecution(
|
||||||
false, // async (optional)
|
false, // async (optional)
|
||||||
"<PATH>", // path (optional)
|
"<PATH>", // path (optional)
|
||||||
ExecutionMethod.GET, // method (optional)
|
ExecutionMethod.GET, // method (optional)
|
||||||
mapOf( "a" to "b" ), // headers (optional)
|
Map.of("a", "b"), // headers (optional)
|
||||||
"<SCHEDULED_AT>", // scheduledAt (optional)
|
"<SCHEDULED_AT>", // scheduledAt (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Functions functions = new Functions(client);
|
||||||
|
|
||||||
functions.listExecutions(
|
functions.listExecutions(
|
||||||
"<FUNCTION_ID>", // functionId
|
"<FUNCTION_ID>", // functionId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||||
Graphql graphql = new Graphql(client);
|
Graphql graphql = new Graphql(client);
|
||||||
|
|
||||||
graphql.mutation(
|
graphql.mutation(
|
||||||
mapOf( "a" to "b" ), // query
|
Map.of("a", "b"), // query
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||||
Graphql graphql = new Graphql(client);
|
Graphql graphql = new Graphql(client);
|
||||||
|
|
||||||
graphql.query(
|
graphql.query(
|
||||||
mapOf( "a" to "b" ), // query
|
Map.of("a", "b"), // query
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.models.InputFile;
|
import io.appwrite.models.InputFile;
|
||||||
import io.appwrite.services.Storage;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
Client client = new Client(context)
|
Client client = new Client(context)
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -15,7 +15,7 @@ storage.createFile(
|
||||||
"<BUCKET_ID>", // bucketId
|
"<BUCKET_ID>", // bucketId
|
||||||
"<FILE_ID>", // fileId
|
"<FILE_ID>", // fileId
|
||||||
InputFile.fromPath("file.png"), // file
|
InputFile.fromPath("file.png"), // file
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Storage storage = new Storage(client);
|
||||||
|
|
||||||
storage.listFiles(
|
storage.listFiles(
|
||||||
"<BUCKET_ID>", // bucketId
|
"<BUCKET_ID>", // bucketId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Storage;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Storage;
|
||||||
|
|
||||||
Client client = new Client(context)
|
Client client = new Client(context)
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -14,7 +14,7 @@ storage.updateFile(
|
||||||
"<BUCKET_ID>", // bucketId
|
"<BUCKET_ID>", // bucketId
|
||||||
"<FILE_ID>", // fileId
|
"<FILE_ID>", // fileId
|
||||||
"<NAME>", // name (optional)
|
"<NAME>", // name (optional)
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,15 @@ TablesDB tablesDB = new TablesDB(client);
|
||||||
|
|
||||||
tablesDB.createOperations(
|
tablesDB.createOperations(
|
||||||
"<TRANSACTION_ID>", // transactionId
|
"<TRANSACTION_ID>", // transactionId
|
||||||
listOf(
|
List.of(Map.of(
|
||||||
{
|
"action", "create",
|
||||||
"action": "create",
|
"databaseId", "<DATABASE_ID>",
|
||||||
"databaseId": "<DATABASE_ID>",
|
"tableId", "<TABLE_ID>",
|
||||||
"tableId": "<TABLE_ID>",
|
"rowId", "<ROW_ID>",
|
||||||
"rowId": "<ROW_ID>",
|
"data", Map.of(
|
||||||
"data": {
|
"name", "Walter O'Brien"
|
||||||
"name": "Walter O'Brien"
|
)
|
||||||
}
|
)), // operations (optional)
|
||||||
}
|
|
||||||
), // operations (optional)
|
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.TablesDB;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.TablesDB;
|
||||||
|
|
||||||
Client client = new Client(context)
|
Client client = new Client(context)
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -14,14 +14,14 @@ tablesDB.createRow(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<TABLE_ID>", // tableId
|
"<TABLE_ID>", // tableId
|
||||||
"<ROW_ID>", // rowId
|
"<ROW_ID>", // rowId
|
||||||
mapOf(
|
Map.of(
|
||||||
"username" to "walter.obrien",
|
"username", "walter.obrien",
|
||||||
"email" to "walter.obrien@example.com",
|
"email", "walter.obrien@example.com",
|
||||||
"fullName" to "Walter O'Brien",
|
"fullName", "Walter O'Brien",
|
||||||
"age" to 30,
|
"age", 30,
|
||||||
"isAdmin" to false
|
"isAdmin", false
|
||||||
), // data
|
), // data
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ tablesDB.getRow(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<TABLE_ID>", // tableId
|
"<TABLE_ID>", // tableId
|
||||||
"<ROW_ID>", // rowId
|
"<ROW_ID>", // rowId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ TablesDB tablesDB = new TablesDB(client);
|
||||||
tablesDB.listRows(
|
tablesDB.listRows(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<TABLE_ID>", // tableId
|
"<TABLE_ID>", // tableId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||||
TablesDB tablesDB = new TablesDB(client);
|
TablesDB tablesDB = new TablesDB(client);
|
||||||
|
|
||||||
tablesDB.listTransactions(
|
tablesDB.listTransactions(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.TablesDB;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.TablesDB;
|
||||||
|
|
||||||
Client client = new Client(context)
|
Client client = new Client(context)
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -14,8 +14,8 @@ tablesDB.updateRow(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<TABLE_ID>", // tableId
|
"<TABLE_ID>", // tableId
|
||||||
"<ROW_ID>", // rowId
|
"<ROW_ID>", // rowId
|
||||||
mapOf( "a" to "b" ), // data (optional)
|
Map.of("a", "b"), // data (optional)
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.TablesDB;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.TablesDB;
|
||||||
|
|
||||||
Client client = new Client(context)
|
Client client = new Client(context)
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -14,8 +14,8 @@ tablesDB.upsertRow(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<TABLE_ID>", // tableId
|
"<TABLE_ID>", // tableId
|
||||||
"<ROW_ID>", // rowId
|
"<ROW_ID>", // rowId
|
||||||
mapOf( "a" to "b" ), // data (optional)
|
Map.of("a", "b"), // data (optional)
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Teams teams = new Teams(client);
|
||||||
|
|
||||||
teams.createMembership(
|
teams.createMembership(
|
||||||
"<TEAM_ID>", // teamId
|
"<TEAM_ID>", // teamId
|
||||||
listOf(), // roles
|
List.of(), // roles
|
||||||
"email@example.com", // email (optional)
|
"email@example.com", // email (optional)
|
||||||
"<USER_ID>", // userId (optional)
|
"<USER_ID>", // userId (optional)
|
||||||
"+12065550100", // phone (optional)
|
"+12065550100", // phone (optional)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Teams teams = new Teams(client);
|
||||||
teams.create(
|
teams.create(
|
||||||
"<TEAM_ID>", // teamId
|
"<TEAM_ID>", // teamId
|
||||||
"<NAME>", // name
|
"<NAME>", // name
|
||||||
listOf(), // roles (optional)
|
List.of(), // roles (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Teams teams = new Teams(client);
|
||||||
|
|
||||||
teams.listMemberships(
|
teams.listMemberships(
|
||||||
"<TEAM_ID>", // teamId
|
"<TEAM_ID>", // teamId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Client client = new Client(context)
|
||||||
Teams teams = new Teams(client);
|
Teams teams = new Teams(client);
|
||||||
|
|
||||||
teams.list(
|
teams.list(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Teams teams = new Teams(client);
|
||||||
teams.updateMembership(
|
teams.updateMembership(
|
||||||
"<TEAM_ID>", // teamId
|
"<TEAM_ID>", // teamId
|
||||||
"<MEMBERSHIP_ID>", // membershipId
|
"<MEMBERSHIP_ID>", // membershipId
|
||||||
listOf(), // roles
|
List.of(), // roles
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Teams teams = new Teams(client);
|
||||||
|
|
||||||
teams.updatePrefs(
|
teams.updatePrefs(
|
||||||
"<TEAM_ID>", // teamId
|
"<TEAM_ID>", // teamId
|
||||||
mapOf( "a" to "b" ), // prefs
|
Map.of("a", "b"), // prefs
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,13 @@ val databases = Databases(client)
|
||||||
|
|
||||||
val result = databases.createOperations(
|
val result = databases.createOperations(
|
||||||
transactionId = "<TRANSACTION_ID>",
|
transactionId = "<TRANSACTION_ID>",
|
||||||
operations = listOf(
|
operations = listOf(mapOf(
|
||||||
{
|
"action" to "create",
|
||||||
"action": "create",
|
"databaseId" to "<DATABASE_ID>",
|
||||||
"databaseId": "<DATABASE_ID>",
|
"collectionId" to "<COLLECTION_ID>",
|
||||||
"collectionId": "<COLLECTION_ID>",
|
"documentId" to "<DOCUMENT_ID>",
|
||||||
"documentId": "<DOCUMENT_ID>",
|
"data" to mapOf(
|
||||||
"data": {
|
"name" to "Walter O'Brien"
|
||||||
"name": "Walter O'Brien"
|
)
|
||||||
}
|
)), // (optional)
|
||||||
}
|
|
||||||
), // (optional)
|
|
||||||
)
|
)
|
||||||
|
|
@ -10,15 +10,13 @@ val tablesDB = TablesDB(client)
|
||||||
|
|
||||||
val result = tablesDB.createOperations(
|
val result = tablesDB.createOperations(
|
||||||
transactionId = "<TRANSACTION_ID>",
|
transactionId = "<TRANSACTION_ID>",
|
||||||
operations = listOf(
|
operations = listOf(mapOf(
|
||||||
{
|
"action" to "create",
|
||||||
"action": "create",
|
"databaseId" to "<DATABASE_ID>",
|
||||||
"databaseId": "<DATABASE_ID>",
|
"tableId" to "<TABLE_ID>",
|
||||||
"tableId": "<TABLE_ID>",
|
"rowId" to "<ROW_ID>",
|
||||||
"rowId": "<ROW_ID>",
|
"data" to mapOf(
|
||||||
"data": {
|
"name" to "Walter O'Brien"
|
||||||
"name": "Walter O'Brien"
|
)
|
||||||
}
|
)), // (optional)
|
||||||
}
|
|
||||||
), // (optional)
|
|
||||||
)
|
)
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Client, Functions, } from "@appwrite.io/console";
|
import { Client, Functions, TemplateReferenceType } from "@appwrite.io/console";
|
||||||
|
|
||||||
const client = new Client()
|
const client = new Client()
|
||||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||||
|
|
@ -11,7 +11,7 @@ const result = await functions.createTemplateDeployment({
|
||||||
repository: '<REPOSITORY>',
|
repository: '<REPOSITORY>',
|
||||||
owner: '<OWNER>',
|
owner: '<OWNER>',
|
||||||
rootDirectory: '<ROOT_DIRECTORY>',
|
rootDirectory: '<ROOT_DIRECTORY>',
|
||||||
type: .Commit,
|
type: TemplateReferenceType.Commit,
|
||||||
reference: '<REFERENCE>',
|
reference: '<REFERENCE>',
|
||||||
activate: false // optional
|
activate: false // optional
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Client, Functions, VCSDeploymentType } from "@appwrite.io/console";
|
import { Client, Functions, VCSReferenceType } from "@appwrite.io/console";
|
||||||
|
|
||||||
const client = new Client()
|
const client = new Client()
|
||||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||||
|
|
@ -8,7 +8,7 @@ const functions = new Functions(client);
|
||||||
|
|
||||||
const result = await functions.createVcsDeployment({
|
const result = await functions.createVcsDeployment({
|
||||||
functionId: '<FUNCTION_ID>',
|
functionId: '<FUNCTION_ID>',
|
||||||
type: VCSDeploymentType.Branch,
|
type: VCSReferenceType.Branch,
|
||||||
reference: '<REFERENCE>',
|
reference: '<REFERENCE>',
|
||||||
activate: false // optional
|
activate: false // optional
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Client, Sites, } from "@appwrite.io/console";
|
import { Client, Sites, TemplateReferenceType } from "@appwrite.io/console";
|
||||||
|
|
||||||
const client = new Client()
|
const client = new Client()
|
||||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||||
|
|
@ -11,7 +11,7 @@ const result = await sites.createTemplateDeployment({
|
||||||
repository: '<REPOSITORY>',
|
repository: '<REPOSITORY>',
|
||||||
owner: '<OWNER>',
|
owner: '<OWNER>',
|
||||||
rootDirectory: '<ROOT_DIRECTORY>',
|
rootDirectory: '<ROOT_DIRECTORY>',
|
||||||
type: .Branch,
|
type: TemplateReferenceType.Branch,
|
||||||
reference: '<REFERENCE>',
|
reference: '<REFERENCE>',
|
||||||
activate: false // optional
|
activate: false // optional
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Client, Sites, VCSDeploymentType } from "@appwrite.io/console";
|
import { Client, Sites, VCSReferenceType } from "@appwrite.io/console";
|
||||||
|
|
||||||
const client = new Client()
|
const client = new Client()
|
||||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||||
|
|
@ -8,7 +8,7 @@ const sites = new Sites(client);
|
||||||
|
|
||||||
const result = await sites.createVcsDeployment({
|
const result = await sites.createVcsDeployment({
|
||||||
siteId: '<SITE_ID>',
|
siteId: '<SITE_ID>',
|
||||||
type: VCSDeploymentType.Branch,
|
type: VCSReferenceType.Branch,
|
||||||
reference: '<REFERENCE>',
|
reference: '<REFERENCE>',
|
||||||
activate: false // optional
|
activate: false // optional
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Deployment result = await functions.createTemplateDeployment(
|
||||||
repository: '<REPOSITORY>',
|
repository: '<REPOSITORY>',
|
||||||
owner: '<OWNER>',
|
owner: '<OWNER>',
|
||||||
rootDirectory: '<ROOT_DIRECTORY>',
|
rootDirectory: '<ROOT_DIRECTORY>',
|
||||||
type: .commit,
|
type: TemplateReferenceType.commit,
|
||||||
reference: '<REFERENCE>',
|
reference: '<REFERENCE>',
|
||||||
activate: false, // (optional)
|
activate: false, // (optional)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Functions functions = Functions(client);
|
||||||
|
|
||||||
Deployment result = await functions.createVcsDeployment(
|
Deployment result = await functions.createVcsDeployment(
|
||||||
functionId: '<FUNCTION_ID>',
|
functionId: '<FUNCTION_ID>',
|
||||||
type: VCSDeploymentType.branch,
|
type: VCSReferenceType.branch,
|
||||||
reference: '<REFERENCE>',
|
reference: '<REFERENCE>',
|
||||||
activate: false, // (optional)
|
activate: false, // (optional)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Deployment result = await sites.createTemplateDeployment(
|
||||||
repository: '<REPOSITORY>',
|
repository: '<REPOSITORY>',
|
||||||
owner: '<OWNER>',
|
owner: '<OWNER>',
|
||||||
rootDirectory: '<ROOT_DIRECTORY>',
|
rootDirectory: '<ROOT_DIRECTORY>',
|
||||||
type: .branch,
|
type: TemplateReferenceType.branch,
|
||||||
reference: '<REFERENCE>',
|
reference: '<REFERENCE>',
|
||||||
activate: false, // (optional)
|
activate: false, // (optional)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Sites sites = Sites(client);
|
||||||
|
|
||||||
Deployment result = await sites.createVcsDeployment(
|
Deployment result = await sites.createVcsDeployment(
|
||||||
siteId: '<SITE_ID>',
|
siteId: '<SITE_ID>',
|
||||||
type: VCSDeploymentType.branch,
|
type: VCSReferenceType.branch,
|
||||||
reference: '<REFERENCE>',
|
reference: '<REFERENCE>',
|
||||||
activate: false, // (optional)
|
activate: false, // (optional)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Deployment result = await functions.CreateTemplateDeployment(
|
||||||
repository: "<REPOSITORY>",
|
repository: "<REPOSITORY>",
|
||||||
owner: "<OWNER>",
|
owner: "<OWNER>",
|
||||||
rootDirectory: "<ROOT_DIRECTORY>",
|
rootDirectory: "<ROOT_DIRECTORY>",
|
||||||
type: .Commit,
|
type: TemplateReferenceType.Commit,
|
||||||
reference: "<REFERENCE>",
|
reference: "<REFERENCE>",
|
||||||
activate: false // optional
|
activate: false // optional
|
||||||
);
|
);
|
||||||
|
|
@ -12,7 +12,7 @@ Functions functions = new Functions(client);
|
||||||
|
|
||||||
Deployment result = await functions.CreateVcsDeployment(
|
Deployment result = await functions.CreateVcsDeployment(
|
||||||
functionId: "<FUNCTION_ID>",
|
functionId: "<FUNCTION_ID>",
|
||||||
type: VCSDeploymentType.Branch,
|
type: VCSReferenceType.Branch,
|
||||||
reference: "<REFERENCE>",
|
reference: "<REFERENCE>",
|
||||||
activate: false // optional
|
activate: false // optional
|
||||||
);
|
);
|
||||||
|
|
@ -15,7 +15,7 @@ Deployment result = await sites.CreateTemplateDeployment(
|
||||||
repository: "<REPOSITORY>",
|
repository: "<REPOSITORY>",
|
||||||
owner: "<OWNER>",
|
owner: "<OWNER>",
|
||||||
rootDirectory: "<ROOT_DIRECTORY>",
|
rootDirectory: "<ROOT_DIRECTORY>",
|
||||||
type: .Branch,
|
type: TemplateReferenceType.Branch,
|
||||||
reference: "<REFERENCE>",
|
reference: "<REFERENCE>",
|
||||||
activate: false // optional
|
activate: false // optional
|
||||||
);
|
);
|
||||||
|
|
@ -12,7 +12,7 @@ Sites sites = new Sites(client);
|
||||||
|
|
||||||
Deployment result = await sites.CreateVcsDeployment(
|
Deployment result = await sites.CreateVcsDeployment(
|
||||||
siteId: "<SITE_ID>",
|
siteId: "<SITE_ID>",
|
||||||
type: VCSDeploymentType.Branch,
|
type: VCSReferenceType.Branch,
|
||||||
reference: "<REFERENCE>",
|
reference: "<REFERENCE>",
|
||||||
activate: false // optional
|
activate: false // optional
|
||||||
);
|
);
|
||||||
|
|
@ -13,7 +13,7 @@ account.createOAuth2Token(
|
||||||
OAuthProvider.AMAZON, // provider
|
OAuthProvider.AMAZON, // provider
|
||||||
"https://example.com", // success (optional)
|
"https://example.com", // success (optional)
|
||||||
"https://example.com", // failure (optional)
|
"https://example.com", // failure (optional)
|
||||||
listOf(), // scopes (optional)
|
List.of(), // scopes (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Account account = new Account(client);
|
Account account = new Account(client);
|
||||||
|
|
||||||
account.listIdentities(
|
account.listIdentities(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Account account = new Account(client);
|
Account account = new Account(client);
|
||||||
|
|
||||||
account.listLogs(
|
account.listLogs(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ Client client = new Client()
|
||||||
Account account = new Account(client);
|
Account account = new Account(client);
|
||||||
|
|
||||||
account.updatePrefs(
|
account.updatePrefs(
|
||||||
mapOf(
|
Map.of(
|
||||||
"language" to "en",
|
"language", "en",
|
||||||
"timezone" to "UTC",
|
"timezone", "UTC",
|
||||||
"darkTheme" to true
|
"darkTheme", true
|
||||||
), // prefs
|
), // prefs
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Avatars avatars = new Avatars(client);
|
||||||
|
|
||||||
avatars.getScreenshot(
|
avatars.getScreenshot(
|
||||||
"https://example.com", // url
|
"https://example.com", // url
|
||||||
mapOf( "a" to "b" ), // headers (optional)
|
Map.of("a", "b"), // headers (optional)
|
||||||
1, // viewportWidth (optional)
|
1, // viewportWidth (optional)
|
||||||
1, // viewportHeight (optional)
|
1, // viewportHeight (optional)
|
||||||
0.1, // scale (optional)
|
0.1, // scale (optional)
|
||||||
|
|
@ -27,7 +27,7 @@ avatars.getScreenshot(
|
||||||
-180, // longitude (optional)
|
-180, // longitude (optional)
|
||||||
0, // accuracy (optional)
|
0, // accuracy (optional)
|
||||||
false, // touch (optional)
|
false, // touch (optional)
|
||||||
listOf(), // permissions (optional)
|
List.of(), // permissions (optional)
|
||||||
0, // sleep (optional)
|
0, // sleep (optional)
|
||||||
0, // width (optional)
|
0, // width (optional)
|
||||||
0, // height (optional)
|
0, // height (optional)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Databases;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
Client client = new Client()
|
Client client = new Client()
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -15,7 +15,7 @@ databases.createCollection(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<NAME>", // name
|
"<NAME>", // name
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
false, // documentSecurity (optional)
|
false, // documentSecurity (optional)
|
||||||
false, // enabled (optional)
|
false, // enabled (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Databases;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
Client client = new Client()
|
Client client = new Client()
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -15,14 +15,14 @@ databases.createDocument(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<DOCUMENT_ID>", // documentId
|
"<DOCUMENT_ID>", // documentId
|
||||||
mapOf(
|
Map.of(
|
||||||
"username" to "walter.obrien",
|
"username", "walter.obrien",
|
||||||
"email" to "walter.obrien@example.com",
|
"email", "walter.obrien@example.com",
|
||||||
"fullName" to "Walter O'Brien",
|
"fullName", "Walter O'Brien",
|
||||||
"age" to 30,
|
"age", 30,
|
||||||
"isAdmin" to false
|
"isAdmin", false
|
||||||
), // data
|
), // data
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Databases databases = new Databases(client);
|
||||||
databases.createDocuments(
|
databases.createDocuments(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
listOf(), // documents
|
List.of(), // documents
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ databases.createEnumAttribute(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
listOf(), // elements
|
List.of(), // elements
|
||||||
false, // required
|
false, // required
|
||||||
"<DEFAULT>", // default (optional)
|
"<DEFAULT>", // default (optional)
|
||||||
false, // array (optional)
|
false, // array (optional)
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ databases.createIndex(
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
IndexType.KEY, // type
|
IndexType.KEY, // type
|
||||||
listOf(), // attributes
|
List.of(), // attributes
|
||||||
listOf(), // orders (optional)
|
List.of(), // orders (optional)
|
||||||
listOf(), // lengths (optional)
|
List.of(), // lengths (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ databases.createLineAttribute(
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
false, // required
|
false, // required
|
||||||
listOf([1, 2], [3, 4], [5, 6]), // default (optional)
|
List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -11,17 +11,15 @@ Databases databases = new Databases(client);
|
||||||
|
|
||||||
databases.createOperations(
|
databases.createOperations(
|
||||||
"<TRANSACTION_ID>", // transactionId
|
"<TRANSACTION_ID>", // transactionId
|
||||||
listOf(
|
List.of(Map.of(
|
||||||
{
|
"action", "create",
|
||||||
"action": "create",
|
"databaseId", "<DATABASE_ID>",
|
||||||
"databaseId": "<DATABASE_ID>",
|
"collectionId", "<COLLECTION_ID>",
|
||||||
"collectionId": "<COLLECTION_ID>",
|
"documentId", "<DOCUMENT_ID>",
|
||||||
"documentId": "<DOCUMENT_ID>",
|
"data", Map.of(
|
||||||
"data": {
|
"name", "Walter O'Brien"
|
||||||
"name": "Walter O'Brien"
|
)
|
||||||
}
|
)), // operations (optional)
|
||||||
}
|
|
||||||
), // operations (optional)
|
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ databases.createPointAttribute(
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
false, // required
|
false, // required
|
||||||
listOf(1, 2), // default (optional)
|
List.of(1, 2), // default (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ databases.createPolygonAttribute(
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
false, // required
|
false, // required
|
||||||
listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional)
|
List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Databases databases = new Databases(client);
|
||||||
databases.deleteDocuments(
|
databases.deleteDocuments(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ databases.getDocument(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<DOCUMENT_ID>", // documentId
|
"<DOCUMENT_ID>", // documentId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Databases databases = new Databases(client);
|
||||||
databases.listAttributes(
|
databases.listAttributes(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Databases databases = new Databases(client);
|
||||||
|
|
||||||
databases.listCollections(
|
databases.listCollections(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Databases databases = new Databases(client);
|
||||||
databases.listDocuments(
|
databases.listDocuments(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Databases databases = new Databases(client);
|
||||||
databases.listIndexes(
|
databases.listIndexes(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Databases databases = new Databases(client);
|
Databases databases = new Databases(client);
|
||||||
|
|
||||||
databases.listTransactions(
|
databases.listTransactions(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Databases databases = new Databases(client);
|
Databases databases = new Databases(client);
|
||||||
|
|
||||||
databases.list(
|
databases.list(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Databases;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
Client client = new Client()
|
Client client = new Client()
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -15,7 +15,7 @@ databases.updateCollection(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<NAME>", // name
|
"<NAME>", // name
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
false, // documentSecurity (optional)
|
false, // documentSecurity (optional)
|
||||||
false, // enabled (optional)
|
false, // enabled (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Databases;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
Client client = new Client()
|
Client client = new Client()
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -15,8 +15,8 @@ databases.updateDocument(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<DOCUMENT_ID>", // documentId
|
"<DOCUMENT_ID>", // documentId
|
||||||
mapOf( "a" to "b" ), // data (optional)
|
Map.of("a", "b"), // data (optional)
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ Databases databases = new Databases(client);
|
||||||
databases.updateDocuments(
|
databases.updateDocuments(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
mapOf( "a" to "b" ), // data (optional)
|
Map.of("a", "b"), // data (optional)
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ databases.updateEnumAttribute(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
listOf(), // elements
|
List.of(), // elements
|
||||||
false, // required
|
false, // required
|
||||||
"<DEFAULT>", // default
|
"<DEFAULT>", // default
|
||||||
"", // newKey (optional)
|
"", // newKey (optional)
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ databases.updateLineAttribute(
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
false, // required
|
false, // required
|
||||||
listOf([1, 2], [3, 4], [5, 6]), // default (optional)
|
List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional)
|
||||||
"", // newKey (optional)
|
"", // newKey (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ databases.updatePointAttribute(
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
false, // required
|
false, // required
|
||||||
listOf(1, 2), // default (optional)
|
List.of(1, 2), // default (optional)
|
||||||
"", // newKey (optional)
|
"", // newKey (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ databases.updatePolygonAttribute(
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"", // key
|
"", // key
|
||||||
false, // required
|
false, // required
|
||||||
listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional)
|
List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional)
|
||||||
"", // newKey (optional)
|
"", // newKey (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Databases;
|
|
||||||
import io.appwrite.Permission;
|
import io.appwrite.Permission;
|
||||||
import io.appwrite.Role;
|
import io.appwrite.Role;
|
||||||
|
import io.appwrite.services.Databases;
|
||||||
|
|
||||||
Client client = new Client()
|
Client client = new Client()
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -15,8 +15,8 @@ databases.upsertDocument(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
"<DOCUMENT_ID>", // documentId
|
"<DOCUMENT_ID>", // documentId
|
||||||
mapOf( "a" to "b" ), // data
|
Map.of("a", "b"), // data
|
||||||
listOf(Permission.read(Role.any())), // permissions (optional)
|
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Databases databases = new Databases(client);
|
||||||
databases.upsertDocuments(
|
databases.upsertDocuments(
|
||||||
"<DATABASE_ID>", // databaseId
|
"<DATABASE_ID>", // databaseId
|
||||||
"<COLLECTION_ID>", // collectionId
|
"<COLLECTION_ID>", // collectionId
|
||||||
listOf(), // documents
|
List.of(), // documents
|
||||||
"<TRANSACTION_ID>", // transactionId (optional)
|
"<TRANSACTION_ID>", // transactionId (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ functions.createExecution(
|
||||||
false, // async (optional)
|
false, // async (optional)
|
||||||
"<PATH>", // path (optional)
|
"<PATH>", // path (optional)
|
||||||
ExecutionMethod.GET, // method (optional)
|
ExecutionMethod.GET, // method (optional)
|
||||||
mapOf( "a" to "b" ), // headers (optional)
|
Map.of("a", "b"), // headers (optional)
|
||||||
"<SCHEDULED_AT>", // scheduledAt (optional)
|
"<SCHEDULED_AT>", // scheduledAt (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Functions;
|
import io.appwrite.services.Functions;
|
||||||
import io.appwrite.enums.Type;
|
import io.appwrite.enums.TemplateReferenceType;
|
||||||
|
|
||||||
Client client = new Client()
|
Client client = new Client()
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -15,7 +15,7 @@ functions.createTemplateDeployment(
|
||||||
"<REPOSITORY>", // repository
|
"<REPOSITORY>", // repository
|
||||||
"<OWNER>", // owner
|
"<OWNER>", // owner
|
||||||
"<ROOT_DIRECTORY>", // rootDirectory
|
"<ROOT_DIRECTORY>", // rootDirectory
|
||||||
.COMMIT, // type
|
TemplateReferenceType.COMMIT, // type
|
||||||
"<REFERENCE>", // reference
|
"<REFERENCE>", // reference
|
||||||
false, // activate (optional)
|
false, // activate (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import io.appwrite.Client;
|
import io.appwrite.Client;
|
||||||
import io.appwrite.coroutines.CoroutineCallback;
|
import io.appwrite.coroutines.CoroutineCallback;
|
||||||
import io.appwrite.services.Functions;
|
import io.appwrite.services.Functions;
|
||||||
import io.appwrite.enums.VCSDeploymentType;
|
import io.appwrite.enums.VCSReferenceType;
|
||||||
|
|
||||||
Client client = new Client()
|
Client client = new Client()
|
||||||
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||||
|
|
@ -12,7 +12,7 @@ Functions functions = new Functions(client);
|
||||||
|
|
||||||
functions.createVcsDeployment(
|
functions.createVcsDeployment(
|
||||||
"<FUNCTION_ID>", // functionId
|
"<FUNCTION_ID>", // functionId
|
||||||
VCSDeploymentType.BRANCH, // type
|
VCSReferenceType.BRANCH, // type
|
||||||
"<REFERENCE>", // reference
|
"<REFERENCE>", // reference
|
||||||
false, // activate (optional)
|
false, // activate (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,15 @@ functions.create(
|
||||||
"<FUNCTION_ID>", // functionId
|
"<FUNCTION_ID>", // functionId
|
||||||
"<NAME>", // name
|
"<NAME>", // name
|
||||||
Runtime.NODE_14_5, // runtime
|
Runtime.NODE_14_5, // runtime
|
||||||
listOf("any"), // execute (optional)
|
List.of("any"), // execute (optional)
|
||||||
listOf(), // events (optional)
|
List.of(), // events (optional)
|
||||||
"", // schedule (optional)
|
"", // schedule (optional)
|
||||||
1, // timeout (optional)
|
1, // timeout (optional)
|
||||||
false, // enabled (optional)
|
false, // enabled (optional)
|
||||||
false, // logging (optional)
|
false, // logging (optional)
|
||||||
"<ENTRYPOINT>", // entrypoint (optional)
|
"<ENTRYPOINT>", // entrypoint (optional)
|
||||||
"<COMMANDS>", // commands (optional)
|
"<COMMANDS>", // commands (optional)
|
||||||
listOf(), // scopes (optional)
|
List.of(), // scopes (optional)
|
||||||
"<INSTALLATION_ID>", // installationId (optional)
|
"<INSTALLATION_ID>", // installationId (optional)
|
||||||
"<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional)
|
"<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional)
|
||||||
"<PROVIDER_BRANCH>", // providerBranch (optional)
|
"<PROVIDER_BRANCH>", // providerBranch (optional)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Functions functions = new Functions(client);
|
||||||
|
|
||||||
functions.listDeployments(
|
functions.listDeployments(
|
||||||
"<FUNCTION_ID>", // functionId
|
"<FUNCTION_ID>", // functionId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Functions functions = new Functions(client);
|
||||||
|
|
||||||
functions.listExecutions(
|
functions.listExecutions(
|
||||||
"<FUNCTION_ID>", // functionId
|
"<FUNCTION_ID>", // functionId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Functions functions = new Functions(client);
|
Functions functions = new Functions(client);
|
||||||
|
|
||||||
functions.list(
|
functions.list(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,15 @@ functions.update(
|
||||||
"<FUNCTION_ID>", // functionId
|
"<FUNCTION_ID>", // functionId
|
||||||
"<NAME>", // name
|
"<NAME>", // name
|
||||||
Runtime.NODE_14_5, // runtime (optional)
|
Runtime.NODE_14_5, // runtime (optional)
|
||||||
listOf("any"), // execute (optional)
|
List.of("any"), // execute (optional)
|
||||||
listOf(), // events (optional)
|
List.of(), // events (optional)
|
||||||
"", // schedule (optional)
|
"", // schedule (optional)
|
||||||
1, // timeout (optional)
|
1, // timeout (optional)
|
||||||
false, // enabled (optional)
|
false, // enabled (optional)
|
||||||
false, // logging (optional)
|
false, // logging (optional)
|
||||||
"<ENTRYPOINT>", // entrypoint (optional)
|
"<ENTRYPOINT>", // entrypoint (optional)
|
||||||
"<COMMANDS>", // commands (optional)
|
"<COMMANDS>", // commands (optional)
|
||||||
listOf(), // scopes (optional)
|
List.of(), // scopes (optional)
|
||||||
"<INSTALLATION_ID>", // installationId (optional)
|
"<INSTALLATION_ID>", // installationId (optional)
|
||||||
"<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional)
|
"<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional)
|
||||||
"<PROVIDER_BRANCH>", // providerBranch (optional)
|
"<PROVIDER_BRANCH>", // providerBranch (optional)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Graphql graphql = new Graphql(client);
|
Graphql graphql = new Graphql(client);
|
||||||
|
|
||||||
graphql.mutation(
|
graphql.mutation(
|
||||||
mapOf( "a" to "b" ), // query
|
Map.of("a", "b"), // query
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Graphql graphql = new Graphql(client);
|
Graphql graphql = new Graphql(client);
|
||||||
|
|
||||||
graphql.query(
|
graphql.query(
|
||||||
mapOf( "a" to "b" ), // query
|
Map.of("a", "b"), // query
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,12 @@ messaging.createEmail(
|
||||||
"<MESSAGE_ID>", // messageId
|
"<MESSAGE_ID>", // messageId
|
||||||
"<SUBJECT>", // subject
|
"<SUBJECT>", // subject
|
||||||
"<CONTENT>", // content
|
"<CONTENT>", // content
|
||||||
listOf(), // topics (optional)
|
List.of(), // topics (optional)
|
||||||
listOf(), // users (optional)
|
List.of(), // users (optional)
|
||||||
listOf(), // targets (optional)
|
List.of(), // targets (optional)
|
||||||
listOf(), // cc (optional)
|
List.of(), // cc (optional)
|
||||||
listOf(), // bcc (optional)
|
List.of(), // bcc (optional)
|
||||||
listOf(), // attachments (optional)
|
List.of(), // attachments (optional)
|
||||||
false, // draft (optional)
|
false, // draft (optional)
|
||||||
false, // html (optional)
|
false, // html (optional)
|
||||||
"", // scheduledAt (optional)
|
"", // scheduledAt (optional)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Messaging messaging = new Messaging(client);
|
||||||
messaging.createFCMProvider(
|
messaging.createFCMProvider(
|
||||||
"<PROVIDER_ID>", // providerId
|
"<PROVIDER_ID>", // providerId
|
||||||
"<NAME>", // name
|
"<NAME>", // name
|
||||||
mapOf( "a" to "b" ), // serviceAccountJSON (optional)
|
Map.of("a", "b"), // serviceAccountJSON (optional)
|
||||||
false, // enabled (optional)
|
false, // enabled (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ messaging.createPush(
|
||||||
"<MESSAGE_ID>", // messageId
|
"<MESSAGE_ID>", // messageId
|
||||||
"<TITLE>", // title (optional)
|
"<TITLE>", // title (optional)
|
||||||
"<BODY>", // body (optional)
|
"<BODY>", // body (optional)
|
||||||
listOf(), // topics (optional)
|
List.of(), // topics (optional)
|
||||||
listOf(), // users (optional)
|
List.of(), // users (optional)
|
||||||
listOf(), // targets (optional)
|
List.of(), // targets (optional)
|
||||||
mapOf( "a" to "b" ), // data (optional)
|
Map.of("a", "b"), // data (optional)
|
||||||
"<ACTION>", // action (optional)
|
"<ACTION>", // action (optional)
|
||||||
"<ID1:ID2>", // image (optional)
|
"<ID1:ID2>", // image (optional)
|
||||||
"<ICON>", // icon (optional)
|
"<ICON>", // icon (optional)
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,9 @@ Messaging messaging = new Messaging(client);
|
||||||
messaging.createSMS(
|
messaging.createSMS(
|
||||||
"<MESSAGE_ID>", // messageId
|
"<MESSAGE_ID>", // messageId
|
||||||
"<CONTENT>", // content
|
"<CONTENT>", // content
|
||||||
listOf(), // topics (optional)
|
List.of(), // topics (optional)
|
||||||
listOf(), // users (optional)
|
List.of(), // users (optional)
|
||||||
listOf(), // targets (optional)
|
List.of(), // targets (optional)
|
||||||
false, // draft (optional)
|
false, // draft (optional)
|
||||||
"", // scheduledAt (optional)
|
"", // scheduledAt (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Messaging messaging = new Messaging(client);
|
||||||
messaging.createTopic(
|
messaging.createTopic(
|
||||||
"<TOPIC_ID>", // topicId
|
"<TOPIC_ID>", // topicId
|
||||||
"<NAME>", // name
|
"<NAME>", // name
|
||||||
listOf("any"), // subscribe (optional)
|
List.of("any"), // subscribe (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client);
|
||||||
|
|
||||||
messaging.listMessageLogs(
|
messaging.listMessageLogs(
|
||||||
"<MESSAGE_ID>", // messageId
|
"<MESSAGE_ID>", // messageId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Messaging messaging = new Messaging(client);
|
Messaging messaging = new Messaging(client);
|
||||||
|
|
||||||
messaging.listMessages(
|
messaging.listMessages(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client);
|
||||||
|
|
||||||
messaging.listProviderLogs(
|
messaging.listProviderLogs(
|
||||||
"<PROVIDER_ID>", // providerId
|
"<PROVIDER_ID>", // providerId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Client client = new Client()
|
||||||
Messaging messaging = new Messaging(client);
|
Messaging messaging = new Messaging(client);
|
||||||
|
|
||||||
messaging.listProviders(
|
messaging.listProviders(
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client);
|
||||||
|
|
||||||
messaging.listSubscriberLogs(
|
messaging.listSubscriberLogs(
|
||||||
"<SUBSCRIBER_ID>", // subscriberId
|
"<SUBSCRIBER_ID>", // subscriberId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client);
|
||||||
|
|
||||||
messaging.listSubscribers(
|
messaging.listSubscribers(
|
||||||
"<TOPIC_ID>", // topicId
|
"<TOPIC_ID>", // topicId
|
||||||
listOf(), // queries (optional)
|
List.of(), // queries (optional)
|
||||||
"<SEARCH>", // search (optional)
|
"<SEARCH>", // search (optional)
|
||||||
false, // total (optional)
|
false, // total (optional)
|
||||||
new CoroutineCallback<>((result, error) -> {
|
new CoroutineCallback<>((result, error) -> {
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue