Skip to content

Commit cfca36d

Browse files
committed
update examples
1 parent 3d6e7dc commit cfca36d

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

docs/examples/avatars/get-screenshot.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,26 @@ const avatars = new sdk.Avatars(client);
99

1010
const result = await avatars.getScreenshot({
1111
url: 'https://example.com',
12-
headers: {}, // optional
13-
viewportWidth: 1, // optional
14-
viewportHeight: 1, // optional
15-
scale: 0.1, // optional
12+
headers: {
13+
"Authorization": "Bearer token123",
14+
"X-Custom-Header": "value"
15+
}, // optional
16+
viewportWidth: 1920, // optional
17+
viewportHeight: 1080, // optional
18+
scale: 2, // optional
1619
theme: sdk.Theme.Light, // optional
17-
userAgent: '<USER_AGENT>', // optional
18-
fullpage: false, // optional
19-
locale: '<LOCALE>', // optional
20+
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
21+
fullpage: true, // optional
22+
locale: 'en-US', // optional
2023
timezone: sdk.Timezone.AfricaAbidjan, // optional
21-
latitude: -90, // optional
22-
longitude: -180, // optional
23-
accuracy: 0, // optional
24-
touch: false, // optional
25-
permissions: [], // optional
26-
sleep: 0, // optional
27-
width: 0, // optional
28-
height: 0, // optional
29-
quality: -1, // optional
24+
latitude: 37.7749, // optional
25+
longitude: -122.4194, // optional
26+
accuracy: 100, // optional
27+
touch: true, // optional
28+
permissions: ["geolocation","notifications"], // optional
29+
sleep: 3, // optional
30+
width: 800, // optional
31+
height: 600, // optional
32+
quality: 85, // optional
3033
output: sdk.Output.Jpg // optional
3134
});

src/services/account.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ export class Account {
811811
throw new AppwriteException('Missing required parameter: "factor"');
812812
}
813813

814-
const apiPath = '/account/mfa/challenge';
814+
const apiPath = '/account/mfa/challenges';
815815
const payload: Payload = {};
816816
if (typeof factor !== 'undefined') {
817817
payload['factor'] = factor;
@@ -866,7 +866,7 @@ export class Account {
866866
throw new AppwriteException('Missing required parameter: "factor"');
867867
}
868868

869-
const apiPath = '/account/mfa/challenge';
869+
const apiPath = '/account/mfa/challenges';
870870
const payload: Payload = {};
871871
if (typeof factor !== 'undefined') {
872872
payload['factor'] = factor;
@@ -930,7 +930,7 @@ export class Account {
930930
throw new AppwriteException('Missing required parameter: "otp"');
931931
}
932932

933-
const apiPath = '/account/mfa/challenge';
933+
const apiPath = '/account/mfa/challenges';
934934
const payload: Payload = {};
935935
if (typeof challengeId !== 'undefined') {
936936
payload['challengeId'] = challengeId;
@@ -996,7 +996,7 @@ export class Account {
996996
throw new AppwriteException('Missing required parameter: "otp"');
997997
}
998998

999-
const apiPath = '/account/mfa/challenge';
999+
const apiPath = '/account/mfa/challenges';
10001000
const payload: Payload = {};
10011001
if (typeof challengeId !== 'undefined') {
10021002
payload['challengeId'] = challengeId;

0 commit comments

Comments
 (0)