Skip to content

Commit 5af8950

Browse files
committed
update examples
1 parent 6e76cf2 commit 5af8950

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

appwrite/services/account.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def create_mfa_challenge(self, factor: AuthenticationFactor) -> Dict[str, Any]:
394394
If API request fails
395395
"""
396396

397-
api_path = '/account/mfa/challenge'
397+
api_path = '/account/mfa/challenges'
398398
api_params = {}
399399
if factor is None:
400400
raise AppwriteException('Missing required parameter: "factor"')
@@ -428,7 +428,7 @@ def update_mfa_challenge(self, challenge_id: str, otp: str) -> Dict[str, Any]:
428428
If API request fails
429429
"""
430430

431-
api_path = '/account/mfa/challenge'
431+
api_path = '/account/mfa/challenges'
432432
api_params = {}
433433
if challenge_id is None:
434434
raise AppwriteException('Missing required parameter: "challenge_id"')

docs/examples/avatars/get-screenshot.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,26 @@ avatars = Avatars(client)
1313

1414
result = avatars.get_screenshot(
1515
url = 'https://example.com',
16-
headers = {}, # optional
17-
viewport_width = 1, # optional
18-
viewport_height = 1, # optional
19-
scale = 0.1, # optional
16+
headers = {
17+
"Authorization": "Bearer token123",
18+
"X-Custom-Header": "value"
19+
}, # optional
20+
viewport_width = 1920, # optional
21+
viewport_height = 1080, # optional
22+
scale = 2, # optional
2023
theme = Theme.LIGHT, # optional
21-
user_agent = '<USER_AGENT>', # optional
22-
fullpage = False, # optional
23-
locale = '<LOCALE>', # optional
24+
user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', # optional
25+
fullpage = True, # optional
26+
locale = 'en-US', # optional
2427
timezone = Timezone.AFRICA_ABIDJAN, # optional
25-
latitude = -90, # optional
26-
longitude = -180, # optional
27-
accuracy = 0, # optional
28-
touch = False, # optional
29-
permissions = [], # optional
30-
sleep = 0, # optional
31-
width = 0, # optional
32-
height = 0, # optional
33-
quality = -1, # optional
28+
latitude = 37.7749, # optional
29+
longitude = -122.4194, # optional
30+
accuracy = 100, # optional
31+
touch = True, # optional
32+
permissions = ["geolocation","notifications"], # optional
33+
sleep = 3, # optional
34+
width = 800, # optional
35+
height = 600, # optional
36+
quality = 85, # optional
3437
output = Output.JPG # optional
3538
)

0 commit comments

Comments
 (0)