QR Code Generation in Deno

How to generate QR codes using TTA in Deno.

Generate QR Codes in Deno

import { TextToAnything } from "@texttoanything/deno";

const TTA = new TextToAnything(/*API token here*/);

const qrcodeFile = await TTA.generateQRCode("qrcode.png", {
  content: "https://rapidapi.com/Attacler/api/text-to-anything",
});

The object has the following options:

OptionTypeDescription
contentstring The content of the QRCode.
lightColorstring Used as the background of the QRCode.
darkColorstring Used for the symbols inside of the QRCode.
marginnumber The offset around the QRCode.
widthnumber The width of the QRCode.

Output

The SDK will return a Blob as result.