Skip to content

Commit d09767f

Browse files
authored
Merge pull request #45 from appwrite/dev
Add time between queries
2 parents 5679456 + 1cddfd1 commit d09767f

30 files changed

+1486
-17
lines changed

docs/avatars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
3232

3333
| Field Name | Type | Description | Default |
3434
| --- | --- | --- | --- |
35-
| 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. | |
35+
| 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. | |
3636
| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
3737
| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
3838
| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. | -1 |

docs/databases.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,111 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio
439439
| newKey | string | New Attribute Key. | |
440440

441441

442+
```http request
443+
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/line
444+
```
445+
446+
** Create a geometric line attribute. **
447+
448+
### Parameters
449+
450+
| Field Name | Type | Description | Default |
451+
| --- | --- | --- | --- |
452+
| databaseId | string | **Required** Database ID. | |
453+
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
454+
| key | string | Attribute Key. | |
455+
| required | boolean | Is attribute required? | |
456+
| 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. | |
457+
458+
459+
```http request
460+
PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}
461+
```
462+
463+
** Update a line attribute. Changing the `default` value will not update already existing documents. **
464+
465+
### Parameters
466+
467+
| Field Name | Type | Description | Default |
468+
| --- | --- | --- | --- |
469+
| databaseId | string | **Required** Database ID. | |
470+
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). | |
471+
| key | string | **Required** Attribute Key. | |
472+
| required | boolean | Is attribute required? | |
473+
| 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. | |
474+
| newKey | string | New attribute key. | |
475+
476+
477+
```http request
478+
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/point
479+
```
480+
481+
** Create a geometric point attribute. **
482+
483+
### Parameters
484+
485+
| Field Name | Type | Description | Default |
486+
| --- | --- | --- | --- |
487+
| databaseId | string | **Required** Database ID. | |
488+
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
489+
| key | string | Attribute Key. | |
490+
| required | boolean | Is attribute required? | |
491+
| 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. | |
492+
493+
494+
```http request
495+
PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}
496+
```
497+
498+
** Update a point attribute. Changing the `default` value will not update already existing documents. **
499+
500+
### Parameters
501+
502+
| Field Name | Type | Description | Default |
503+
| --- | --- | --- | --- |
504+
| databaseId | string | **Required** Database ID. | |
505+
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). | |
506+
| key | string | **Required** Attribute Key. | |
507+
| required | boolean | Is attribute required? | |
508+
| 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. | |
509+
| newKey | string | New attribute key. | |
510+
511+
512+
```http request
513+
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/polygon
514+
```
515+
516+
** Create a geometric polygon attribute. **
517+
518+
### Parameters
519+
520+
| Field Name | Type | Description | Default |
521+
| --- | --- | --- | --- |
522+
| databaseId | string | **Required** Database ID. | |
523+
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
524+
| key | string | Attribute Key. | |
525+
| required | boolean | Is attribute required? | |
526+
| 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. | |
527+
528+
529+
```http request
530+
PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}
531+
```
532+
533+
** Update a polygon attribute. Changing the `default` value will not update already existing documents. **
534+
535+
### Parameters
536+
537+
| Field Name | Type | Description | Default |
538+
| --- | --- | --- | --- |
539+
| databaseId | string | **Required** Database ID. | |
540+
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection). | |
541+
| key | string | **Required** Attribute Key. | |
542+
| required | boolean | Is attribute required? | |
543+
| 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. | |
544+
| newKey | string | New attribute key. | |
545+
546+
442547
```http request
443548
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship
444549
```

docs/examples/account/update-prefs.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,9 @@ $client = (new Client())
1111
$account = new Account($client);
1212

1313
$result = $account->updatePrefs(
14-
prefs: []
14+
prefs: [
15+
'language' => 'en',
16+
'timezone' => 'UTC',
17+
'darkTheme' => true
18+
]
1519
);

docs/examples/databases/create-document.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ $result = $databases->createDocument(
1414
databaseId: '<DATABASE_ID>',
1515
collectionId: '<COLLECTION_ID>',
1616
documentId: '<DOCUMENT_ID>',
17-
data: [],
17+
data: [
18+
'username' => 'walter.obrien',
19+
'email' => '[email protected]',
20+
'fullName' => 'Walter O'Brien',
21+
'age' => 30,
22+
'isAdmin' => false
23+
],
1824
permissions: ["read("any")"] // optional
1925
);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Databases;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setKey('<YOUR_API_KEY>'); // Your secret API key
10+
11+
$databases = new Databases($client);
12+
13+
$result = $databases->createLineAttribute(
14+
databaseId: '<DATABASE_ID>',
15+
collectionId: '<COLLECTION_ID>',
16+
key: '',
17+
required: false,
18+
default: [[1,2], [3, 4]] // optional
19+
);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Databases;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setKey('<YOUR_API_KEY>'); // Your secret API key
10+
11+
$databases = new Databases($client);
12+
13+
$result = $databases->createPointAttribute(
14+
databaseId: '<DATABASE_ID>',
15+
collectionId: '<COLLECTION_ID>',
16+
key: '',
17+
required: false,
18+
default: [[1,2], [3, 4]] // optional
19+
);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Databases;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setKey('<YOUR_API_KEY>'); // Your secret API key
10+
11+
$databases = new Databases($client);
12+
13+
$result = $databases->createPolygonAttribute(
14+
databaseId: '<DATABASE_ID>',
15+
collectionId: '<COLLECTION_ID>',
16+
key: '',
17+
required: false,
18+
default: [[1,2], [3, 4]] // optional
19+
);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Databases;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setKey('<YOUR_API_KEY>'); // Your secret API key
10+
11+
$databases = new Databases($client);
12+
13+
$result = $databases->updateLineAttribute(
14+
databaseId: '<DATABASE_ID>',
15+
collectionId: '<COLLECTION_ID>',
16+
key: '',
17+
required: false,
18+
default: [[1,2], [3, 4]], // optional
19+
newKey: '' // optional
20+
);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Databases;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setKey('<YOUR_API_KEY>'); // Your secret API key
10+
11+
$databases = new Databases($client);
12+
13+
$result = $databases->updatePointAttribute(
14+
databaseId: '<DATABASE_ID>',
15+
collectionId: '<COLLECTION_ID>',
16+
key: '',
17+
required: false,
18+
default: [[1,2], [3, 4]], // optional
19+
newKey: '' // optional
20+
);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Databases;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setKey('<YOUR_API_KEY>'); // Your secret API key
10+
11+
$databases = new Databases($client);
12+
13+
$result = $databases->updatePolygonAttribute(
14+
databaseId: '<DATABASE_ID>',
15+
collectionId: '<COLLECTION_ID>',
16+
key: '',
17+
required: false,
18+
default: [[1,2], [3, 4]], // optional
19+
newKey: '' // optional
20+
);

0 commit comments

Comments
 (0)