Skip to content

Commit 432608a

Browse files
committed
Upgraded to support Appwrite 0.6
1 parent 0eac999 commit 432608a

26 files changed

+603
-32
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Appwrite SDK for PHP
1+
# Appwrite PHP SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1)
4-
![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1)
4+
![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1)
55

66
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
77
Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "BSD-3-Clause",
88
"support": {
99
"url": "https://appwrite.io/support",
10-
"email": "team@appwrite.io"
10+
"email": "team@localhost.test"
1111
},
1212
"autoload": {
1313
"psr-4": {

docs/avatars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ GET https://appwrite.io/v1/avatars/qr
9595
| --- | --- | --- | --- |
9696
| text | string | **Required** Plain text to be converted to QR code image. | |
9797
| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 |
98-
| margin | integer | Margin From Edge. Pass an integer between 0 to 10. Defaults to 1. | 1 |
98+
| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 |
9999
| download | integer | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | 0 |
100100

docs/database.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ GET https://appwrite.io/v1/database/collections/{collectionId}/documents
9696
| filters | array | Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: 'name=John Doe' or 'category.$id>=5bed2d152c362'. | [] |
9797
| offset | integer | Offset value. Use this value to manage pagination. | 0 |
9898
| limit | integer | Maximum number of documents to return in response. Use this value to manage pagination. | 50 |
99-
| order-field | string | Document field that results will be sorted by. | $id |
100-
| order-type | string | Order direction. Possible values are DESC for descending order, or ASC for ascending order. | ASC |
101-
| order-cast | string | Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string. | string |
99+
| orderField | string | Document field that results will be sorted by. | $id |
100+
| orderType | string | Order direction. Possible values are DESC for descending order, or ASC for ascending order. | ASC |
101+
| orderCast | string | Order field type casting. Possible values are int, string, date, time or datetime. The database will attempt to cast the order field to the value you pass here. The default value is a string. | string |
102102
| search | string | Search query. Enter any free text search. The database will try to find a match against all document attributes and children. | |
103-
| first | integer | Return only first document. Pass 1 for true or 0 for false. The default value is 0. | 0 |
104-
| last | integer | Return only last document. Pass 1 for true or 0 for false. The default value is 0. | 0 |
103+
| first | integer | Return only the first document. Pass 1 for true or 0 for false. The default value is 0. | 0 |
104+
| last | integer | Return only the last document. Pass 1 for true or 0 for false. The default value is 0. | 0 |
105105

106106
## Create Document
107107

@@ -169,3 +169,15 @@ DELETE https://appwrite.io/v1/database/collections/{collectionId}/documents/{doc
169169
| collectionId | string | **Required** Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/database?platform=server#createCollection). | |
170170
| documentId | string | **Required** Document unique ID. | |
171171

172+
## Get Collection Logs
173+
174+
```http request
175+
GET https://appwrite.io/v1/database/collections/{collectionId}/logs
176+
```
177+
178+
### Parameters
179+
180+
| Field Name | Type | Description | Default |
181+
| --- | --- | --- | --- |
182+
| collectionId | string | **Required** Collection unique ID. | |
183+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Database;
5+
6+
$client = new Client();
7+
8+
$client
9+
->setProject('5df5acd0d48c2') // Your project ID
10+
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
$database = new Database($client);
14+
15+
$result = $database->getCollectionLogs('[COLLECTION_ID]');
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Health;
5+
6+
$client = new Client();
7+
8+
$client
9+
->setProject('5df5acd0d48c2') // Your project ID
10+
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
$health = new Health($client);
14+
15+
$result = $health->getAntiVirus();

docs/examples/health/get-cache.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Health;
5+
6+
$client = new Client();
7+
8+
$client
9+
->setProject('5df5acd0d48c2') // Your project ID
10+
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
$health = new Health($client);
14+
15+
$result = $health->getCache();

docs/examples/health/get-d-b.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Health;
5+
6+
$client = new Client();
7+
8+
$client
9+
->setProject('5df5acd0d48c2') // Your project ID
10+
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
$health = new Health($client);
14+
15+
$result = $health->getDB();
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Health;
5+
6+
$client = new Client();
7+
8+
$client
9+
->setProject('5df5acd0d48c2') // Your project ID
10+
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
$health = new Health($client);
14+
15+
$result = $health->getQueueCertificates();
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Health;
5+
6+
$client = new Client();
7+
8+
$client
9+
->setProject('5df5acd0d48c2') // Your project ID
10+
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
11+
;
12+
13+
$health = new Health($client);
14+
15+
$result = $health->getQueueFunctions();

0 commit comments

Comments
 (0)