Skip to content

Commit 70b4d95

Browse files
committed
update examples
1 parent 364ef83 commit 70b4d95

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
@@ -8,24 +8,27 @@ const avatars = new Avatars(client);
88

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

src/services/account.ts

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

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

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

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

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

0 commit comments

Comments
 (0)