Skip to content

Commit 827c538

Browse files
committed
update examples
1 parent e6cdf9d commit 827c538

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
@@ -731,7 +731,7 @@ export class Account extends Service {
731731
throw new AppwriteException('Missing required parameter: "factor"');
732732
}
733733

734-
const apiPath = '/account/mfa/challenge';
734+
const apiPath = '/account/mfa/challenges';
735735
const payload: Payload = {};
736736

737737
if (typeof factor !== 'undefined') {
@@ -780,7 +780,7 @@ export class Account extends Service {
780780
throw new AppwriteException('Missing required parameter: "factor"');
781781
}
782782

783-
const apiPath = '/account/mfa/challenge';
783+
const apiPath = '/account/mfa/challenges';
784784
const payload: Payload = {};
785785

786786
if (typeof factor !== 'undefined') {
@@ -839,7 +839,7 @@ export class Account extends Service {
839839
throw new AppwriteException('Missing required parameter: "otp"');
840840
}
841841

842-
const apiPath = '/account/mfa/challenge';
842+
const apiPath = '/account/mfa/challenges';
843843
const payload: Payload = {};
844844

845845
if (typeof challengeId !== 'undefined') {
@@ -901,7 +901,7 @@ export class Account extends Service {
901901
throw new AppwriteException('Missing required parameter: "otp"');
902902
}
903903

904-
const apiPath = '/account/mfa/challenge';
904+
const apiPath = '/account/mfa/challenges';
905905
const payload: Payload = {};
906906

907907
if (typeof challengeId !== 'undefined') {

0 commit comments

Comments
 (0)