Skip to content

Commit da579af

Browse files
authored
Merge pull request #26 from appwrite/dev
Fix between query output
2 parents 461eedf + d044fd9 commit da579af

29 files changed

+817
-415
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite PHP SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?style=flat-square&v=1)
4-
![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square&v=1)
4+
![Version](https://img.shields.io/badge/api%20version-1.4.12-blue.svg?style=flat-square&v=1)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

docs/account.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Account Service
22

3-
## Get Account
3+
## Get account
44

55
```http request
66
GET https://HOSTNAME/v1/account
77
```
88

99
** Get the currently logged in user. **
1010

11-
## Update Email
11+
## Update email
1212

1313
```http request
1414
PATCH https://HOSTNAME/v1/account/email
@@ -53,7 +53,7 @@ DELETE https://HOSTNAME/v1/account/identities/{identityId}
5353
| --- | --- | --- | --- |
5454
| identityId | string | **Required** Identity ID. | |
5555

56-
## List Logs
56+
## List logs
5757

5858
```http request
5959
GET https://HOSTNAME/v1/account/logs
@@ -67,7 +67,7 @@ GET https://HOSTNAME/v1/account/logs
6767
| --- | --- | --- | --- |
6868
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset | [] |
6969

70-
## Update Name
70+
## Update name
7171

7272
```http request
7373
PATCH https://HOSTNAME/v1/account/name
@@ -81,7 +81,7 @@ PATCH https://HOSTNAME/v1/account/name
8181
| --- | --- | --- | --- |
8282
| name | string | User name. Max length: 128 chars. | |
8383

84-
## Update Password
84+
## Update password
8585

8686
```http request
8787
PATCH https://HOSTNAME/v1/account/password
@@ -96,13 +96,13 @@ PATCH https://HOSTNAME/v1/account/password
9696
| password | string | New user password. Must be at least 8 chars. | |
9797
| oldPassword | string | Current user password. Must be at least 8 chars. | |
9898

99-
## Update Phone
99+
## Update phone
100100

101101
```http request
102102
PATCH https://HOSTNAME/v1/account/phone
103103
```
104104

105-
** Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](/docs/client/account#accountCreatePhoneVerification) endpoint to send a confirmation SMS. **
105+
** Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS. **
106106

107107
### Parameters
108108

@@ -111,15 +111,15 @@ PATCH https://HOSTNAME/v1/account/phone
111111
| phone | string | Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. | |
112112
| password | string | User password. Must be at least 8 chars. | |
113113

114-
## Get Account Preferences
114+
## Get account preferences
115115

116116
```http request
117117
GET https://HOSTNAME/v1/account/prefs
118118
```
119119

120120
** Get the preferences as a key-value object for the currently logged in user. **
121121

122-
## Update Preferences
122+
## Update preferences
123123

124124
```http request
125125
PATCH https://HOSTNAME/v1/account/prefs
@@ -133,13 +133,13 @@ PATCH https://HOSTNAME/v1/account/prefs
133133
| --- | --- | --- | --- |
134134
| prefs | object | Prefs key-value JSON object. | {} |
135135

136-
## Create Password Recovery
136+
## Create password recovery
137137

138138
```http request
139139
POST https://HOSTNAME/v1/account/recovery
140140
```
141141

142-
** Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. **
142+
** Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour. **
143143

144144
### Parameters
145145

@@ -148,13 +148,13 @@ POST https://HOSTNAME/v1/account/recovery
148148
| email | string | User email. | |
149149
| url | string | URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | |
150150

151-
## Create Password Recovery (confirmation)
151+
## Create password recovery (confirmation)
152152

153153
```http request
154154
PUT https://HOSTNAME/v1/account/recovery
155155
```
156156

157-
** Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.
157+
** Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.
158158

159159
Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. **
160160

@@ -167,23 +167,23 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
167167
| password | string | New user password. Must be at least 8 chars. | |
168168
| passwordAgain | string | Repeat new user password. Must be at least 8 chars. | |
169169

170-
## List Sessions
170+
## List sessions
171171

172172
```http request
173173
GET https://HOSTNAME/v1/account/sessions
174174
```
175175

176176
** Get the list of active sessions across different devices for the currently logged in user. **
177177

178-
## Delete Sessions
178+
## Delete sessions
179179

180180
```http request
181181
DELETE https://HOSTNAME/v1/account/sessions
182182
```
183183

184184
** Delete all sessions from the user account and remove any sessions cookies from the end client. **
185185

186-
## Get Session
186+
## Get session
187187

188188
```http request
189189
GET https://HOSTNAME/v1/account/sessions/{sessionId}
@@ -197,7 +197,7 @@ GET https://HOSTNAME/v1/account/sessions/{sessionId}
197197
| --- | --- | --- | --- |
198198
| sessionId | string | **Required** Session ID. Use the string 'current' to get the current device session. | |
199199

200-
## Update OAuth Session (Refresh Tokens)
200+
## Update OAuth session (refresh tokens)
201201

202202
```http request
203203
PATCH https://HOSTNAME/v1/account/sessions/{sessionId}
@@ -211,35 +211,35 @@ PATCH https://HOSTNAME/v1/account/sessions/{sessionId}
211211
| --- | --- | --- | --- |
212212
| sessionId | string | **Required** Session ID. Use the string 'current' to update the current device session. | |
213213

214-
## Delete Session
214+
## Delete session
215215

216216
```http request
217217
DELETE https://HOSTNAME/v1/account/sessions/{sessionId}
218218
```
219219

220-
** Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](/docs/client/account#accountDeleteSessions) instead. **
220+
** Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead. **
221221

222222
### Parameters
223223

224224
| Field Name | Type | Description | Default |
225225
| --- | --- | --- | --- |
226226
| sessionId | string | **Required** Session ID. Use the string 'current' to delete the current device session. | |
227227

228-
## Update Status
228+
## Update status
229229

230230
```http request
231231
PATCH https://HOSTNAME/v1/account/status
232232
```
233233

234234
** Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead. **
235235

236-
## Create Email Verification
236+
## Create email verification
237237

238238
```http request
239239
POST https://HOSTNAME/v1/account/verification
240240
```
241241

242-
** Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.
242+
** Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
243243

244244
Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
245245
**
@@ -250,7 +250,7 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
250250
| --- | --- | --- | --- |
251251
| url | string | URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | |
252252

253-
## Create Email Verification (confirmation)
253+
## Create email verification (confirmation)
254254

255255
```http request
256256
PUT https://HOSTNAME/v1/account/verification
@@ -265,15 +265,15 @@ PUT https://HOSTNAME/v1/account/verification
265265
| userId | string | User ID. | |
266266
| secret | string | Valid verification token. | |
267267

268-
## Create Phone Verification
268+
## Create phone verification
269269

270270
```http request
271271
POST https://HOSTNAME/v1/account/verification/phone
272272
```
273273

274-
** Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone) endpoint. Learn more about how to [complete the verification process](/docs/client/account#accountUpdatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. **
274+
** Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. **
275275

276-
## Create Phone Verification (confirmation)
276+
## Create phone verification (confirmation)
277277

278278
```http request
279279
PUT https://HOSTNAME/v1/account/verification/phone

docs/avatars.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Avatars Service
22

3-
## Get Browser Icon
3+
## Get browser icon
44

55
```http request
66
GET https://HOSTNAME/v1/avatars/browsers/{code}
77
```
88

9-
** You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.
9+
** You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
1010

1111
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. **
1212

@@ -19,7 +19,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
1919
| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
2020
| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 |
2121

22-
## Get Credit Card Icon
22+
## Get credit card icon
2323

2424
```http request
2525
GET https://HOSTNAME/v1/avatars/credit-cards/{code}
@@ -39,7 +39,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
3939
| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
4040
| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 |
4141

42-
## Get Favicon
42+
## Get favicon
4343

4444
```http request
4545
GET https://HOSTNAME/v1/avatars/favicon
@@ -54,13 +54,13 @@ GET https://HOSTNAME/v1/avatars/favicon
5454
| --- | --- | --- | --- |
5555
| url | string | **Required** Website URL which you want to fetch the favicon from. | |
5656

57-
## Get Country Flag
57+
## Get country flag
5858

5959
```http request
6060
GET https://HOSTNAME/v1/avatars/flags/{code}
6161
```
6262

63-
** You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) standard.
63+
** You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
6464

6565
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
6666
**
@@ -74,7 +74,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
7474
| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
7575
| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 |
7676

77-
## Get Image from URL
77+
## Get image from URL
7878

7979
```http request
8080
GET https://HOSTNAME/v1/avatars/image
@@ -93,7 +93,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
9393
| width | integer | Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400. | 400 |
9494
| height | integer | Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400. | 400 |
9595

96-
## Get User Initials
96+
## Get user initials
9797

9898
```http request
9999
GET https://HOSTNAME/v1/avatars/initials
@@ -115,7 +115,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
115115
| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 500 |
116116
| background | string | Changes background color. By default a random color will be picked and stay will persistent to the given name. | |
117117

118-
## Get QR Code
118+
## Get QR code
119119

120120
```http request
121121
GET https://HOSTNAME/v1/avatars/qr

0 commit comments

Comments
 (0)