regenerate sdk examples

This commit is contained in:
Chirag Aggarwal
2025-11-18 09:53:55 +05:30
parent f9274dad3f
commit 39c5b6c4d0
78 changed files with 144 additions and 74 deletions
@@ -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
@@ -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
@@ -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',
)
@@ -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
@@ -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
@@ -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
@@ -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
@@ -7,7 +7,7 @@ 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
@@ -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
@@ -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
@@ -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
@@ -3,4 +3,5 @@ appwrite functions create-template-deployment \
--repository <REPOSITORY> \
--owner <OWNER> \
--root-directory <ROOT_DIRECTORY> \
--version <VERSION>
--type commit \
--reference <REFERENCE>
@@ -3,4 +3,5 @@ appwrite sites create-template-deployment \
--repository <REPOSITORY> \
--owner <OWNER> \
--root-directory <ROOT_DIRECTORY> \
--version <VERSION>
--type branch \
--reference <REFERENCE>
@@ -1,4 +1,4 @@
import { Client, Functions } from "@appwrite.io/console";
import { Client, Functions, } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -11,7 +11,8 @@ const result = await functions.createTemplateDeployment({
repository: '<REPOSITORY>',
owner: '<OWNER>',
rootDirectory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: .Commit,
reference: '<REFERENCE>',
activate: false // optional
});
@@ -1,4 +1,4 @@
import { Client, Sites } from "@appwrite.io/console";
import { Client, Sites, } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -11,7 +11,8 @@ const result = await sites.createTemplateDeployment({
repository: '<REPOSITORY>',
owner: '<OWNER>',
rootDirectory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: .Branch,
reference: '<REFERENCE>',
activate: false // optional
});
@@ -16,7 +16,8 @@ const result = await storage.createBucket({
allowedFileExtensions: [], // optional
compression: .None, // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
});
console.log(result);
@@ -16,7 +16,8 @@ const result = await storage.updateBucket({
allowedFileExtensions: [], // optional
compression: .None, // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
});
console.log(result);
@@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);
UInt8List result = await avatars.getBrowser(
Uint8List result = await avatars.getBrowser(
code: Browser.avantBrowser,
width: 0, // (optional)
height: 0, // (optional)
@@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);
UInt8List result = await avatars.getCreditCard(
Uint8List result = await avatars.getCreditCard(
code: CreditCard.americanExpress,
width: 0, // (optional)
height: 0, // (optional)
@@ -7,6 +7,6 @@ Client client = Client()
Avatars avatars = Avatars(client);
UInt8List result = await avatars.getFavicon(
Uint8List result = await avatars.getFavicon(
url: 'https://example.com',
);
@@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);
UInt8List result = await avatars.getFlag(
Uint8List result = await avatars.getFlag(
code: Flag.afghanistan,
width: 0, // (optional)
height: 0, // (optional)
@@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);
UInt8List result = await avatars.getImage(
Uint8List result = await avatars.getImage(
url: 'https://example.com',
width: 0, // (optional)
height: 0, // (optional)
@@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);
UInt8List result = await avatars.getInitials(
Uint8List result = await avatars.getInitials(
name: '<NAME>', // (optional)
width: 0, // (optional)
height: 0, // (optional)
@@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);
UInt8List result = await avatars.getQR(
Uint8List result = await avatars.getQR(
text: '<TEXT>',
size: 1, // (optional)
margin: 0, // (optional)
@@ -7,7 +7,7 @@ Client client = Client()
Avatars avatars = Avatars(client);
UInt8List result = await avatars.getScreenshot(
Uint8List result = await avatars.getScreenshot(
url: 'https://example.com',
headers: {}, // (optional)
viewportWidth: 1, // (optional)
@@ -12,6 +12,7 @@ Deployment result = await functions.createTemplateDeployment(
repository: '<REPOSITORY>',
owner: '<OWNER>',
rootDirectory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: .commit,
reference: '<REFERENCE>',
activate: false, // (optional)
);
@@ -7,7 +7,7 @@ Client client = Client()
Functions functions = Functions(client);
UInt8List result = await functions.getDeploymentDownload(
Uint8List result = await functions.getDeploymentDownload(
functionId: '<FUNCTION_ID>',
deploymentId: '<DEPLOYMENT_ID>',
type: DeploymentDownloadType.source, // (optional)
@@ -12,6 +12,7 @@ Deployment result = await sites.createTemplateDeployment(
repository: '<REPOSITORY>',
owner: '<OWNER>',
rootDirectory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: .branch,
reference: '<REFERENCE>',
activate: false, // (optional)
);
@@ -7,7 +7,7 @@ Client client = Client()
Sites sites = Sites(client);
UInt8List result = await sites.getDeploymentDownload(
Uint8List result = await sites.getDeploymentDownload(
siteId: '<SITE_ID>',
deploymentId: '<DEPLOYMENT_ID>',
type: DeploymentDownloadType.source, // (optional)
@@ -20,4 +20,5 @@ Bucket result = await storage.createBucket(
compression: .none, // (optional)
encryption: false, // (optional)
antivirus: false, // (optional)
transformations: false, // (optional)
);
@@ -7,7 +7,7 @@ Client client = Client()
Storage storage = Storage(client);
UInt8List result = await storage.getFileDownload(
Uint8List result = await storage.getFileDownload(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
token: '<TOKEN>', // (optional)
@@ -7,7 +7,7 @@ Client client = Client()
Storage storage = Storage(client);
UInt8List result = await storage.getFilePreview(
Uint8List result = await storage.getFilePreview(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
width: 0, // (optional)
@@ -7,7 +7,7 @@ Client client = Client()
Storage storage = Storage(client);
UInt8List result = await storage.getFileView(
Uint8List result = await storage.getFileView(
bucketId: '<BUCKET_ID>',
fileId: '<FILE_ID>',
token: '<TOKEN>', // (optional)
@@ -20,4 +20,5 @@ Bucket result = await storage.updateBucket(
compression: .none, // (optional)
encryption: false, // (optional)
antivirus: false, // (optional)
transformations: false, // (optional)
);
@@ -1,4 +1,5 @@
using Appwrite;
using Appwrite.Enums;
using Appwrite.Models;
using Appwrite.Services;
@@ -14,6 +15,7 @@ Deployment result = await functions.CreateTemplateDeployment(
repository: "<REPOSITORY>",
owner: "<OWNER>",
rootDirectory: "<ROOT_DIRECTORY>",
version: "<VERSION>",
type: .Commit,
reference: "<REFERENCE>",
activate: false // optional
);
@@ -1,4 +1,5 @@
using Appwrite;
using Appwrite.Enums;
using Appwrite.Models;
using Appwrite.Services;
@@ -14,6 +15,7 @@ Deployment result = await sites.CreateTemplateDeployment(
repository: "<REPOSITORY>",
owner: "<OWNER>",
rootDirectory: "<ROOT_DIRECTORY>",
version: "<VERSION>",
type: .Branch,
reference: "<REFERENCE>",
activate: false // optional
);
@@ -20,5 +20,6 @@ Bucket result = await storage.CreateBucket(
allowedFileExtensions: new List<string>(), // optional
compression: .None, // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
);
@@ -20,5 +20,6 @@ Bucket result = await storage.UpdateBucket(
allowedFileExtensions: new List<string>(), // optional
compression: .None, // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
);
@@ -19,6 +19,7 @@ response, error := service.CreateTemplateDeployment(
"<REPOSITORY>",
"<OWNER>",
"<ROOT_DIRECTORY>",
"<VERSION>",
"commit",
"<REFERENCE>",
functions.WithCreateTemplateDeploymentActivate(false),
)
@@ -19,6 +19,7 @@ response, error := service.CreateTemplateDeployment(
"<REPOSITORY>",
"<OWNER>",
"<ROOT_DIRECTORY>",
"<VERSION>",
"branch",
"<REFERENCE>",
sites.WithCreateTemplateDeploymentActivate(false),
)
@@ -25,4 +25,5 @@ response, error := service.CreateBucket(
storage.WithCreateBucketCompression("none"),
storage.WithCreateBucketEncryption(false),
storage.WithCreateBucketAntivirus(false),
storage.WithCreateBucketTransformations(false),
)
@@ -25,4 +25,5 @@ response, error := service.UpdateBucket(
storage.WithUpdateBucketCompression("none"),
storage.WithUpdateBucketEncryption(false),
storage.WithUpdateBucketAntivirus(false),
storage.WithUpdateBucketTransformations(false),
)
@@ -4,7 +4,8 @@ mutation {
repository: "<REPOSITORY>",
owner: "<OWNER>",
rootDirectory: "<ROOT_DIRECTORY>",
version: "<VERSION>",
type: "commit",
reference: "<REFERENCE>",
activate: false
) {
_id
@@ -4,7 +4,8 @@ mutation {
repository: "<REPOSITORY>",
owner: "<OWNER>",
rootDirectory: "<ROOT_DIRECTORY>",
version: "<VERSION>",
type: "branch",
reference: "<REFERENCE>",
activate: false
) {
_id
@@ -9,7 +9,8 @@ mutation {
allowedFileExtensions: [],
compression: "none",
encryption: false,
antivirus: false
antivirus: false,
transformations: false
) {
_id
_createdAt
@@ -23,5 +24,6 @@ mutation {
compression
encryption
antivirus
transformations
}
}
@@ -9,7 +9,8 @@ mutation {
allowedFileExtensions: [],
compression: "none",
encryption: false,
antivirus: false
antivirus: false,
transformations: false
) {
_id
_createdAt
@@ -23,5 +24,6 @@ mutation {
compression
encryption
antivirus
transformations
}
}
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
import io.appwrite.enums.Type;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
@@ -14,7 +15,8 @@ functions.createTemplateDeployment(
"<REPOSITORY>", // repository
"<OWNER>", // owner
"<ROOT_DIRECTORY>", // rootDirectory
"<VERSION>", // version
.COMMIT, // type
"<REFERENCE>", // reference
false, // activate (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
@@ -1,6 +1,7 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Sites;
import io.appwrite.enums.Type;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
@@ -14,7 +15,8 @@ sites.createTemplateDeployment(
"<REPOSITORY>", // repository
"<OWNER>", // owner
"<ROOT_DIRECTORY>", // rootDirectory
"<VERSION>", // version
.BRANCH, // type
"<REFERENCE>", // reference
false, // activate (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
@@ -22,6 +22,7 @@ storage.createBucket(
.NONE, // compression (optional)
false, // encryption (optional)
false, // antivirus (optional)
false, // transformations (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -22,6 +22,7 @@ storage.updateBucket(
.NONE, // compression (optional)
false, // encryption (optional)
false, // antivirus (optional)
false, // transformations (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -1,6 +1,7 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
import io.appwrite.enums.Type
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
@@ -14,6 +15,7 @@ val response = functions.createTemplateDeployment(
repository = "<REPOSITORY>",
owner = "<OWNER>",
rootDirectory = "<ROOT_DIRECTORY>",
version = "<VERSION>",
type = .COMMIT,
reference = "<REFERENCE>",
activate = false // optional
)
@@ -1,6 +1,7 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Sites
import io.appwrite.enums.Type
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
@@ -14,6 +15,7 @@ val response = sites.createTemplateDeployment(
repository = "<REPOSITORY>",
owner = "<OWNER>",
rootDirectory = "<ROOT_DIRECTORY>",
version = "<VERSION>",
type = .BRANCH,
reference = "<REFERENCE>",
activate = false // optional
)
@@ -21,5 +21,6 @@ val response = storage.createBucket(
allowedFileExtensions = listOf(), // optional
compression = "none", // optional
encryption = false, // optional
antivirus = false // optional
antivirus = false, // optional
transformations = false // optional
)
@@ -21,5 +21,6 @@ val response = storage.updateBucket(
allowedFileExtensions = listOf(), // optional
compression = "none", // optional
encryption = false, // optional
antivirus = false // optional
antivirus = false, // optional
transformations = false // optional
)
@@ -12,6 +12,7 @@ const result = await functions.createTemplateDeployment({
repository: '<REPOSITORY>',
owner: '<OWNER>',
rootDirectory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: sdk..Commit,
reference: '<REFERENCE>',
activate: false // optional
});
@@ -12,6 +12,7 @@ const result = await sites.createTemplateDeployment({
repository: '<REPOSITORY>',
owner: '<OWNER>',
rootDirectory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: sdk..Branch,
reference: '<REFERENCE>',
activate: false // optional
});
@@ -17,5 +17,6 @@ const result = await storage.createBucket({
allowedFileExtensions: [], // optional
compression: sdk..None, // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
});
@@ -17,5 +17,6 @@ const result = await storage.updateBucket({
allowedFileExtensions: [], // optional
compression: sdk..None, // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
});
@@ -2,6 +2,7 @@
use Appwrite\Client;
use Appwrite\Services\Functions;
use Appwrite\Enums\Type;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -15,6 +16,7 @@ $result = $functions->createTemplateDeployment(
repository: '<REPOSITORY>',
owner: '<OWNER>',
rootDirectory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: Type::COMMIT(),
reference: '<REFERENCE>',
activate: false // optional
);
@@ -2,6 +2,7 @@
use Appwrite\Client;
use Appwrite\Services\Sites;
use Appwrite\Enums\Type;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -15,6 +16,7 @@ $result = $sites->createTemplateDeployment(
repository: '<REPOSITORY>',
owner: '<OWNER>',
rootDirectory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: Type::BRANCH(),
reference: '<REFERENCE>',
activate: false // optional
);
@@ -23,5 +23,6 @@ $result = $storage->createBucket(
allowedFileExtensions: [], // optional
compression: Compression::NONE(), // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
);
@@ -23,5 +23,6 @@ $result = $storage->updateBucket(
allowedFileExtensions: [], // optional
compression: Compression::NONE(), // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
);
@@ -1,5 +1,6 @@
from appwrite.client import Client
from appwrite.services.functions import Functions
from appwrite.enums import
client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
@@ -13,6 +14,7 @@ result = functions.create_template_deployment(
repository = '<REPOSITORY>',
owner = '<OWNER>',
root_directory = '<ROOT_DIRECTORY>',
version = '<VERSION>',
type = .COMMIT,
reference = '<REFERENCE>',
activate = False # optional
)
@@ -1,5 +1,6 @@
from appwrite.client import Client
from appwrite.services.sites import Sites
from appwrite.enums import
client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
@@ -13,6 +14,7 @@ result = sites.create_template_deployment(
repository = '<REPOSITORY>',
owner = '<OWNER>',
root_directory = '<ROOT_DIRECTORY>',
version = '<VERSION>',
type = .BRANCH,
reference = '<REFERENCE>',
activate = False # optional
)
@@ -20,5 +20,6 @@ result = storage.create_bucket(
allowed_file_extensions = [], # optional
compression = .NONE, # optional
encryption = False, # optional
antivirus = False # optional
antivirus = False, # optional
transformations = False # optional
)
@@ -20,5 +20,6 @@ result = storage.update_bucket(
allowed_file_extensions = [], # optional
compression = .NONE, # optional
encryption = False, # optional
antivirus = False # optional
antivirus = False, # optional
transformations = False # optional
)
@@ -9,6 +9,7 @@ X-Appwrite-Key: <YOUR_API_KEY>
"repository": "<REPOSITORY>",
"owner": "<OWNER>",
"rootDirectory": "<ROOT_DIRECTORY>",
"version": "<VERSION>",
"type": "commit",
"reference": "<REFERENCE>",
"activate": false
}
@@ -9,6 +9,7 @@ X-Appwrite-Key: <YOUR_API_KEY>
"repository": "<REPOSITORY>",
"owner": "<OWNER>",
"rootDirectory": "<ROOT_DIRECTORY>",
"version": "<VERSION>",
"type": "branch",
"reference": "<REFERENCE>",
"activate": false
}
@@ -15,5 +15,6 @@ X-Appwrite-Key: <YOUR_API_KEY>
"allowedFileExtensions": [],
"compression": "none",
"encryption": false,
"antivirus": false
"antivirus": false,
"transformations": false
}
@@ -14,5 +14,6 @@ X-Appwrite-Key: <YOUR_API_KEY>
"allowedFileExtensions": [],
"compression": "none",
"encryption": false,
"antivirus": false
"antivirus": false,
"transformations": false
}
@@ -1,6 +1,7 @@
require 'appwrite'
include Appwrite
include Appwrite::Enums
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
@@ -14,6 +15,7 @@ result = functions.create_template_deployment(
repository: '<REPOSITORY>',
owner: '<OWNER>',
root_directory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: ::COMMIT,
reference: '<REFERENCE>',
activate: false # optional
)
@@ -1,6 +1,7 @@
require 'appwrite'
include Appwrite
include Appwrite::Enums
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
@@ -14,6 +15,7 @@ result = sites.create_template_deployment(
repository: '<REPOSITORY>',
owner: '<OWNER>',
root_directory: '<ROOT_DIRECTORY>',
version: '<VERSION>',
type: ::BRANCH,
reference: '<REFERENCE>',
activate: false # optional
)
@@ -21,5 +21,6 @@ result = storage.create_bucket(
allowed_file_extensions: [], # optional
compression: ::NONE, # optional
encryption: false, # optional
antivirus: false # optional
antivirus: false, # optional
transformations: false # optional
)
@@ -21,5 +21,6 @@ result = storage.update_bucket(
allowed_file_extensions: [], # optional
compression: ::NONE, # optional
encryption: false, # optional
antivirus: false # optional
antivirus: false, # optional
transformations: false # optional
)
@@ -1,4 +1,5 @@
import Appwrite
import AppwriteEnums
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
@@ -12,7 +13,8 @@ let deployment = try await functions.createTemplateDeployment(
repository: "<REPOSITORY>",
owner: "<OWNER>",
rootDirectory: "<ROOT_DIRECTORY>",
version: "<VERSION>",
type: .commit,
reference: "<REFERENCE>",
activate: false // optional
)
@@ -1,4 +1,5 @@
import Appwrite
import AppwriteEnums
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
@@ -12,7 +13,8 @@ let deployment = try await sites.createTemplateDeployment(
repository: "<REPOSITORY>",
owner: "<OWNER>",
rootDirectory: "<ROOT_DIRECTORY>",
version: "<VERSION>",
type: .branch,
reference: "<REFERENCE>",
activate: false // optional
)
@@ -18,6 +18,7 @@ let bucket = try await storage.createBucket(
allowedFileExtensions: [], // optional
compression: .none, // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
)
@@ -18,6 +18,7 @@ let bucket = try await storage.updateBucket(
allowedFileExtensions: [], // optional
compression: .none, // optional
encryption: false, // optional
antivirus: false // optional
antivirus: false, // optional
transformations: false // optional
)