Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
import io.appwrite.enums.Theme;
import io.appwrite.enums.Timezone;
import io.appwrite.enums.Output;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand All @@ -14,11 +17,11 @@ avatars.getScreenshot(
1, // viewportWidth (optional)
1, // viewportHeight (optional)
0.1, // scale (optional)
theme.LIGHT, // theme (optional)
Theme.LIGHT, // theme (optional)
"<USER_AGENT>", // userAgent (optional)
false, // fullpage (optional)
"<LOCALE>", // locale (optional)
timezone.AFRICA_ABIDJAN, // timezone (optional)
Timezone.AFRICA_ABIDJAN, // timezone (optional)
-90, // latitude (optional)
-180, // longitude (optional)
0, // accuracy (optional)
Expand All @@ -28,7 +31,7 @@ avatars.getScreenshot(
0, // width (optional)
0, // height (optional)
-1, // quality (optional)
output.JPG, // output (optional)
Output.JPG, // output (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
import io.appwrite.enums.ExecutionMethod;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Storage;
import io.appwrite.enums.ImageGravity;
import io.appwrite.enums.ImageFormat;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Avatars
import io.appwrite.enums.Theme
import io.appwrite.enums.Timezone
import io.appwrite.enums.Output

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
import io.appwrite.enums.ExecutionMethod

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Storage
import io.appwrite.enums.ImageGravity
import io.appwrite.enums.ImageFormat

val client = Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);

// Downloading file
UInt8List bytes = await avatars.getBrowser(
Uint8List bytes = await avatars.getBrowser(
code: Browser.avantBrowser,
width: 0, // optional
height: 0, // optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);

// Downloading file
UInt8List bytes = await avatars.getCreditCard(
Uint8List bytes = await avatars.getCreditCard(
code: CreditCard.americanExpress,
width: 0, // optional
height: 0, // optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);

// Downloading file
UInt8List bytes = await avatars.getFavicon(
Uint8List bytes = await avatars.getFavicon(
url: 'https://example.com',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);

// Downloading file
UInt8List bytes = await avatars.getFlag(
Uint8List bytes = await avatars.getFlag(
code: Flag.afghanistan,
width: 0, // optional
height: 0, // optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);

// Downloading file
UInt8List bytes = await avatars.getImage(
Uint8List bytes = await avatars.getImage(
url: 'https://example.com',
width: 0, // optional
height: 0, // optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);

// Downloading file
UInt8List bytes = await avatars.getInitials(
Uint8List bytes = await avatars.getInitials(
name: '<NAME>', // optional
width: 0, // optional
height: 0, // optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);

// Downloading file
UInt8List bytes = await avatars.getQR(
Uint8List bytes = await avatars.getQR(
text: '<TEXT>',
size: 1, // optional
margin: 0, // optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ Client client = Client()
Avatars avatars = Avatars(client);

// Downloading file
UInt8List bytes = await avatars.getScreenshot(
Uint8List bytes = await avatars.getScreenshot(
url: 'https://example.com',
headers: {}, // optional
viewportWidth: 1, // optional
viewportHeight: 1, // optional
scale: 0.1, // optional
theme: .light, // optional
theme: Theme.light, // optional
userAgent: '<USER_AGENT>', // optional
fullpage: false, // optional
locale: '<LOCALE>', // optional
timezone: .africaAbidjan, // optional
timezone: Timezone.africaAbidjan, // optional
latitude: -90, // optional
longitude: -180, // optional
accuracy: 0, // optional
Expand All @@ -27,7 +27,7 @@ UInt8List bytes = await avatars.getScreenshot(
width: 0, // optional
height: 0, // optional
quality: -1, // optional
output: .jpg, // optional
output: Output.jpg, // optional
)

final file = File('path_to_file/filename.ext');
Expand All @@ -41,11 +41,11 @@ FutureBuilder(
viewportWidth:1 , // optional
viewportHeight:1 , // optional
scale:0.1 , // optional
theme: .light, // optional
theme: Theme.light, // optional
userAgent:'<USER_AGENT>' , // optional
fullpage:false , // optional
locale:'<LOCALE>' , // optional
timezone: .africaAbidjan, // optional
timezone: Timezone.africaAbidjan, // optional
latitude:-90 , // optional
longitude:-180 , // optional
accuracy:0 , // optional
Expand All @@ -55,7 +55,7 @@ FutureBuilder(
width:0 , // optional
height:0 , // optional
quality:-1 , // optional
output: .jpg, // optional
output: Output.jpg, // optional
), // Works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Storage storage = Storage(client);

// Downloading file
UInt8List bytes = await storage.getFileDownload(
Uint8List bytes = await storage.getFileDownload(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
token: '<TOKEN>', // optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Storage storage = Storage(client);

// Downloading file
UInt8List bytes = await storage.getFilePreview(
Uint8List bytes = await storage.getFilePreview(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
width: 0, // optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Client client = Client()
Storage storage = Storage(client);

// Downloading file
UInt8List bytes = await storage.getFileView(
Uint8List bytes = await storage.getFileView(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
token: '<TOKEN>', // optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, Avatars, , , } from "react-native-appwrite";
import { Client, Avatars, Theme, Timezone, Output } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -12,11 +12,11 @@ const result = avatars.getScreenshot({
viewportWidth: 1, // optional
viewportHeight: 1, // optional
scale: 0.1, // optional
theme: .Light, // optional
theme: Theme.Light, // optional
userAgent: '<USER_AGENT>', // optional
fullpage: false, // optional
locale: '<LOCALE>', // optional
timezone: .AfricaAbidjan, // optional
timezone: Timezone.AfricaAbidjan, // optional
latitude: -90, // optional
longitude: -180, // optional
accuracy: 0, // optional
Expand All @@ -26,7 +26,7 @@ const result = avatars.getScreenshot({
width: 0, // optional
height: 0, // optional
quality: -1, // optional
output: .Jpg // optional
output: Output.Jpg // optional
});

console.log(result);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, Avatars, , , } from "appwrite";
import { Client, Avatars, Theme, Timezone, Output } from "appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -12,11 +12,11 @@ const result = avatars.getScreenshot({
viewportWidth: 1, // optional
viewportHeight: 1, // optional
scale: 0.1, // optional
theme: .Light, // optional
theme: Theme.Light, // optional
userAgent: '<USER_AGENT>', // optional
fullpage: false, // optional
locale: '<LOCALE>', // optional
timezone: .AfricaAbidjan, // optional
timezone: Timezone.AfricaAbidjan, // optional
latitude: -90, // optional
longitude: -180, // optional
accuracy: 0, // optional
Expand All @@ -26,7 +26,7 @@ const result = avatars.getScreenshot({
width: 0, // optional
height: 0, // optional
quality: -1, // optional
output: .Jpg // optional
output: Output.Jpg // optional
});

console.log(result);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, Avatars, , , } from "@appwrite.io/console";
import { Client, Avatars, Theme, Timezone, Output } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -12,11 +12,11 @@ const result = avatars.getScreenshot({
viewportWidth: 1, // optional
viewportHeight: 1, // optional
scale: 0.1, // optional
theme: .Light, // optional
theme: Theme.Light, // optional
userAgent: '<USER_AGENT>', // optional
fullpage: false, // optional
locale: '<LOCALE>', // optional
timezone: .AfricaAbidjan, // optional
timezone: Timezone.AfricaAbidjan, // optional
latitude: -90, // optional
longitude: -180, // optional
accuracy: 0, // optional
Expand All @@ -26,7 +26,7 @@ const result = avatars.getScreenshot({
width: 0, // optional
height: 0, // optional
quality: -1, // optional
output: .Jpg // optional
output: Output.Jpg // optional
});

console.log(result);
Loading