Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/avatars.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay. | |
| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay. | |
| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. | -1 |
Expand Down
105 changes: 105 additions & 0 deletions docs/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,111 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
| newKey | string | New Attribute Key. | |


```http request
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/line
```

** Create a geometric line attribute. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| databaseId | string | **Required** Database ID. | |
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
| key | string | Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | array | Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. | |


```http request
PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}
```

** Update a line attribute. Changing the `default` value will not update already existing documents. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| databaseId | string | **Required** Database ID. | |
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). | |
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | array | Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |


```http request
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/point
```

** Create a geometric point attribute. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| databaseId | string | **Required** Database ID. | |
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
| key | string | Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | array | Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. | |


```http request
PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}
```

** Update a point attribute. Changing the `default` value will not update already existing documents. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| databaseId | string | **Required** Database ID. | |
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). | |
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | array | Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |


```http request
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/polygon
```

** Create a geometric polygon attribute. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| databaseId | string | **Required** Database ID. | |
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
| key | string | Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | array | Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. | |


```http request
PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}
```

** Update a polygon attribute. Changing the `default` value will not update already existing documents. **

### Parameters

| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| databaseId | string | **Required** Database ID. | |
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). | |
| key | string | **Required** Attribute Key. | |
| required | boolean | Is attribute required? | |
| default | array | Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. | |
| newKey | string | New attribute key. | |


```http request
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship
```
Expand Down
6 changes: 5 additions & 1 deletion docs/examples/account/update-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ $client = (new Client())
$account = new Account($client);

$result = $account->updatePrefs(
prefs: []
prefs: [
'language' => 'en',
'timezone' => 'UTC',
'darkTheme' => true
]
);
8 changes: 7 additions & 1 deletion docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ $result = $databases->createDocument(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documentId: '<DOCUMENT_ID>',
data: [],
data: [
'username' => 'walter.obrien',
'email' => '[email protected]',
'fullName' => 'Walter O'Brien',
'age' => 30,
'isAdmin' => false
],
permissions: ["read("any")"] // optional
);
19 changes: 19 additions & 0 deletions docs/examples/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Databases;

$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 = new Databases($client);

$result = $databases->createLineAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
);
19 changes: 19 additions & 0 deletions docs/examples/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Databases;

$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 = new Databases($client);

$result = $databases->createPointAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
);
19 changes: 19 additions & 0 deletions docs/examples/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Databases;

$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 = new Databases($client);

$result = $databases->createPolygonAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
);
20 changes: 20 additions & 0 deletions docs/examples/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Databases;

$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 = new Databases($client);

$result = $databases->updateLineAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], // optional
newKey: '' // optional
);
20 changes: 20 additions & 0 deletions docs/examples/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Databases;

$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 = new Databases($client);

$result = $databases->updatePointAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], // optional
newKey: '' // optional
);
20 changes: 20 additions & 0 deletions docs/examples/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

use Appwrite\Client;
use Appwrite\Services\Databases;

$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 = new Databases($client);

$result = $databases->updatePolygonAttribute(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], // optional
newKey: '' // optional
);
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Appwrite\Client;
use Appwrite\Services\TablesDB;

$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 = new TablesDB($client);

$result = $tablesDB->createLineColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
);
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Appwrite\Client;
use Appwrite\Services\TablesDB;

$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 = new TablesDB($client);

$result = $tablesDB->createPointColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
);
19 changes: 19 additions & 0 deletions docs/examples/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Appwrite\Client;
use Appwrite\Services\TablesDB;

$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 = new TablesDB($client);

$result = $tablesDB->createPolygonColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]] // optional
);
8 changes: 7 additions & 1 deletion docs/examples/tablesdb/create-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ $result = $tablesDB->createRow(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: [],
data: [
'username' => 'walter.obrien',
'email' => '[email protected]',
'fullName' => 'Walter O'Brien',
'age' => 30,
'isAdmin' => false
],
permissions: ["read("any")"] // optional
);
20 changes: 20 additions & 0 deletions docs/examples/tablesdb/update-line-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

use Appwrite\Client;
use Appwrite\Services\TablesDB;

$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 = new TablesDB($client);

$result = $tablesDB->updateLineColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], // optional
newKey: '' // optional
);
20 changes: 20 additions & 0 deletions docs/examples/tablesdb/update-point-column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

use Appwrite\Client;
use Appwrite\Services\TablesDB;

$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 = new TablesDB($client);

$result = $tablesDB->updatePointColumn(
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '',
required: false,
default: [[1,2], [3, 4]], // optional
newKey: '' // optional
);
Loading