Skip to content

Commit 3a9e4e7

Browse files
committed
update examples
1 parent c7fd182 commit 3a9e4e7

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

docs/account.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ DELETE https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
182182

183183

184184
```http request
185-
POST https://cloud.appwrite.io/v1/account/mfa/challenge
185+
POST https://cloud.appwrite.io/v1/account/mfa/challenges
186186
```
187187

188188
** Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. **
@@ -195,7 +195,7 @@ POST https://cloud.appwrite.io/v1/account/mfa/challenge
195195

196196

197197
```http request
198-
POST https://cloud.appwrite.io/v1/account/mfa/challenge
198+
POST https://cloud.appwrite.io/v1/account/mfa/challenges
199199
```
200200

201201
** Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. **
@@ -208,7 +208,7 @@ POST https://cloud.appwrite.io/v1/account/mfa/challenge
208208

209209

210210
```http request
211-
PUT https://cloud.appwrite.io/v1/account/mfa/challenge
211+
PUT https://cloud.appwrite.io/v1/account/mfa/challenges
212212
```
213213

214214
** Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. **
@@ -222,7 +222,7 @@ PUT https://cloud.appwrite.io/v1/account/mfa/challenge
222222

223223

224224
```http request
225-
PUT https://cloud.appwrite.io/v1/account/mfa/challenge
225+
PUT https://cloud.appwrite.io/v1/account/mfa/challenges
226226
```
227227

228228
** Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. **

docs/examples/avatars/get-screenshot.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,26 @@ $avatars = new Avatars($client);
1515

1616
$result = $avatars->getScreenshot(
1717
url: 'https://example.com',
18-
headers: [], // optional
19-
viewportWidth: 1, // optional
20-
viewportHeight: 1, // optional
21-
scale: 0.1, // optional
18+
headers: [
19+
'Authorization' => 'Bearer token123',
20+
'X-Custom-Header' => 'value'
21+
], // optional
22+
viewportWidth: 1920, // optional
23+
viewportHeight: 1080, // optional
24+
scale: 2, // optional
2225
theme: Theme::LIGHT(), // optional
23-
userAgent: '<USER_AGENT>', // optional
24-
fullpage: false, // optional
25-
locale: '<LOCALE>', // optional
26+
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
27+
fullpage: true, // optional
28+
locale: 'en-US', // optional
2629
timezone: Timezone::AFRICAABIDJAN(), // optional
27-
latitude: -90, // optional
28-
longitude: -180, // optional
29-
accuracy: 0, // optional
30-
touch: false, // optional
31-
permissions: [], // optional
32-
sleep: 0, // optional
33-
width: 0, // optional
34-
height: 0, // optional
35-
quality: -1, // optional
30+
latitude: 37.7749, // optional
31+
longitude: -122.4194, // optional
32+
accuracy: 100, // optional
33+
touch: true, // optional
34+
permissions: ["geolocation","notifications"], // optional
35+
sleep: 3, // optional
36+
width: 800, // optional
37+
height: 600, // optional
38+
quality: 85, // optional
3639
output: Output::JPG() // optional
3740
);

src/Appwrite/Services/Account.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ public function createMFAChallenge(AuthenticationFactor $factor): array
395395
$apiPath = str_replace(
396396
[],
397397
[],
398-
'/account/mfa/challenge'
398+
'/account/mfa/challenges'
399399
);
400400

401401
$apiParams = [];
@@ -429,7 +429,7 @@ public function updateMFAChallenge(string $challengeId, string $otp): array
429429
$apiPath = str_replace(
430430
[],
431431
[],
432-
'/account/mfa/challenge'
432+
'/account/mfa/challenges'
433433
);
434434

435435
$apiParams = [];

0 commit comments

Comments
 (0)