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