mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Merge pull request #10444 from appwrite/update-examples
feat: update examples
This commit is contained in:
commit
4c6ede2ec3
306 changed files with 3588 additions and 158 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
),
|
||||
)
|
||||
|
|
@ -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)
|
||||
)
|
||||
|
|
@ -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)
|
||||
)
|
||||
|
|
@ -7,6 +7,10 @@ let client = Client()
|
|||
let account = Account(client)
|
||||
|
||||
let user = try await account.updatePrefs(
|
||||
prefs: [:]
|
||||
prefs: [
|
||||
"language": "en",
|
||||
"timezone": "UTC",
|
||||
"darkTheme": true
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ let document = try 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
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ let row = try 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
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,9 @@ Client client = Client()
|
|||
Account account = Account(client);
|
||||
|
||||
User result = await account.updatePrefs(
|
||||
prefs: {},
|
||||
prefs: {
|
||||
"language": "en",
|
||||
"timezone": "UTC",
|
||||
"darkTheme": true
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
mutation {
|
||||
accountUpdatePrefs(
|
||||
prefs: "{}"
|
||||
prefs: "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}"
|
||||
) {
|
||||
_id
|
||||
_createdAt
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ 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
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ 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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ X-Appwrite-Project: <YOUR_PROJECT_ID>
|
|||
{
|
||||
"userId": "<USER_ID>",
|
||||
"email": "email@example.com",
|
||||
"password": ,
|
||||
"password": "",
|
||||
"name": "<NAME>"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ X-Appwrite-Session:
|
|||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"password": ,
|
||||
"password": "",
|
||||
"oldPassword": "password"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,9 @@ X-Appwrite-Session:
|
|||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"prefs": {}
|
||||
"prefs": {
|
||||
"language": "en",
|
||||
"timezone": "UTC",
|
||||
"darkTheme": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ X-Appwrite-JWT: <YOUR_JWT>
|
|||
{
|
||||
"userId": "<USER_ID>",
|
||||
"secret": "<SECRET>",
|
||||
"password":
|
||||
"password": ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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\")"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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[]"
|
||||
|
|
|
|||
|
|
@ -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\")"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -8,5 +8,9 @@ Client client = Client()
|
|||
Account account = Account(client);
|
||||
|
||||
User result = await account.updatePrefs(
|
||||
prefs: {},
|
||||
prefs: {
|
||||
"language": "en",
|
||||
"timezone": "UTC",
|
||||
"darkTheme": true
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -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
|
||||
});
|
||||
|
|
@ -10,5 +10,9 @@ Client client = new Client()
|
|||
Account account = new Account(client);
|
||||
|
||||
User result = await account.UpdatePrefs(
|
||||
prefs: [object]
|
||||
prefs: new {
|
||||
language = "en",
|
||||
timezone = "UTC",
|
||||
darkTheme = true
|
||||
}
|
||||
);
|
||||
|
|
@ -13,6 +13,12 @@ Document result = await databases.CreateDocument(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [object],
|
||||
data: new {
|
||||
username = "walter.obrien",
|
||||
email = "walter.obrien@example.com",
|
||||
fullName = "Walter O'Brien",
|
||||
age = 30,
|
||||
isAdmin = false
|
||||
},
|
||||
permissions: ["read("any")"] // optional
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -13,6 +13,12 @@ Row result = await tablesDB.CreateRow(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [object],
|
||||
data: new {
|
||||
username = "walter.obrien",
|
||||
email = "walter.obrien@example.com",
|
||||
fullName = "Walter O'Brien",
|
||||
age = 30,
|
||||
isAdmin = false
|
||||
},
|
||||
permissions: ["read("any")"] // optional
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -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
|
||||
);
|
||||
|
|
@ -15,5 +15,9 @@ client := client.New(
|
|||
service := account.New(client)
|
||||
|
||||
response, error := service.UpdatePrefs(
|
||||
map[string]interface{}{},
|
||||
map[string]interface{}{
|
||||
"language": "en",
|
||||
"timezone": "UTC",
|
||||
"darkTheme": true
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ response, error := service.CreateDocument(
|
|||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"<DOCUMENT_ID>",
|
||||
map[string]interface{}{},
|
||||
map[string]interface{}{
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
},
|
||||
databases.WithCreateDocumentPermissions(interface{}{"read("any")"}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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(""),
|
||||
)
|
||||
|
|
@ -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.CreatePointAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreatePointAttributeDefault(""),
|
||||
)
|
||||
|
|
@ -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.CreatePolygonAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithCreatePolygonAttributeDefault(""),
|
||||
)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
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.UpdateLineAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithUpdateLineAttributeDefault(""),
|
||||
databases.WithUpdateLineAttributeNewKey(""),
|
||||
)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
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.UpdatePointAttribute(
|
||||
"<DATABASE_ID>",
|
||||
"<COLLECTION_ID>",
|
||||
"",
|
||||
false,
|
||||
databases.WithUpdatePointAttributeDefault(""),
|
||||
databases.WithUpdatePointAttributeNewKey(""),
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue