Skip to content

Commit 2b6216a

Browse files
committed
Release candidate 4 for 1.5.x
1 parent 211cd78 commit 2b6216a

File tree

263 files changed

+2382
-1627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+2382
-1627
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.13-blue.svg?style=flat-square&v=1)
4+
![Version](https://img.shields.io/badge/api%20version-1.5.0-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/examples/account/add-authenticator.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ use Appwrite\Client;
44
use Appwrite\Services\Account;
55
use Appwrite\Enums\AuthenticatorType;
66
7-
$client = new Client();
8-
9-
$client
7+
$client = (new Client())
108
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
119
->setProject('5df5acd0d48c2') // Your project ID
12-
->setSession('') // The user session to authenticate with
13-
;
10+
->setSession(''); // The user session to authenticate with
1411

1512
$account = new Account($client);
1613

17-
$result = $account->addAuthenticator(AuthenticatorType::TOTP());
14+
$result = $account->addAuthenticator(
15+
type: AuthenticatorType::TOTP()
16+
);

docs/examples/account/create-anonymous-session.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
use Appwrite\Client;
44
use Appwrite\Services\Account;
55
6-
$client = new Client();
7-
8-
$client
6+
$client = (new Client())
97
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
->setProject('5df5acd0d48c2') // Your project ID
11-
;
8+
->setProject('5df5acd0d48c2'); // Your project ID
129

1310
$account = new Account($client);
1411

15-
$result = $account->createAnonymousSession();
12+
$result = $account->createAnonymousSession();

docs/examples/account/create-email-password-session.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
use Appwrite\Client;
44
use Appwrite\Services\Account;
55
6-
$client = new Client();
7-
8-
$client
6+
$client = (new Client())
97
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
->setProject('5df5acd0d48c2') // Your project ID
11-
;
8+
->setProject('5df5acd0d48c2'); // Your project ID
129

1310
$account = new Account($client);
1411

15-
$result = $account->createEmailPasswordSession('[email protected]', 'password');
12+
$result = $account->createEmailPasswordSession(
13+
14+
password: 'password'
15+
);

docs/examples/account/create-email-token.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
use Appwrite\Client;
44
use Appwrite\Services\Account;
55
6-
$client = new Client();
7-
8-
$client
6+
$client = (new Client())
97
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
->setProject('5df5acd0d48c2') // Your project ID
11-
;
8+
->setProject('5df5acd0d48c2'); // Your project ID
129

1310
$account = new Account($client);
1411

15-
$result = $account->createEmailToken('[USER_ID]', '[email protected]');
12+
$result = $account->createEmailToken(
13+
userId: '[USER_ID]',
14+
15+
phrase: false // optional
16+
);

docs/examples/account/create-j-w-t.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
use Appwrite\Client;
44
use Appwrite\Services\Account;
55
6-
$client = new Client();
7-
8-
$client
6+
$client = (new Client())
97
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
->setProject('5df5acd0d48c2') // Your project ID
11-
;
8+
->setProject('5df5acd0d48c2'); // Your project ID
129

1310
$account = new Account($client);
1411

15-
$result = $account->createJWT();
12+
$result = $account->createJWT();

docs/examples/account/create-magic-u-r-l-token.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
use Appwrite\Client;
44
use Appwrite\Services\Account;
55
6-
$client = new Client();
7-
8-
$client
6+
$client = (new Client())
97
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
->setProject('5df5acd0d48c2') // Your project ID
11-
;
8+
->setProject('5df5acd0d48c2'); // Your project ID
129

1310
$account = new Account($client);
1411

15-
$result = $account->createMagicURLToken('[USER_ID]', '[email protected]');
12+
$result = $account->createMagicURLToken(
13+
userId: '[USER_ID]',
14+
15+
url: 'https://example.com', // optional
16+
phrase: false // optional
17+
);

docs/examples/account/create-o-auth2session.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ use Appwrite\Client;
44
use Appwrite\Services\Account;
55
use Appwrite\Enums\OAuthProvider;
66
7-
$client = new Client();
8-
9-
$client
7+
$client = (new Client())
108
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
11-
->setProject('5df5acd0d48c2') // Your project ID
12-
;
9+
->setProject('5df5acd0d48c2'); // Your project ID
1310

1411
$account = new Account($client);
1512

16-
$result = $account->createOAuth2Session(OAuthProvider::AMAZON());
13+
$result = $account->createOAuth2Session(
14+
provider: OAuthProvider::AMAZON(),
15+
success: 'https://example.com', // optional
16+
failure: 'https://example.com', // optional
17+
token: false, // optional
18+
scopes: [] // optional
19+
);

docs/examples/account/create-phone-token.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
use Appwrite\Client;
44
use Appwrite\Services\Account;
55
6-
$client = new Client();
7-
8-
$client
6+
$client = (new Client())
97
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
10-
->setProject('5df5acd0d48c2') // Your project ID
11-
;
8+
->setProject('5df5acd0d48c2'); // Your project ID
129

1310
$account = new Account($client);
1411

15-
$result = $account->createPhoneToken('[USER_ID]', '+12065550100');
12+
$result = $account->createPhoneToken(
13+
userId: '[USER_ID]',
14+
phone: '+12065550100'
15+
);

docs/examples/account/create-phone-verification.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
use Appwrite\Client;
44
use Appwrite\Services\Account;
55
6-
$client = new Client();
7-
8-
$client
6+
$client = (new Client())
97
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
108
->setProject('5df5acd0d48c2') // Your project ID
11-
->setSession('') // The user session to authenticate with
12-
;
9+
->setSession(''); // The user session to authenticate with
1310

1411
$account = new Account($client);
1512

16-
$result = $account->createPhoneVerification();
13+
$result = $account->createPhoneVerification();

0 commit comments

Comments
 (0)