You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: appwrite/services/avatars.py
+16-8Lines changed: 16 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,8 @@ def get_browser(
20
20
code: Browser,
21
21
width: Optional[float] =None,
22
22
height: Optional[float] =None,
23
-
quality: Optional[float] =None ) ->bytes:
23
+
quality: Optional[float] =None
24
+
) ->bytes:
24
25
"""
25
26
You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
26
27
@@ -73,7 +74,8 @@ def get_credit_card(
73
74
code: CreditCard,
74
75
width: Optional[float] =None,
75
76
height: Optional[float] =None,
76
-
quality: Optional[float] =None ) ->bytes:
77
+
quality: Optional[float] =None
78
+
) ->bytes:
77
79
"""
78
80
The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
79
81
@@ -124,7 +126,8 @@ def get_credit_card(
124
126
125
127
defget_favicon(
126
128
self,
127
-
url: str ) ->bytes:
129
+
url: str
130
+
) ->bytes:
128
131
"""
129
132
Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
130
133
@@ -165,7 +168,8 @@ def get_flag(
165
168
code: Flag,
166
169
width: Optional[float] =None,
167
170
height: Optional[float] =None,
168
-
quality: Optional[float] =None ) ->bytes:
171
+
quality: Optional[float] =None
172
+
) ->bytes:
169
173
"""
170
174
You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
171
175
@@ -218,7 +222,8 @@ def get_image(
218
222
self,
219
223
url: str,
220
224
width: Optional[float] =None,
221
-
height: Optional[float] =None ) ->bytes:
225
+
height: Optional[float] =None
226
+
) ->bytes:
222
227
"""
223
228
Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
224
229
@@ -269,7 +274,8 @@ def get_initials(
269
274
name: Optional[str] =None,
270
275
width: Optional[float] =None,
271
276
height: Optional[float] =None,
272
-
background: Optional[str] =None ) ->bytes:
277
+
background: Optional[str] =None
278
+
) ->bytes:
273
279
"""
274
280
Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.
275
281
@@ -323,7 +329,8 @@ def get_qr(
323
329
text: str,
324
330
size: Optional[float] =None,
325
331
margin: Optional[float] =None,
326
-
download: Optional[bool] =None ) ->bytes:
332
+
download: Optional[bool] =None
333
+
) ->bytes:
327
334
"""
328
335
Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
329
336
@@ -391,7 +398,8 @@ def get_screenshot(
391
398
width: Optional[float] =None,
392
399
height: Optional[float] =None,
393
400
quality: Optional[float] =None,
394
-
output: Optional[ImageFormat] =None ) ->bytes:
401
+
output: Optional[ImageFormat] =None
402
+
) ->bytes:
395
403
"""
396
404
Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.
0 commit comments