Skip to content

Commit d0e5368

Browse files
committed
feat: update for 1.0.0-RC1ush
1 parent 87132fd commit d0e5368

File tree

12 files changed

+396
-411
lines changed

12 files changed

+396
-411
lines changed

docs/databases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ POST https://HOSTNAME/v1/databases/{databaseId}/collections/{collectionId}/attri
204204
| collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | |
205205
| key | string | Attribute Key. | |
206206
| required | boolean | Is attribute required? | |
207-
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | |
207+
| default | string | Default value for the attribute in ISO 8601 format. Cannot be set when attribute is required. | |
208208
| array | boolean | Is attribute an array? | |
209209

210210
## Create Email Attribute

docs/examples/databases/create-collection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ $client
1313

1414
$databases = new Databases($client);
1515

16-
$result = $databases->createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]', ["read("any")"], false);
16+
$result = $databases->createCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]');

docs/examples/databases/update-collection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ $client
1313

1414
$databases = new Databases($client);
1515

16-
$result = $databases->updateCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]', false);
16+
$result = $databases->updateCollection('[DATABASE_ID]', '[COLLECTION_ID]', '[NAME]');

docs/examples/storage/create-bucket.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ $client
1313

1414
$storage = new Storage($client);
1515

16-
$result = $storage->createBucket('[BUCKET_ID]', '[NAME]', false);
16+
$result = $storage->createBucket('[BUCKET_ID]', '[NAME]');

docs/examples/storage/update-bucket.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ $client
1313

1414
$storage = new Storage($client);
1515

16-
$result = $storage->updateBucket('[BUCKET_ID]', '[NAME]', false);
16+
$result = $storage->updateBucket('[BUCKET_ID]', '[NAME]');

src/Appwrite/Services/Account.php

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ public function get(): array
4646
* one, by passing an email address and a new password.
4747
*
4848
*
49-
* @param string$email
50-
* @param string$password
49+
* @param string $email
50+
* @param string $password
5151
* @throws AppwriteException
5252
* @return array
5353
5454
*/
55-
public function updateEmail(string$email, string$password): array
55+
public function updateEmail(string $email, string $password): array
5656
{
5757
$path = str_replace([], [], '/account/email');
5858

@@ -108,12 +108,12 @@ public function getLogs(array $queries = null): array
108108
*
109109
* Update currently logged in user account name.
110110
*
111-
* @param string$name
111+
* @param string $name
112112
* @throws AppwriteException
113113
* @return array
114114
115115
*/
116-
public function updateName(string$name): array
116+
public function updateName(string $name): array
117117
{
118118
$path = str_replace([], [], '/account/name');
119119

@@ -138,13 +138,13 @@ public function updateName(string$name): array
138138
* to pass in the new password, and the old password. For users created with
139139
* OAuth, Team Invites and Magic URL, oldPassword is optional.
140140
*
141-
* @param string$password
142-
* @param string$oldPassword
141+
* @param string $password
142+
* @param string $oldPassword
143143
* @throws AppwriteException
144144
* @return array
145145
146146
*/
147-
public function updatePassword(string$password, string$oldPassword = null): array
147+
public function updatePassword(string $password, string $oldPassword = null): array
148148
{
149149
$path = str_replace([], [], '/account/password');
150150

@@ -175,13 +175,13 @@ public function updatePassword(string$password, string$oldPassword = null): arra
175175
* /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
176176
* endpoint to send a confirmation SMS.
177177
*
178-
* @param string$phone
179-
* @param string$password
178+
* @param string $phone
179+
* @param string $password
180180
* @throws AppwriteException
181181
* @return array
182182
183183
*/
184-
public function updatePhone(string$phone, string$password): array
184+
public function updatePhone(string $phone, string $password): array
185185
{
186186
$path = str_replace([], [], '/account/phone');
187187

@@ -268,13 +268,13 @@ public function updatePrefs(array $prefs): array
268268
* complete the process. The verification link sent to the user's email
269269
* address is valid for 1 hour.
270270
*
271-
* @param string$email
272-
* @param string$url
271+
* @param string $email
272+
* @param string $url
273273
* @throws AppwriteException
274274
* @return array
275275
276276
*/
277-
public function createRecovery(string$email, string$url): array
277+
public function createRecovery(string $email, string $url): array
278278
{
279279
$path = str_replace([], [], '/account/recovery');
280280

@@ -312,15 +312,15 @@ public function createRecovery(string$email, string$url): array
312312
* the only valid redirect URLs are the ones from domains you have set when
313313
* adding your platforms in the console interface.
314314
*
315-
* @param string$userId
316-
* @param string$secret
317-
* @param string$password
318-
* @param string$passwordAgain
315+
* @param string $userId
316+
* @param string $secret
317+
* @param string $password
318+
* @param string $passwordAgain
319319
* @throws AppwriteException
320320
* @return array
321321
322322
*/
323-
public function updateRecovery(string$userId, string$secret, string$password, string$passwordAgain): array
323+
public function updateRecovery(string $userId, string $secret, string $password, string $passwordAgain): array
324324
{
325325
$path = str_replace([], [], '/account/recovery');
326326

@@ -407,12 +407,12 @@ public function deleteSessions(): string
407407
* Use this endpoint to get a logged in user's session using a Session ID.
408408
* Inputting 'current' will return the current session being used.
409409
*
410-
* @param string$sessionId
410+
* @param string $sessionId
411411
* @throws AppwriteException
412412
* @return array
413413
414414
*/
415-
public function getSession(string$sessionId): array
415+
public function getSession(string $sessionId): array
416416
{
417417
$path = str_replace(['{sessionId}'], [$sessionId], '/account/sessions/{sessionId}');
418418

@@ -433,12 +433,12 @@ public function getSession(string$sessionId): array
433433
* If session was created using an OAuth provider, this route can be used to
434434
* "refresh" the access token.
435435
*
436-
* @param string$sessionId
436+
* @param string $sessionId
437437
* @throws AppwriteException
438438
* @return array
439439
440440
*/
441-
public function updateSession(string$sessionId): array
441+
public function updateSession(string $sessionId): array
442442
{
443443
$path = str_replace(['{sessionId}'], [$sessionId], '/account/sessions/{sessionId}');
444444

@@ -460,12 +460,12 @@ public function updateSession(string$sessionId): array
460460
* Session ID argument, only the unique session ID provided is deleted.
461461
*
462462
*
463-
* @param string$sessionId
463+
* @param string $sessionId
464464
* @throws AppwriteException
465465
* @return string
466466
467467
*/
468-
public function deleteSession(string$sessionId): string
468+
public function deleteSession(string $sessionId): string
469469
{
470470
$path = str_replace(['{sessionId}'], [$sessionId], '/account/sessions/{sessionId}');
471471

@@ -520,12 +520,12 @@ public function updateStatus(): array
520520
* adding your platforms in the console interface.
521521
*
522522
*
523-
* @param string$url
523+
* @param string $url
524524
* @throws AppwriteException
525525
* @return array
526526
527527
*/
528-
public function createVerification(string$url): array
528+
public function createVerification(string $url): array
529529
{
530530
$path = str_replace([], [], '/account/verification');
531531

@@ -551,13 +551,13 @@ public function createVerification(string$url): array
551551
* to verify the user email ownership. If confirmed this route will return a
552552
* 200 status code.
553553
*
554-
* @param string$userId
555-
* @param string$secret
554+
* @param string $userId
555+
* @param string $secret
556556
* @throws AppwriteException
557557
* @return array
558558
559559
*/
560-
public function updateVerification(string$userId, string$secret): array
560+
public function updateVerification(string $userId, string $secret): array
561561
{
562562
$path = str_replace([], [], '/account/verification');
563563

@@ -615,13 +615,13 @@ public function createPhoneVerification(): array
615615
* verify the user email ownership. If confirmed this route will return a 200
616616
* status code.
617617
*
618-
* @param string$userId
619-
* @param string$secret
618+
* @param string $userId
619+
* @param string $secret
620620
* @throws AppwriteException
621621
* @return array
622622
623623
*/
624-
public function updatePhoneVerification(string$userId, string$secret): array
624+
public function updatePhoneVerification(string $userId, string $secret): array
625625
{
626626
$path = str_replace([], [], '/account/verification/phone');
627627

src/Appwrite/Services/Avatars.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ public function __construct(Client $client)
2727
* image at source quality. If dimensions are not specified, the default size
2828
* of image returned is 100x100px.
2929
*
30-
* @param string$code
30+
* @param string $code
3131
* @param int $width
3232
* @param int $height
3333
* @param int $quality
3434
* @throws AppwriteException
3535
* @return string
3636
3737
*/
38-
public function getBrowser(string$code, int $width = null, int $height = null, int $quality = null): string
38+
public function getBrowser(string $code, int $width = null, int $height = null, int $quality = null): string
3939
{
4040
$path = str_replace(['{code}'], [$code], '/avatars/browsers/{code}');
4141

@@ -74,15 +74,15 @@ public function getBrowser(string$code, int $width = null, int $height = null, i
7474
* of image returned is 100x100px.
7575
*
7676
*
77-
* @param string$code
77+
* @param string $code
7878
* @param int $width
7979
* @param int $height
8080
* @param int $quality
8181
* @throws AppwriteException
8282
* @return string
8383
8484
*/
85-
public function getCreditCard(string$code, int $width = null, int $height = null, int $quality = null): string
85+
public function getCreditCard(string $code, int $width = null, int $height = null, int $quality = null): string
8686
{
8787
$path = str_replace(['{code}'], [$code], '/avatars/credit-cards/{code}');
8888

@@ -115,12 +115,12 @@ public function getCreditCard(string$code, int $width = null, int $height = null
115115
* website URL.
116116
*
117117
*
118-
* @param string$url
118+
* @param string $url
119119
* @throws AppwriteException
120120
* @return string
121121
122122
*/
123-
public function getFavicon(string$url): string
123+
public function getFavicon(string $url): string
124124
{
125125
$path = str_replace([], [], '/avatars/favicon');
126126

@@ -152,15 +152,15 @@ public function getFavicon(string$url): string
152152
* of image returned is 100x100px.
153153
*
154154
*
155-
* @param string$code
155+
* @param string $code
156156
* @param int $width
157157
* @param int $height
158158
* @param int $quality
159159
* @throws AppwriteException
160160
* @return string
161161
162162
*/
163-
public function getFlag(string$code, int $width = null, int $height = null, int $quality = null): string
163+
public function getFlag(string $code, int $width = null, int $height = null, int $quality = null): string
164164
{
165165
$path = str_replace(['{code}'], [$code], '/avatars/flags/{code}');
166166

@@ -200,14 +200,14 @@ public function getFlag(string$code, int $width = null, int $height = null, int
200200
* of image returned is 400x400px.
201201
*
202202
*
203-
* @param string$url
203+
* @param string $url
204204
* @param int $width
205205
* @param int $height
206206
* @throws AppwriteException
207207
* @return string
208208
209209
*/
210-
public function getImage(string$url, int $width = null, int $height = null): string
210+
public function getImage(string $url, int $width = null, int $height = null): string
211211
{
212212
$path = str_replace([], [], '/avatars/image');
213213

@@ -253,16 +253,16 @@ public function getImage(string$url, int $width = null, int $height = null): str
253253
* of image returned is 100x100px.
254254
*
255255
*
256-
* @param string$name
256+
* @param string $name
257257
* @param int $width
258258
* @param int $height
259-
* @param string$color
260-
* @param string$background
259+
* @param string $color
260+
* @param string $background
261261
* @throws AppwriteException
262262
* @return string
263263
264264
*/
265-
public function getInitials(string$name = null, int $width = null, int $height = null, string$color = null, string$background = null): string
265+
public function getInitials(string $name = null, int $width = null, int $height = null, string $color = null, string $background = null): string
266266
{
267267
$path = str_replace([], [], '/avatars/initials');
268268

@@ -300,15 +300,15 @@ public function getInitials(string$name = null, int $width = null, int $height =
300300
* parameters to change the size and style of the resulting image.
301301
*
302302
*
303-
* @param string$text
303+
* @param string $text
304304
* @param int $size
305305
* @param int $margin
306306
* @param bool $download
307307
* @throws AppwriteException
308308
* @return string
309309
310310
*/
311-
public function getQR(string$text, int $size = null, int $margin = null, bool $download = null): string
311+
public function getQR(string $text, int $size = null, int $margin = null, bool $download = null): string
312312
{
313313
$path = str_replace([], [], '/avatars/qr');
314314

0 commit comments

Comments
 (0)