Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/appwrite/mod.ts>Avatars

[READ-ONLY] Official Appwrite Deno SDK 🦕
Go to Latest
class Avatars
extends Service
Re-export
import { Avatars } from "https://deno.land/x/appwrite@0.0.2/mod.ts";

Methods

getBrowser(
code: string,
width?: number,
height?: number,
quality?: number,
): Promise<string>

Get Browser Icon

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 /account/sessions endpoint. Use width, height and quality arguments to change the output settings.

getCreditCard(
code: string,
width?: number,
height?: number,
quality?: number,
): Promise<string>

Get Credit Card Icon

Need to display your users with your billing method or their payment methods? 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.

getFavicon(url: string): Promise<string>

Get Favicon

Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL.

getFlag(
code: string,
width?: number,
height?: number,
quality?: number,
): Promise<string>

Get Country Flag

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.

getImage(
url: string,
width?: number,
height?: number,
): Promise<string>

Get Image from URL

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.

getQR(
text: string,
size?: number,
margin?: number,
download?: number,
): Promise<string>

Get QR Code

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.