|
| 1 | +import { Client, Avatars, Theme, Timezone, Output } from "appwrite"; |
| 2 | + |
| 3 | +const client = new Client() |
| 4 | + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint |
| 5 | + .setProject('<YOUR_PROJECT_ID>'); // Your project ID |
| 6 | + |
| 7 | +const avatars = new Avatars(client); |
| 8 | + |
| 9 | +const result = avatars.getScreenshot({ |
| 10 | + url: 'https://example.com', |
| 11 | + headers: {}, // optional |
| 12 | + viewportWidth: 1, // optional |
| 13 | + viewportHeight: 1, // optional |
| 14 | + scale: 0.1, // optional |
| 15 | + theme: Theme.Light, // optional |
| 16 | + userAgent: '<USER_AGENT>', // optional |
| 17 | + fullpage: false, // optional |
| 18 | + locale: '<LOCALE>', // optional |
| 19 | + 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 |
| 29 | + output: Output.Jpg // optional |
| 30 | +}); |
| 31 | + |
| 32 | +console.log(result); |
0 commit comments