feat: update examples

This commit is contained in:
Chirag Aggarwal 2025-09-05 17:30:39 +05:30
parent a9dbd6c3fa
commit 23c433c2ed
333 changed files with 3576 additions and 192 deletions

View file

@ -88,7 +88,7 @@
},
"require-dev": {
"ext-fileinfo": "*",
"appwrite/sdk-generator": "*",
"appwrite/sdk-generator": "dev-feat-object-example-handling",
"phpunit/phpunit": "9.*",
"swoole/ide-helper": "5.1.2",
"phpstan/phpstan": "1.8.*",

18
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "afc8b2b314887779f507fd6a101ef6af",
"content-hash": "37f7d1f59540c2b15e430cb60735ed44",
"packages": [
{
"name": "adhocore/jwt",
@ -5019,16 +5019,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "1.2.2",
"version": "dev-feat-object-example-handling",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "db229faf442a64094ebdea7d4b66f48184a7106f"
"reference": "70b527cee02552f97bd22182cb70d892a7d29e15"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/db229faf442a64094ebdea7d4b66f48184a7106f",
"reference": "db229faf442a64094ebdea7d4b66f48184a7106f",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/70b527cee02552f97bd22182cb70d892a7d29e15",
"reference": "70b527cee02552f97bd22182cb70d892a7d29e15",
"shasum": ""
},
"require": {
@ -5064,9 +5064,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.2.2"
"source": "https://github.com/appwrite/sdk-generator/tree/feat-object-example-handling"
},
"time": "2025-09-05T08:28:53+00:00"
"time": "2025-09-05T11:57:48+00:00"
},
{
"name": "doctrine/annotations",
@ -8524,7 +8524,9 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"stability-flags": {
"appwrite/sdk-generator": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {

View file

@ -9,7 +9,11 @@ Client client = new Client(context)
Account account = new Account(client);
account.updatePrefs(
mapOf( "a" to "b" ), // prefs
mapOf(
"language" to "en",
"timezone" to "UTC",
"darkTheme" to true
), // prefs
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();

View file

@ -12,7 +12,13 @@ databases.createDocument(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
"<DOCUMENT_ID>", // documentId
mapOf( "a" to "b" ), // data
mapOf(
"username" to "walter.obrien",
"email" to "walter.obrien@example.com",
"fullName" to "Walter O'Brien",
"age" to 30,
"isAdmin" to false
), // data
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {

View file

@ -12,7 +12,13 @@ tablesDB.createRow(
"<DATABASE_ID>", // databaseId
"<TABLE_ID>", // tableId
"<ROW_ID>", // rowId
mapOf( "a" to "b" ), // data
mapOf(
"username" to "walter.obrien",
"email" to "walter.obrien@example.com",
"fullName" to "Walter O'Brien",
"age" to 30,
"isAdmin" to false
), // data
listOf("read("any")"), // permissions (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {

View file

@ -9,5 +9,9 @@ val client = Client(context)
val account = Account(client)
val result = account.updatePrefs(
prefs = mapOf( "a" to "b" ),
prefs = mapOf(
"language" to "en",
"timezone" to "UTC",
"darkTheme" to true
),
)

View file

@ -12,6 +12,12 @@ val result = databases.createDocument(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documentId = "<DOCUMENT_ID>",
data = mapOf( "a" to "b" ),
data = mapOf(
"username" to "walter.obrien",
"email" to "walter.obrien@example.com",
"fullName" to "Walter O'Brien",
"age" to 30,
"isAdmin" to false
),
permissions = listOf("read("any")"), // (optional)
)

View file

@ -12,6 +12,12 @@ val result = tablesDB.createRow(
databaseId = "<DATABASE_ID>",
tableId = "<TABLE_ID>",
rowId = "<ROW_ID>",
data = mapOf( "a" to "b" ),
data = mapOf(
"username" to "walter.obrien",
"email" to "walter.obrien@example.com",
"fullName" to "Walter O'Brien",
"age" to 30,
"isAdmin" to false
),
permissions = listOf("read("any")"), // (optional)
)

View file

@ -7,5 +7,9 @@ Client client = Client()
Account account = Account(client);
User result = await account.updatePrefs(
prefs: {},
prefs: {
"language": "en",
"timezone": "UTC",
"darkTheme": true
},
);

View file

@ -10,6 +10,12 @@ Document result = await databases.createDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"], // optional
);

View file

@ -10,6 +10,12 @@ Row result = await tablesDB.createRow(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"], // optional
);

View file

@ -1,6 +1,10 @@
mutation {
accountUpdatePrefs(
prefs: "{}"
prefs: {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
) {
_id
_createdAt

View file

@ -3,7 +3,13 @@ mutation {
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
data: "{}",
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"]
) {
_id

View file

@ -3,7 +3,7 @@ mutation {
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
data: "{}",
data: {},
permissions: ["read("any")"]
) {
_id

View file

@ -3,7 +3,7 @@ mutation {
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documentId: "<DOCUMENT_ID>",
data: "{}",
data: {},
permissions: ["read("any")"]
) {
_id

View file

@ -5,7 +5,7 @@ mutation {
async: false,
path: "<PATH>",
method: "GET",
headers: "{}",
headers: {},
scheduledAt: "<SCHEDULED_AT>"
) {
_id

View file

@ -3,7 +3,13 @@ mutation {
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: "{}",
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"]
) {
_id

View file

@ -3,7 +3,7 @@ mutation {
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: "{}",
data: {},
permissions: ["read("any")"]
) {
_id

View file

@ -3,7 +3,7 @@ mutation {
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
rowId: "<ROW_ID>",
data: "{}",
data: {},
permissions: ["read("any")"]
) {
_id

View file

@ -1,7 +1,7 @@
mutation {
teamsUpdatePrefs(
teamId: "<TEAM_ID>",
prefs: "{}"
prefs: {}
) {
data
}

View file

@ -7,7 +7,11 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePrefs({
prefs: {}
prefs: {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
});
console.log(result);

View file

@ -10,7 +10,13 @@ const result = await databases.createDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
});

View file

@ -11,8 +11,8 @@ const result = await databases.decrementDocumentAttribute({
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: null, // optional
min: null // optional
value: 0, // optional
min: 0 // optional
});
console.log(result);

View file

@ -11,8 +11,8 @@ const result = await databases.incrementDocumentAttribute({
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
attribute: '',
value: null, // optional
max: null // optional
value: 0, // optional
max: 0 // optional
});
console.log(result);

View file

@ -9,7 +9,7 @@ const storage = new Storage(client);
const result = await storage.createFile({
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
file: await pickSingle(),
file: InputFile.fromPath('/path/to/file', 'filename'),
permissions: ["read("any")"] // optional
});

View file

@ -10,7 +10,13 @@ const result = await tablesDB.createRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
});

View file

@ -11,8 +11,8 @@ const result = await tablesDB.decrementRowColumn({
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
column: '',
value: null, // optional
min: null // optional
value: 0, // optional
min: 0 // optional
});
console.log(result);

View file

@ -11,8 +11,8 @@ const result = await tablesDB.incrementRowColumn({
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
column: '',
value: null, // optional
max: null // optional
value: 0, // optional
max: 0 // optional
});
console.log(result);

View file

@ -7,6 +7,6 @@ X-Appwrite-Project: <YOUR_PROJECT_ID>
{
"userId": "<USER_ID>",
"email": "email@example.com",
"password": ,
"password": "",
"name": "<NAME>"
}

View file

@ -7,6 +7,6 @@ X-Appwrite-Session:
X-Appwrite-JWT: <YOUR_JWT>
{
"password": ,
"password": "",
"oldPassword": "password"
}

View file

@ -7,5 +7,9 @@ X-Appwrite-Session:
X-Appwrite-JWT: <YOUR_JWT>
{
"prefs": {}
"prefs": {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
}

View file

@ -9,5 +9,5 @@ X-Appwrite-JWT: <YOUR_JWT>
{
"userId": "<USER_ID>",
"secret": "<SECRET>",
"password":
"password": ""
}

View file

@ -8,6 +8,12 @@ X-Appwrite-JWT: <YOUR_JWT>
{
"documentId": "<DOCUMENT_ID>",
"data": {},
"data": {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
"permissions": ["read(\"any\")"]
}

View file

@ -15,8 +15,7 @@ Content-Disposition: form-data; name="fileId"
--cec8e8123c05ba25
Content-Disposition: form-data; name="file"
cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc
e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16...
cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16...
--cec8e8123c05ba25
Content-Disposition: form-data; name="permissions[]"

View file

@ -8,6 +8,12 @@ X-Appwrite-JWT: <YOUR_JWT>
{
"rowId": "<ROW_ID>",
"data": {},
"data": {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
"permissions": ["read(\"any\")"]
}

View file

@ -7,7 +7,11 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePrefs({
prefs: {}
prefs: {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
});
console.log(result);

View file

@ -10,7 +10,13 @@ const result = await databases.createDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
});

View file

@ -9,7 +9,7 @@ const storage = new Storage(client);
const result = await storage.createFile({
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
file: document.getElementById('uploader').files[0],
file: document.getElementById('uploader/').files[0],
permissions: ["read("any")"] // optional
});

View file

@ -10,7 +10,13 @@ const result = await tablesDB.createRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
});

View file

@ -7,7 +7,11 @@ const client = new Client()
const account = new Account(client);
const result = await account.updatePrefs({
prefs: {}
prefs: {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
});
console.log(result);

View file

@ -10,7 +10,13 @@ const result = await databases.createDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
});

View file

@ -0,0 +1,17 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.createLineAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '' // optional
});
console.log(result);

View file

@ -0,0 +1,17 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.createPointAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '' // optional
});
console.log(result);

View file

@ -0,0 +1,17 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.createPolygonAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '' // optional
});
console.log(result);

View file

@ -0,0 +1,18 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.updateLineAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});
console.log(result);

View file

@ -0,0 +1,18 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.updatePointAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});
console.log(result);

View file

@ -0,0 +1,18 @@
import { Client, Databases } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const databases = new Databases(client);
const result = await databases.updatePolygonAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});
console.log(result);

View file

@ -8,7 +8,7 @@ const functions = new Functions(client);
const result = await functions.createDeployment({
functionId: '<FUNCTION_ID>',
code: document.getElementById('uploader').files[0],
code: document.getElementById('uploader/').files[0],
activate: false,
entrypoint: '<ENTRYPOINT>', // optional
commands: '<COMMANDS>' // optional

View file

@ -8,7 +8,7 @@ const sites = new Sites(client);
const result = await sites.createDeployment({
siteId: '<SITE_ID>',
code: document.getElementById('uploader').files[0],
code: document.getElementById('uploader/').files[0],
activate: false,
installCommand: '<INSTALL_COMMAND>', // optional
buildCommand: '<BUILD_COMMAND>', // optional

View file

@ -9,7 +9,7 @@ const storage = new Storage(client);
const result = await storage.createFile({
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
file: document.getElementById('uploader').files[0],
file: document.getElementById('uploader/').files[0],
permissions: ["read("any")"] // optional
});

View file

@ -0,0 +1,17 @@
import { Client, TablesDB } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createLineColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '' // optional
});
console.log(result);

View file

@ -0,0 +1,17 @@
import { Client, TablesDB } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createPointColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '' // optional
});
console.log(result);

View file

@ -0,0 +1,17 @@
import { Client, TablesDB } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createPolygonColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '' // optional
});
console.log(result);

View file

@ -10,7 +10,13 @@ const result = await tablesDB.createRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
});

View file

@ -0,0 +1,18 @@
import { Client, TablesDB } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateLineColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});
console.log(result);

View file

@ -0,0 +1,18 @@
import { Client, TablesDB } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.updatePointColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});
console.log(result);

View file

@ -0,0 +1,18 @@
import { Client, TablesDB } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.updatePolygonColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});
console.log(result);

View file

@ -8,5 +8,9 @@ Client client = Client()
Account account = Account(client);
User result = await account.updatePrefs(
prefs: {},
prefs: {
"language": "en",
"timezone": "UTC",
"darkTheme": true
},
);

View file

@ -11,6 +11,12 @@ Document result = await databases.createDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"], // (optional)
);

View file

@ -0,0 +1,16 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
AttributeLine result = await databases.createLineAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
);

View file

@ -0,0 +1,16 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
AttributePoint result = await databases.createPointAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
);

View file

@ -0,0 +1,16 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
AttributePolygon result = await databases.createPolygonAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
);

View file

@ -0,0 +1,17 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
AttributeLine result = await databases.updateLineAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
newKey: '', // (optional)
);

View file

@ -0,0 +1,17 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
AttributePoint result = await databases.updatePointAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
newKey: '', // (optional)
);

View file

@ -0,0 +1,17 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
AttributePolygon result = await databases.updatePolygonAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
newKey: '', // (optional)
);

View file

@ -0,0 +1,16 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
TablesDB tablesDB = TablesDB(client);
ColumnLine result = await tablesDB.createLineColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
);

View file

@ -0,0 +1,16 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
TablesDB tablesDB = TablesDB(client);
ColumnPoint result = await tablesDB.createPointColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
);

View file

@ -0,0 +1,16 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
TablesDB tablesDB = TablesDB(client);
ColumnPolygon result = await tablesDB.createPolygonColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
);

View file

@ -11,6 +11,12 @@ Row result = await tablesDB.createRow(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"], // (optional)
);

View file

@ -0,0 +1,17 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
TablesDB tablesDB = TablesDB(client);
ColumnLine result = await tablesDB.updateLineColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
newKey: '', // (optional)
);

View file

@ -0,0 +1,17 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
TablesDB tablesDB = TablesDB(client);
ColumnPoint result = await tablesDB.updatePointColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
newKey: '', // (optional)
);

View file

@ -0,0 +1,17 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
TablesDB tablesDB = TablesDB(client);
ColumnPolygon result = await tablesDB.updatePolygonColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
xrequired: false,
xdefault: '', // (optional)
newKey: '', // (optional)
);

View file

@ -8,5 +8,9 @@ const client = new Client()
const account = new Account(client);
const response = await account.updatePrefs({
prefs: {}
prefs: {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
});

View file

@ -11,6 +11,12 @@ const response = await databases.createDocument({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
});

View file

@ -0,0 +1,16 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.createLineAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '' // optional
});

View file

@ -0,0 +1,16 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.createPointAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '' // optional
});

View file

@ -0,0 +1,16 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.createPolygonAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '' // optional
});

View file

@ -0,0 +1,17 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.updateLineAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});

View file

@ -0,0 +1,17 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.updatePointAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});

View file

@ -0,0 +1,17 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.updatePolygonAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});

View file

@ -0,0 +1,16 @@
import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const response = await tablesDB.createLineColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '' // optional
});

View file

@ -0,0 +1,16 @@
import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const response = await tablesDB.createPointColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '' // optional
});

View file

@ -0,0 +1,16 @@
import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const response = await tablesDB.createPolygonColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '' // optional
});

View file

@ -11,6 +11,12 @@ const response = await tablesDB.createRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {},
data: {
"username": "walter.obrien",
"email": "walter.obrien@example.com",
"fullName": "Walter O'Brien",
"age": 30,
"isAdmin": false
},
permissions: ["read("any")"] // optional
});

View file

@ -0,0 +1,17 @@
import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const response = await tablesDB.updateLineColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});

View file

@ -0,0 +1,17 @@
import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const response = await tablesDB.updatePointColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});

View file

@ -0,0 +1,17 @@
import { Client, TablesDB } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const response = await tablesDB.updatePolygonColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: '', // optional
newKey: '' // optional
});

View file

@ -0,0 +1,18 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
AttributeLine result = await databases.CreateLineAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "" // optional
);

View file

@ -0,0 +1,18 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
AttributePoint result = await databases.CreatePointAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "" // optional
);

View file

@ -0,0 +1,18 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
AttributePolygon result = await databases.CreatePolygonAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "" // optional
);

View file

@ -0,0 +1,19 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
AttributeLine result = await databases.UpdateLineAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "", // optional
newKey: "" // optional
);

View file

@ -0,0 +1,19 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
AttributePoint result = await databases.UpdatePointAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "", // optional
newKey: "" // optional
);

View file

@ -0,0 +1,19 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
AttributePolygon result = await databases.UpdatePolygonAttribute(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: "", // optional
newKey: "" // optional
);

View file

@ -0,0 +1,18 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
TablesDB tablesDB = new TablesDB(client);
ColumnLine result = await tablesDB.CreateLineColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
key: "",
required: false,
default: "" // optional
);

View file

@ -0,0 +1,18 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
TablesDB tablesDB = new TablesDB(client);
ColumnPoint result = await tablesDB.CreatePointColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
key: "",
required: false,
default: "" // optional
);

View file

@ -0,0 +1,18 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
TablesDB tablesDB = new TablesDB(client);
ColumnPolygon result = await tablesDB.CreatePolygonColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
key: "",
required: false,
default: "" // optional
);

View file

@ -0,0 +1,19 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
TablesDB tablesDB = new TablesDB(client);
ColumnLine result = await tablesDB.UpdateLineColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
key: "",
required: false,
default: "", // optional
newKey: "" // optional
);

View file

@ -0,0 +1,19 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
TablesDB tablesDB = new TablesDB(client);
ColumnPoint result = await tablesDB.UpdatePointColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
key: "",
required: false,
default: "", // optional
newKey: "" // optional
);

View file

@ -0,0 +1,19 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
TablesDB tablesDB = new TablesDB(client);
ColumnPolygon result = await tablesDB.UpdatePolygonColumn(
databaseId: "<DATABASE_ID>",
tableId: "<TABLE_ID>",
key: "",
required: false,
default: "", // optional
newKey: "" // optional
);

View file

@ -0,0 +1,23 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/databases"
)
client := client.New(
client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1")
client.WithProject("<YOUR_PROJECT_ID>")
client.WithKey("<YOUR_API_KEY>")
)
service := databases.New(client)
response, error := service.CreateLineAttribute(
"<DATABASE_ID>",
"<COLLECTION_ID>",
"",
false,
databases.WithCreateLineAttributeDefault(""),
)

Some files were not shown because too many files have changed in this diff Show more